This is a summary proceeding based upon the claim of non-payment of rent by the tenants. The answer set up that the landlord and the tenants had entered into a settlement and compromise of the rent claimed in the petition to be overdue, and that the landlord agreed, among other things, to discontinue the present summary proceeding. The answer also set up that the tenants had tendered the possession of the premises to the landlord pursuant to the terms of the agreement of settlement and compromise, which the tenants claimed the landlord had entered into with them, and alleged that the tenants had performed and that the landlord had not performed the conditions which he was obligated to perform.
The only part of said agreement which it is now *430relevant for us to consider is that part of the agreement whereby the landlord compromised and settled the claim for rent upon which this proceeding is based, and agreed to discontinue the present proceeding. The learned court below held the answer insufficient and granted a final order on the pleadings in favor of the landlord.
The tenants had the right to plead that the claim upon which the summary proceeding was brought had been, settled and that an agreement had been entered into between the landlord and the tenants to discontinue the present proceeding. Code Civ. Pro., § 2244. If the tenants proved the facts pleaded in their answer those facts would have constituted a valid defense to the present proceeding. If the claim for rent had been settled the landlord could not succeed in the summary proceeding, and if it were proved that the landlord had entered into a legal contract to discontinue this proceeding he could not, in the face of such agreement, be entitled to a final order. In legal effect the defense pleaded was equivalent to a plea that the landlord had released the tenants from the claim upon which he sued. A party proceeded against in an,action or a special proceeding may always defend himself by the interposition of such a plea.
In principle there is no reason why the tenants should not be permitted to plead that the claim upon which the proceeding is brought has been compromised and settled and that the landlord agreed to discontinue the pending summary proceeding. Thus where the proceeding is instituted because of the non-payment of rent, the tenant may plead payment (Cochran v. Reich, 91 Hun, 440), or a general release of the claim, or that the landlord has accepted the negotiable note of the tenant which is not yet due. Spiro v. Barkin, 30 Misc. Rep. 87.
*431The claim of the landlord that, although the tenants may- have a claim for damages against him for breach of the agreement alleged, they cannot plead this agreement as a defense seems to overlook the fact that one of the terms of the agreement alleged compromised and settled the very claim upon which the landlord bases his right to maintain the present proceeding. Nor is the plea alleged in the answer rendered ineffective because it is urged as a defense and not by way of counterclaim. Code Civ. Pro., § 2244. If the defense is established, it follows that the petition should be dismissed. Nor does the suggestion made by the respondent that the tenants have themselves violated the terms of the alleged agreement of settlement make the defense insufficient. As pleaded, the defense alleged that the tenants duly performed the terms and conditions of the agreement on their part to be perf ormed. If upon the trial it can be shown that the tenants themselves violated the terms of the agreement of settlement and compromise, that fact might be held to relieve the landlord from his agreement to discontinue the present proceeding, but the court could not assume that this was the true situation from an inspection of the pleadings, which included a defense alleging full performance on the part of the tenants.
It follows that it was error to award the landlord a final order upon the pleadings, and the final order must be reversed and a new trial ordered with costs to the appellants to abide the event.
Guy and Delany, JJ., concur.
Final order reversed and new trial ordered, with costs to appellants to abide event.