—Order, Supreme Court, *473New York County (Norman Ryp, J.), entered August 11, 1997, which, to the extent appealed from, after a nonjury trial, dismissed the complaint of plaintiff Bay Plaza Estates, Inc., unanimously affirmed, with costs.
While we disagree with the trial court’s ruling that the parties’ lease agreement was insufficiently authenticated to be received in evidence, we nonetheless affirm the trial court’s dismissal of the complaint seeking rent allegedly owing for the subject premises for the balance of the lease term subsequent to May 31, 1989. Assuming an obligation on the part of defendant to pay rent pursuant to the lease proffered by plaintiff, that obligation came to an end when, as the trial court found, plaintiff accepted defendant’s surrender of the premises. “A surrender by operation of law occurs when the parties to a lease both do some act so inconsistent with the landlord-tenant relationship that it indicates their intent to deem the lease terminated” (Riverside Research Inst. v KMGA, Inc., 68 NY2d 689, 691-692; see also, Stahl Assocs. Co. v Mapes, 111 AD2d 626, 628). Here, defendant’s Director of Housing and Real Estate informed plaintiffs president, Mr. Heller, that defendant would be vacating the premises, and Mr. Heller accepted the last quarterly rent check, demanded that the keys be returned, changed the locks, placed a “for rent” sign in front of the building and advertised the availability of the premises in a newspaper. In addition, plaintiffs current vice-president and president testified that between April 12, 1989 (when defendant surrendered the building) and September 11, 1992 (when this action was commenced), plaintiff never contacted defendant, demanded rent, or sent real estate tax bills to defendant pursuant to paragraph 39 of the lease. Under these circumstances, it is manifest that the trial court’s determination that the defense of surrender had been established was neither irrational nor contrary to the weight of the evidence (see, Riverside Research Inst. v KMGA, Inc., 68 NY2d, supra; NHS Natl. Health Servs. v Kaufman, 250 AD2d 528). While defendant failed to plead this affirmative defense in its answer, the court properly permitted defendant to conform the pleadings to the proof (see, CPLR 3025 [b]; Murray v City of New York, 43 NY2d 400, 405; Weinstein Enters. v Cappelletti, 217 AD2d 616). Given plaintiffs involvement in the subject building’s rental and subsequent surrender, and the deposition during the litigation of three witnesses respecting matters directly relevant to the defense of surrender, defendant’s ultimate assertion of the defense cannot have come as a surprise to plaintiff.
While we conclude that the dismissal of the complaint was *474independently justified by the evidence establishing the defense of surrender, we note that the order of dismissal is additionally justified upon the alternative ground, also established sufficiently by the trial evidence, that defendant had been constructively evicted from the demised premises during the period for which rent was sought. In this connection, the trial court properly concluded based upon trial evidence that the premises were affected and ultimately rendered untenantable by structural defects which it was and had been plaintiff landlord’s responsibility to repair (see, 2 Rasch, Landlord and Tenant—Summary Proceedings § 19:11, at 82 [Dolan 4th ed]; see also, 101 Fleet Place Assocs. v New York Tel. Co., 197 AD2d 27, appeal dismissed 83 NY2d 962).
We have reviewed plaintiff’s remaining claims, particularly those respecting the manner in which the trial was conducted, and find them to be unavailing. Concur—Williams, J. P., Wallach, Andrias and Saxe, JJ.