
    Harry Scharaga et al., Respondents, v Allen Schwartzberg et al., Appellants.
   In a mortgage foreclosure action, the defendants appeal from an order of the Supreme Court, Suffolk County (Tanenbaum, J.), entered May 19, 1988, which denied their motion to dismiss the complaint pursuant to CPLR 3211 (a) (10), or, alternatively, to stay the action pursuant to CPLR 2201, and to direct the nonresident plaintiff to furnish security for costs pursuant to CPLR 8501 (a), and which granted the plaintiffs’ motion for the appointment of a Referee to compute the amount due under the mortgage and note.

Ordered that the order is modified, on the law, by deleting (1) the provision thereof which granted the plaintiffs’ motion for the appointment of a Referee and substituting therefor a provision denying that motion, and (2) deleting the provision thereof which denied that branch of defendants’ motion which was to compel the plaintiffs to furnish security for costs, and substituting therefor a provision granting that branch of the motion; as so modified, the order is affirmed, without costs or disbursements, and the matter is remitted to the Supreme Court, Suffolk County, for a determination of the amount of security for costs which should be posted.

The defendants claim that the court improperly granted the plaintiffs’ motion to appointment of a Referee. We agree. A reference to compute the amount due is prescribed only when the defendant is in default in answering the complaint within the time allowed, or the right of the plaintiff is admitted by the answer (see, RPAPL § 1321 [1]; 15 Carmody-Wait 2d, NY Prac § 92:189). At bar, the defendants were not in default, but timely appeared. Their motion, inter alia, to dismiss, had the effect of extending the time to answer (CPLR 3211 [f]). Accordingly, pursuant to the terms of RPAPL 1321 (1), it was error to grant the plaintiffs’ motion for the appointment of a Referee.

The court properly denied that branch of the defendants’ motion which was to dismiss for failure to join necessary parties pursuant to CPLR 1001 and 3211 (a) (10). RPAPL 1311 sets forth necessary defendants in a mortgage foreclosure proceeding. Such persons are those "whose interest is claimed to be subject and subordinate to the plaintiff’s lien” (RPAPL 1311). "The rationale for joinder of these interests derives from the underlying objective of foreclosure actions—to extinguish the rights of redemption of all those who have a subordinate interest in the property and to vest complete title in the purchaser at the judicial sale” (see, Polish Natl. Alliance v White Eagle Hall Co., 98 AD2d 400, 404). The right to redeem extends to those holding any legal or equitable interest in the property derived from the mortgagor (Polish Natl. Alliance v White Eagle Hall Co., supra, at 405). In other words, the purpose of a foreclosure sale is to end the right to redeem of all persons having interests in the property subject to the mortgage and to vest in the purchaser, upon the sale, "the title to the property as it stood at the time of the execution of the mortgage” (Osborne, Mortgages § 321, at 669 [2d ed]). Conversely, persons who own an interest in mortgaged premises paramount to the mortgagee are neither necessary nor proper parties to its foreclosure, since they "did not acquire their rights under the mortgagor or the mortgagee subsequent to the execution of the mortgage” (1 Wiltsie, Real Property Mortgage Foreclosure §401, at 685 [5th ed]). Accordingly, since those persons that the defendants claim are necessary to the instant action are indisputably prior owners, whose alleged title would be paramount and not subject to either parties’ interest, the 132 persons are not necessary defendants to the foreclosure proceeding. In any event, in a mortgage foreclosure action, the absence of a necessary defendant leaves that party’s rights unaffected by the judgment of foreclosure and sale (see, Polish Natl. Alliance v White Eagle Hall Co., supra, at 406). Thus, such a party would not be indispensable, and joinder would be unnecessary (Polish Natl. Alliance v White Eagle Hall Co., supra, at 406). Accordingly, even if the 132 persons were necessary defendants to the foreclosure action, they would not be necessary parties under CPLR 1001.

The defendants’ claim that the action should be stayed in the interest of justice is meritless. Finally, the plaintiffs, as nonresidents of this State, must furnish security for costs in compliance with CPLR 8501 (a). Rubin, J. P., Kooper, Sullivan and Balletta, JJ., concur.  