In an action to foreclose a consolidated mortgage, the plaintiff appeals, as limited by its brief, from (1) so much of an order of the Supreme Court, Kings County (Schack, J.), dated July 1, 2011, as denied that branch of its motion which was pursuant to RPAPL 1321 for an order of reference and, by permission, from so much of the same order as, sua sponte, directed dismissal of the complaint with prejudice, cancellation of a certain notice of pendency filed against the subject property, and a hearing on the issue of sanctions against it, and (2) so much of an order of the same court dated December 22, 2011, as, after a hearing, directed it to pay a sanction in the sum of $10,000 to the Lawyers’ Fund for Client Protection, and the nonparty Shapiro, DiCaro & Barak, LLE] separately appeals, as limited by its brief, from so much of the order dated December 22, 2011, as directed it to pay a sanction in the sum of $5,000 to the Lawyers’ Fund for Client Protection.
Ordered that the order dated July 1, 2011, is reversed insofar as appealed from, on the law, without costs or disbursements, and that branch of the plaintiffs motion which was pursuant to RPAPL 1321 for an order of reference is granted; and it is further,
Ordered that the order dated December 22, 2011, is reversed, on the law, without costs or disbursements; and it is further,
Ordered that the matter is remitted to the Supreme Court, *816Kings County, for further proceedings consistent herewith before a different Justice.
The defendant Eileen N. Taher defaulted on her consolidated mortgage loan. The plaintiff, the alleged holder of the consolidated mortgage and the consolidated note, commenced this action to foreclose the consolidated mortgage. None of the defendants appeared in the action or answered the complaint. In June 2009, the plaintiff moved, inter alia, pursuant to RPAPL 1321 for an order of reference.
In an order dated July 1, 2011, the Supreme Court denied that branch of the plaintiff’s motion which was pursuant to RPAPL 1321 for an order of reference and, sua sponte, directed dismissal of the complaint with prejudice, cancellation of a certain notice of pendency filed against the subject property, and a hearing on the issue of sanctions against the plaintiff and the law firm representing the plaintiff, the nonparty Shapiro, DiCaro & Barak, LLP (hereinafter the law firm) (see HSBC Bank USA N.A. v Taher, 32 Misc 3d 1208[A], 2011 NY Slip Op 51208[U] [Sup Ct, Kings County 2011]). The court concluded that sua sponte dismissal of the complaint was warranted because the plaintiff lacked standing to commence this action. The court determined that a hearing on the issue of sanctions was appropriate because, among other things, its independent research had revealed that the plaintiff and the law firm had relied upon a “robosigner” employed by the plaintiff’s loan servicer.
In an order dated December 22, 2011, following a hearing, the Supreme Court directed the plaintiff to pay a sanction in the sum of $10,000 to the Lawyers’ Fund for Client Protection and directed the law firm to pay a sanction in the sum of $5,000 to the Lawyers’ Fund for Client Protection (see HSBC Bank USA, N.A. v Taher, 34 Misc 3d 1201[A], 2011 NY Slip Op 52317[U] [Sup Ct, Kings County 2011]). The plaintiff and the law firm separately appeal.
The Supreme Court erred in denying that branch of the plaintiffs motion which was pursuant to RPAPL 1321 for an order of reference. In support of the motion, the plaintiff submitted documentary proof showing, inter alia, that the defendants failed to answer the complaint within the time allowed, that it was the holder of the consolidated mortgage and consolidated note, evidence of the mortgagor’s default, and that, as a preliminary step in obtaining a judgment of foreclosure, the appointment of a referee to compute the amount due on the consolidated mortgage would be proper (see RPAPL 1321; Bank of N.Y. v Alderazi, 99 AD3d 837, 837-838 [2012]; Aurora Loan Servs., *817LLC v Shahmela Shah Sookoo, 92 AD3d 705, 707 [2012]; Emigrant Mtge. Co., Inc. v Fisher, 90 AD3d 823, 824 [2011]).
The Supreme Court abused its discretion in, sua sponte, directing dismissal of the complaint with prejudice and cancellation of the notice of pendency (see Bank of N.Y. v Alderazi, 99 AD3d at 838; Bank of Am., N.A. v Bah, 95 AD3d 1150, 1151 [2012]; Aurora Loan Servs., LLC v Shahmela Shah Sookoo, 92 AD3d 705 [2012]; US Bank, N.A. v Guichardo, 90 AD3d 1032 [2011]; US Bank, N.A. v Emmanuel, 83 AD3d 1047 [2011]; HSBC Bank USA, N.A. v Valentin, 72 AD3d 1027 [2010]). “A court’s power to dismiss a complaint, sua sponte, is to be used sparingly and only when extraordinary circumstances exist to warrant dismissal” (U.S. Bank, N.A. v Emmanuel, 83 AD3d at 1048; see Aurora Loan Servs., LLC v Sobanke, 101 AD3d 1065, 1066 [2012]; Rienzi v Rienzi, 23 AD3d 450 [2005]). Here, the Supreme Court was not presented with any extraordinary circumstances warranting sua sponte dismissal of the complaint. Moreover, as the defendants failed to answer the complaint and did not make pre-answer motions to dismiss the complaint, they waived the defense of lack of standing (see Bank of N.Y. v Alderazi, 99 AD3d at 838; CitiMortgage, Inc. v Rosenthal, 88 AD3d 759, 761 [2011]; U.S. Bank, N.A. v Emmanuel, 83 AD3d at 1048-1049). Furthermore, a party’s lack of standing does not constitute a jurisdictional defect and does not warrant sua sponte dismissal of a complaint by the court (see Bank of N.Y. v Alderazi, 99 AD3d at 838; U.S. Bank, N.A. v Emmanuel, 83 AD3d at 1048-1049).
In addition, the Supreme Court abused its discretion in directing a hearing on the issue of sanctions and, thereafter, directing the plaintiff and the law firm to pay sanctions (see 22 NYCRR 130-1.1, 130-1.3).
We note that in U.S. Bank, N.A. v Emmanuel (83 AD3d 1047 [2011]), this Court reversed an order issued by the same Justice assigned to this case which similarly directed dismissal of a complaint in a mortgage foreclosure action, sua sponte, for lack of standing. In Emmanuel, we held, as we reiterate here, that a mortgagee’s alleged lack of standing is not an “extraordinary circumstance” that warrants sua sponte dismissal of a foreclosure complaint. Indeed, lack of standing is an affirmative defense which is waived if not raised by the defendant in either an answer or a pre-answer motion to dismiss (see Wells Fargo Bank Minn., N.A. v Mastropaolo, 42 AD3d 239, 242 [2007]). Since Emmanuel was decided approximately two months before the Supreme Court improperly directed dismissal of the complaint in the instant action, sua sponte, for lack of standing, *818we take this opportunity to remind the Justice of his obligation to remain abreast of and be guided by binding precedent. We also caution the Justice that his independent internet investigation of the plaintiffs standing that included newspaper articles and other materials that fall short of what may be judicially noticed, and which was conducted without providing notice or an opportunity to be heard by any party (see HSBC Bank USA, N.A. v Taher, 32 Misc 3d 1208[A], 2011 NY Slip Op 51208[U], *4 [2011]), was improper and should not be repeated.
Under these circumstances, we deem it appropriate to remit the matter to the Supreme Court, Kings County, for further proceedings before a different Justice. Dillon, J.E, Angiolillo, Leventhal and Miller, JJ., concur. [Prior Case History: 32 Misc 3d 1208(A), 2011 NY Slip Op 51208(U).]