Ordered that the order is affirmed insofar as appealed from, with costs.
Where the issue of standing is raised by a defendant, a plaintiff must prove its standing in order to be entitled to relief (see MLCFC 2007-9 Mixed Astoria, LLC v 36-02 35th Ave. Dev., LLC, 116 A.D.3d 745, 746 [2014]; Bank of N.Y. v Silverberg, 86 A.D.3d 274, 279 [2011]; U.S. Bank, N.A. v Collymore, 68 A.D.3d 752, 753 [2009]; Wells Fargo Bank Minn., N.A. v Mastropaolo, 42 A.D.3d 239, 242 [2007]). A plaintiff establishes its standing in a mortgage foreclosure action by demonstrating that, when the action was commenced, it was either the holder of, or the assignee of, the underlying note (see Wells Fargo Bank, N.A. v Rooney, 132 A.D.3d 980 [2015]; Deutsche Bank Natl. Trust Co. v Whalen, 107 A.D.3d 931, 932 [2013]; U.S. Bank, N.A. v Collymore, 68 AD3d at 753). "Either a written assignment of the underlying note or the physical delivery of the note prior to the commencement of the foreclosure action is sufficient to transfer the obligation, and the mortgage passes with the debt as an inseparable incident" (U.S. Bank, N.A. v Collymore, 68 AD3d at 754; see Deutsche Bank Trust Co. Ams. v Vitellas, 131 A.D.3d 52, 59 [2015]; Deutsche Bank Natl. Trust Co. v Whalen, 107 AD3d at 932; Bank of N.Y. v Silverberg, 86 AD3d at 281). However, on a defendant's motion for summary judgment, the burden is on the moving defendant to establish, prima facie, the plaintiff's lack of standing as a matter of law (see Flagstar Bank, FSB v Campbell, 137 A.D.3d 853 [2016]; BAC Home Loans Servicing, LP v Bixby, 135 A.D.3d 1009, 1010 [2016]; Bank of N.Y. Mellon v Green, 132 A.D.3d 706, 707 [2015]; U.S. Bank N.A. v Guy, 125 A.D.3d 845, 847 [2015]; Citibank, N.A. v Herman, 125 A.D.3d 587, 588-589 [2015]). "The prima facie showing which a defendant must make on a motion for summary judgment is governed by the allegations made by the plaintiff in the pleadings" (Citibank, N.A. v Herman, 125 AD3d at 589).
Here, the appellants failed to demonstrate their prima facie