
    Wells Fargo Bank Minnesota, National Association, as Trustee under the Pooling and Servicing Agreement Dated September 1, 1999, Home Equity Loan Asset Backed Certificate Series 1999-3, Appellant, v Robert Garrasi, Respondent.
    [914 NYS2d 790]
   Stein, J.

Appeal from an order of the Supreme Court (Connolly, J.), entered April 27, 2010 in Albany County, which, among other things, granted summary judgment to defendant on his counterclaim.

In April 1999, a husband and wife executed two mortgage notes, one in the amount of $51,750 and the second in the amount of $13,800. The mortgage securing the $13,800 note was filed first and the mortgage securing the $51,750 note was filed immediately thereafter. Ultimately, Provident Bank became the holder of the $51,750 note and mortgage. Provident commenced foreclosure proceedings in 2002 without naming as a party or otherwise notifying the holder of the $13,800 mortgage. In 2004, Provident’s mortgage was foreclosed upon and the subject property was sold at public auction pursuant to a judgment of foreclosure and sale. Plaintiff was assigned the bid by Provident at auction and thereafter purchased the property and received a referee’s deed. Subsequently, the $13,800 mortgage was assigned to defendant.

Plaintiff commenced this action requesting, among other things, a judgment declaring that its mortgage had first priority over defendant’s mortgage and demanding that defendant either redeem the property or commence an action for foreclosure. Defendant interposed a counterclaim requesting, among other things, a judgment dismissing the complaint and recovery of the amount due on the $13,800 note and mortgage. Both parties then moved for summary judgment, each asserting that their mortgage had priority over the other. Supreme Court denied both motions, determining that the mortgages were of equal priority. Defendant subsequently moved again for summary judgment on different grounds and that motion was also denied. Eventually, defendant moved to amend his answer to assert various affirmative defenses. Plaintiff cross-moved for equitable relief, requesting that Supreme Court direct defendant to execute a discharge of the $13,800 mortgage so that the property could be sold and the proceeds distributed to the parties in their proportionate shares. Supreme Court denied defendant’s motion and plaintiffs cross motion. However, Supreme Court determined that, inasmuch as plaintiffs cross motion essentially sought a judgment disposing of the case, it was akin to a motion for summary judgment. The court, therefore, searched the record, granted judgment to defendant and directed plaintiff to sell the property and to pay defendant’s mortgage first in its entirety from the proceeds. Plaintiff now appeals and we affirm.

Plaintiff argues that Supreme Court erred when it granted judgment to defendant sua sponte without giving notice to plaintiff that it was considering such relief. Although a court may not generally grant summary judgment sua sponte in the absence of a motion pursuant to CPLR 3212 (see Ressis v Mactye, 98 AD2d 836, 837 [1983]; see generally Vinder v Showbran Leasing & Mgt., 298 AD2d 325, 326 [2002]), in certain circumstances, a court may grant such relief, even if it is not demanded, so long as there is no substantial prejudice to the adverse party (see Berle v Buckley, 57 AD3d 1276, 1277 [2008]; Ressis v Mactye, 98 AD2d at 837). In such cases, we have required that the court give notice to the parties that summary judgment is being considered as a remedy, so that they may develop evidence and offer proof in support of or in opposition to the motion (see Berle v Buckley, 57 AD3d at 1277; Barrett v Watkins, 52 AD3d 1000, 1003 [2008]; Ressis v Mactye, 98 AD2d at 837).

Here, Supreme Court determined that defendant was entitled to judgment in his favor because, even if the parties’ mortgages were initially contemporaneous and of equal priority (as that court concluded in determining the parties’ prior summary judgment motions), plaintiff’s mortgage was satisfied when it purchased the subject property at the foreclosure sale, leaving only defendant’s mortgage remaining. Indeed, it is well settled that plaintiff’s mortgage was extinguished when it purchased the subject property at the foreclosure sale (see Whitestone Sav. & Loan Assn. v Allstate Ins. Co., 28 NY2d 332, 336 [1971]). In the instant matter, defendant arguably raised this legal principle in his answer to the complaint and the parties have already had the opportunity to lay bare their proof in the context of the prior summary judgment motions. In that regard, Supreme Court could have reached the same result that plaintiff now challenges when it determined such motions. In addition, defendant argued, in response to plaintiffs current cross motion, that his mortgage should be paid in full and he articulated, as a basis for his position, the extinguishment of plaintiffs mortgage in his reply affidavit and at oral argument on the motions. At no time did plaintiff request an opportunity to submit additional proof in opposition. Even on appeal, plaintiff has failed to indicate what additional proof it would have submitted to Supreme Court had it been placed on notice that the court was considering its motion as one for summary judgment. In fact, as relevant here, the parties agree that no questions of fact remain. Under these particular circumstances, we cannot discern any purpose that would have been served by giving plaintiff notice of Supreme Court’s intent and there is no evidence that plaintiff has been substantially prejudiced by its determination (compare Ressis v Mactye, 98 AD2d at 837). Accordingly; we decline to disturb it.

Plaintiffs remaining contentions have been considered arid found to be unavailing.

Cardona, P.J., Mercure, Malone Jr. and Garry, JJ., concur. Ordered that the order is affirmed, with costs.  