Judgment unanimously reversed on the law without costs and matter remitted to Supreme Court for further proceedings in accordance with the following Memorandum: Defendants appeal from an order granting plaintiff’s cross motion for summary judgment on its cause of action for foreclosure of two mortgages. Plaintiff was lessee and defendants Ginter and Englert were lessors under certain ground and improvement leases on land and a building used by plaintiff as a branch office. Plaintiff was the mortgagee of both the land and the building. Additionally, plaintiff was the holder of security interests in Ginter’s and Englert’s right to receive rent under the leases. Thus, plaintiff held security interests in its own obligations to pay rent. Both the mortgages and the security agreements precluded assignment of the landlord’s right to receive the rent. In contrast, the leases did not contain a prohibition against assignment of the landlord’s interest.
Supreme Court found that a stipulation entered into between Ginter and his wife in settlement of their matrimonial action assigned Ginter’s right to receive the rents under the relevant leases, and thus constituted a breach of the leases, the mortgages and the security agreements. We agree that the stipulation constituted a material breach of the terms of the mortgages and the security agreements. A stipulation of settlement, "definite and complete upon its face, and spread upon the record in open court constitute^] a valid and binding contract” (Term Indus. v Essbee Estates, 88 AD2d 823, 825). Despite the fact that Ginter was obligated to perform certain *948acts in the future in furtherance of the stipulation, the parties disposed of all the material terms of their agreement in the stipulation and it was not, therefore, a mere "agreement to agree” (cf., Martin Delicatessen v Schumacher, 52 NY2d 105, 109).
We disagree, however, with Supreme Court’s conclusion that Ginter breached the terms of the leases. We thus disagree with the court’s finding that plaintiff had the right to terminate the leases on the basis that, under the language of the security agreements, plaintiff assumed defendants’ "entire position as landlord”. That language did not give plaintiff the right to terminate the leases. Although it is true that the relationship between a mortgagor and mortgagee is not strictly fiduciary, the courts carefully scrutinize transactions between them (Reich v Cochran, 213 NY 416, 424). The documents at issue do not authorize plaintiff to defeat the interests of the lessors. The security agreements merely gave plaintiff the right to sue for rents and enforce the leases in the event of a mortgage default and direct the manner in which rents were to be collected and applied to the debt. Indeed, it would be illogical to conclude that the parties intended that the mortgagee be placed in a position to put the collateral at risk by eliminating the properties’ income stream. The stated purpose of the agreement was to provide "additional security” for payment of the underlying note. That is consistent with the principle that "[a] mortgagee’s powers should be exercised to secure the underlying debt” (Trajam Realty Corp. v Hirschfeld, 87 AD2d 468, 471, affd 59 NY2d 613).
Inasmuch as the mortgages were breached, plaintiff, as mortgagee, had the right to accelerate the underlying debt; however, because the leases were not breached, plaintiff had no right to discontinue payment of rent. The rents due under the leases may be offset against the amount due under the mortgage (see, Getlan v Hofstra Univ., 41 AD2d 830, appeal dismissed 33 NY2d 646). We reverse the judgment of foreclosure, therefore, and remit the matter to Supreme Court for an immediate trial (see, CPLR 3212 [c]) to determine the amounts due under the leases and to grant a judgment of foreclosure for the amount due under the mortgage less the amounts due under the leases. We reject defendants’ contention that, because of plaintiff’s default under the leases, they are entitled to accelerate the leasehold obligations. (Appeal from Judgment of Supreme Court, Onondaga County, Mordue, J.—Mort*949gage Foreclosure.) Present—Denman, P. J., Pine, Fallon and Boehm, JJ.