*769OPINION OF THE COURT
Bellacosa, J.Plaintiff, a junior mortgagee, pursued surplus moneys resulting from a senior mortgagee’s foreclosure proceedings and sale. The primary issue is whether that constitutes a foreclosure action, triggering the strictures of RPAPL 1301 (3) and, consequently, precluding the junior mortgagee from subsequently suing a mortgagor for the balance on a loan note, unless leave of the court is obtained. A parallel issue is whether the senior mortgagee’s foreclosure action itself interposes the strictures of RPAPL 1301 (3) against subordinate lienholders, requiring them, in any event, to obtain a court’s permission before commencing any legal action.
We hold that plaintiff’s application for the surplus moneys does not constitute an independent foreclosure "action” within the meaning and operation of RPAPL 1301 (3) and that, therefore, plaintiff did not need court permission to subsequently sue defendant Dann. We also conclude that RPAPL 1301 (3) is debt specific and mortgagee specific. Consequently, the senior mortgagee’s foreclosure action did not require the junior mortgagee plaintiff to seek the court’s permission before suing defendant mortgagor on its separate debt. Thus, we affirm the order of the Appellate Division.
In February 1989, defendant Dann borrowed money from plaintiff Central Trust Co., now known as Manufacturers and Traders Trust Co. (hereinafter MTT). Dann secured the loan with a mortgage on his real property located in Steuben County, New York. The MTT mortgage was subordinate to a first mortgage held by Monroe Savings Bank.
*770Dann defaulted on both obligations. In October 1989, Monroe started a foreclosure proceeding naming both Dann and Central Trust as defendants. Central Trust was named due to its subordinate lienholder status. The property was sold at public auction. After Monroe was fully paid, a surplus of $39,874.57 remained on deposit with the Steuben County Clerk.
The New York State Tax Commission moved in Monroe’s foreclosure action for an order to confirm the Referee’s Report of Sale and to distribute the surplus. MTT made its second mortgagee claim to the surplus on or about April 3, 1991. Supreme Court ordered that the State Tax Commission be paid in full from the surplus and that the balance ($39,481.32) be paid to MTT as the next lien in priority. That was done.
MTT then sued Dann in the instant action for the balance of the second mortgage loan. Dann did not dispute the debt’s existence or the amount owed, but he answered with an RPAPL 1301 affirmative defense and even sought a refund of the surplus money paid to MTT to offset the debt. MTT moved for summary judgment.
Supreme Court granted MTT’s motion, holding that (1) plaintiff MTT "did not commence any action to foreclose”, and (2) RPAPL 1301 did not apply to plaintiff. The Appellate Division unanimously affirmed. This Court granted defendant Dann leave to appeal, and we now affirm.
This case and appeal begin with RPAPL 1301 (3), which provides:
"While the action is pending or after final judgment for the plaintiff therein, no other action shall be commenced or maintained to recover any part of the mortgage debt, without leave of the court in which the former action was brought.”
Appellant Dann argues that the junior mortgagee’s application for the surplus moneys is the legal and functional equivalent of a mortgage foreclosure "action” within the meaning of the statute. Thus, defendant contends that MTT elected its equitable remedy and was barred from commencing a separate action at law, without leave of court, for the balance due on its debt from Dann. Secondly, defendant argues that, even absent plaintiff’s application for the surplus, the strictures of RPAPL 1301 (3) are applicable. In this regard, defendant contends that entry of final judgment in Monroe’s (the senior mortgagee’s) foreclosure action barred all other mortgagees *771from commencing any legal actions without court approval. Defendant argues that the statute’s purpose — to prevent duplicative, vexatious litigation (Stein v Nellen Dev. Corp., 123 Misc 2d 268, 270) — could be served only by such an interpretation. Finally, defendant contends that plaintiff could have proceeded in equity to obtain a deficiency judgment in the senior mortgagee’s foreclosure action. On this basis, defendant argues that Wyckoff v Devlin (12 Daly 144 [Ct Common Pleas 1883]) is wrongly decided and ought not be adopted or followed by this Court, though it deals with almost identical facts and a still viable and pertinent rationale, contrary to defendant’s position.
MTT asserts that obtaining surplus moneys derived from a senior mortgagee’s foreclosure proceeding does not constitute a foreclosure proceeding within RPAPL 1301 (3). Plaintiff additionally urges that the constraints of RPAPL 1301 (3) are not applicable to other mortgagees who did not initiate or obtain judgments in actual statutory foreclosure or legal proceedings. MTT claims that the statute’s plain wording, its legislative history, and precedential support should lead to affirmance of both lower courts.
Additionally, plaintiff refutes defendant’s argument that a senior mortgagee’s foreclosure judgment may serve as the predicate for a junior mortgagee’s deficiency judgment, thus, also blocking the instant action. Plaintiff asserts that (1) a deficiency judgment can be obtained only by a foreclosure plaintiff who has obtained its own judgment (see, RPAPL 1371 [3]; Feiber Realty Corp. v Abel, 265 NY 94); (2) a final judgment is indispensable to determining the amount due in deficiency; (3) plaintiff could not have obtained complete relief in equity under the circumstances of this case without actually instituting its own foreclosure proceeding; and (4) the rationale of Wyckoff v Devlin (12 Daly 144, supra) ought to be applied here.
Appellant’s argument that the constraints of RPAPL 1301 (3) broadly apply to other than the foreclosure mortgagee plaintiff cannot prevail against the plain language of the statute, its underlying purpose and valid precedents. RPAPL 1301 (3), by its terms, is mortgagee specific and debt specific, directing that "[wjhile the action is pending or after final judgment for the plaintiff therein, no other action shall be commenced * * * to recover any part of the mortgage debt” (emphasis added). Significantly, the language specifies "the” action on "the”, not just any, mortgage debt.
*772Consonant with the statute’s plain wording, we have interpreted the statute to be debt and mortgagee specific. Notably, in explaining the purpose of section 1628 of the Code of Civil Procedure — the precursor to RPAPL 1301 (3) — we stated: "The object of the statute is to shield the mortgagor from the expense and annoyance of two independent actions at the same time with reference to the same debt” (Reichert v Stilwell, 172 NY 83, 88 [emphasis added]). Our interpretation also serves the legislative purpose of the statute to avoid inappropriate duplicative and vexatious litigation by the same party (see, Meehan, Practice Commentaries, McKinney’s Cons Laws of NY, Book 49-V2, RPAPL 1301, 1995 Pocket Part, at 5). In sum, the senior mortgagee’s pursuit of its equitable remedy against Dann did not redound to Dann’s benefit to subordinate or countermand the plaintiff junior mortgagee’s capacity to sue on its separate and distinct mortgage debt.
We, likewise, are unpersuaded by appellant’s argument that plaintiff’s application for the surplus moneys, derived from the senior mortgagee’s foreclosure sale, constitutes a foreclosure "action” within the meaning of RPAPL 1301 (3). In Wyckoff v Devlin (12 Daly 144, supra), the court held that the predecessor statute of RPAPL 1301 (3) did not prohibit a junior mortgagee, who had filed a claim to surplus moneys arising from a senior mortgagee’s foreclosure and who had been a party to the proceeding for the distribution of the surplus, from commencing its own action, without leave of court, to recover the debt secured by the junior mortgage. The court stated the statute "was never intended to apply to any case except where a judgment for deficiency could be obtained in the proceedings [brought by plaintiff] to enforce the lien of the mortgage” (Wyckoff v Devlin, id., at 148).
Significantly, the court reasoned that in a surplus proceeding, unless the surplus equalled or exceeded the junior mortgagee’s claim, the junior mortgagee could not obtain all the relief to which it was entitled and could not obtain a deficiency judgment in that proceeding (see, id., at 148-149). Thus, the court concluded that the statute’s strictures were not triggered by the junior mortgagee’s mere involvement in a "surplus money-priority” proceeding.
Defendant would reject the reasoning and neutralize the venerable precedent (Wyckoff v Devlin, 12 Daly 144, supra) by arguing that plaintiff could have obtained a deficiency judgment in the senior mortgagee’s proceeding. Defendant’s argu*773ment is not persuasive, however, because the court in that case did not rely, as defendant contends, on the notion that plaintiff could never obtain a deficiency judgment in a senior mortgagee’s foreclosure proceeding. The Wyckoff court did not address that question, and resolution of that issue was not necessary to that court’s holding. Rather, the court focused on the fact that in the "action” in which the junior mortgagee was fully involved — the surplus money proceeding — no deficiency judgment could be obtained. We agree only that if in that proceeding — the one in which plaintiff took the initiative and participated — the lienholder could not seek a deficiency judgment and be made whole, then the strictures of RPAPL 1301 (3) do not apply. Here, as in Wyckoff, plaintiff could not have obtained a deficiency judgment in the surplus money proceeding — the only proceeding in which plaintiff participated — and, accordingly, plaintiff is not barred from suing on the note. Consequently, we need not reach and do not resolve the issue of whether plaintiff could have sought a deficiency judgment in the senior mortgagee’s foreclosure proceeding.
In sum, given the debt specific and mortgagee specific nature of RPAPL 1301 (3) and the limitations on plaintiff’s ability to recover in the surplus money proceeding, plaintiff was not required to first obtain the court’s permission to bring the instant action to recover the balance of the debt defendant owes to it. We have considered appellant’s other contentions and conclude that they are without merit.
Accordingly, the order of the Appellate Division should be affirmed, with costs.
Chief Judge Kaye and Judges Simons, Titone, Smith, Levine and Ciparick concur.
Order affirmed, with costs.