— In an action to foreclose a mortgage, the plaintiff appeals, as limited by its brief, from so much of an order of the Supreme Court, Westchester County (Marbach, J.), dated March 29, 1990, as denied its motion to confirm a Referee’s report to the effect of directing the Referee to recompute the amount of interest *806owing to the plaintiff at the contract rate until the maturity date of the mortgage and at the statutory rate of 9% thereafter.
Ordered that the order is reversed insofar as appealed from, on the law, with costs, the plaintiff’s motion to confirm the Referee’s report is granted, and the matter is remitted to the Supreme Court, Westchester County, for further proceedings consistent herewith.
It is well established that when a contract provides for interest to be paid at a specified rate until the principal is paid, the contract rate of interest, rather than the statutory rate set forth in CPLR 5004, governs until the payment of the principal or until the contract is merged into a judgment (see, O’Brien v Young, 95 NY 428; Valloni v Crisona, 170 AD2d 596; Slutsky v Blooming Grove Inn, 147 AD2d 208; Ward v Walkley, 143 AD2d 415; Citibank v Liebowitz, 110 AD2d 615; Schwall v Bergstol, 97 AD2d 540; Astoria Fed. Sav. & Loan Assn. v Rambalakos, 49 AD2d 715; Stull v Joseph Feld, Inc., 34 AD2d 655).
Under the circumstances, it was error for the court to reject the Referee’s computation and to award interest only at the statutory rate rather than the contract rate for the period following the maturity date. Here, the underlying debt is evidenced by a note executed contemporaneously with the mortgage, as well as a modification and extension agreement which provided specifically that, in the event of a default, the interest payable was to be 4ti% over the prime rate. As such, the contract rate, rather than the statutory rate, governs the rate of interest until the debt merges into a judgment or is paid. Thompson, J. P., Miller, Pizzuto and Santucci, JJ., concur.