Because landlord had failed to remove serious violations in tenant’s apartment, which could constitute the basis for the constructive eviction of tenant, this nonpayment summary proceeding, brought in March of 1971, was stayed under section 755 of the Real Property Actions and Proceedings Law by order of the court below dated March 25, 1971. For almost three years thereafter tenant continued to deposit her rent in court under the order, yet the landlord made no repairs. Whereupon tenant moved out on November 14, 1973.
Having been effectively forced out of possession, on November 26, 1973, tenant moved for an order vacating the stay and for return of the money deposited by her. Eventually, having repaired the apartment for a new tenant, landlord, in March of 1974, cross-moved for similar relief. At that time $2,153.58 was on deposit.
We need not retabulate here the uncorrected conditions under which tenant was compelled to live before she moved. The sordid list is detailed in the opinion of the hearing officer below. Suffice to state that the record sustains his findings, and his determination that with a minor exception, the conditions which gave rise to the order under section 755 of the *260Real Property Actions and Proceedings Law "continued to exist to the time the tenant vacated the apartment”. Applying equitable principles, he directed that one half of the moneys be returned to the landlord and one half to the tenant. We reach the same conclusion by a different route.
There is no provision in section 755 for the return of deposited rent to the tenant when the stay is vacated (see Real Property Actions and Proceedings Law, § 755, subd 3; Rosgro Realty Co. v Braynen, 70 Misc 2d 808; Matter of Hall v Stroud, NYLJ, April 26, 1974, p 2, col 4; Gutwein v Gomez, NYLJ, July 23, 1973, p 2, col 1). But this court has long since recognized the remedial nature of the statute (Brissett v Cherry, 54 Misc 2d 353), and that it need not be given so restrictive a construction as to violate its spirit (ibid.). Where the tenant has a proper setoff or counterclaim against the landlord, the amount due landlord may be reduced accordingly (800 Inc. v Thropp, NYLJ, Feb. 2, 1973, p 2, col 4). Upon the entry of the order vacating the stay landlord is only entitled to so much of the money remaining on deposit as is due him. It is not the intention of section 755 that landlord be unjustly enriched at the expense of the tenant.
Tenant’s amended answer sets forth the affirmative defense of breach of warranty of habitability. Given the Civil Court’s recently extended jurisdiction and equitable powers (CCA, §§ 110, 203, 905; see, also, L 1972, ch 982, § 1, subd [a]; Multiple Dwelling Law, § 302-a), we deem the defense a counterclaim or setoff against the rent claimed by landlord. The proof before the hearing officer supports his finding that the defense has been sustained. On the basis of the same evidence, we find that, by reason of landlord’s violation of the warranty (see Javins v First Nat. Realty Corp., 428 F2d 1071; Pines v Perssion, 14 Wis 2d 590; Marini v Ireland, 56 NJ 130; Ann 40 ALR3d 646 and 1369), tenant suffered damages in the sum of $1,076.79. We set off these damages against the rent owed landlord (see CCA §§ 208, 905; Murphy v Serial Fed. Sav. & Loan Assn., 30 Misc 2d 450, 454-455; Morbeth Realty Corp. v Velez, 73 Misc 2d 996, same case NYLJ, July 6, 1972, p 2, col 2; 500 West 174 St v Vasquez, 67 Misc 2d 993; Steinberg v Carreras, 74 Misc 2d 32; Morbeth Realty Corp. v Rosenshine, 67 Misc 2d 325). Landlord is thus entitled only to the reduced portion of the fund on deposit; and the balance of the fund was properly directed to be paid to the tenant.
Concur: Markowitz, P. J., Frank and Dudley, JJ.
*261Orders, entered March 29, 1974, affirmed, without costs.