“A foreclosure action is equitable in nature and triggers the equitable powers of the court” (Mortgage Elec. Registration Sys., Inc. v Horkan, 68 AD3d 948, 948 [2009]; see Norstar Bank v Morabito, 201 AD2d 545, 546 [1994]). Pursuant to CPLR 5015 (a), “ ‘[t]he court which rendered a judgment or order may relieve a party from it upon such terms as may be just’ ” (Katz v Marra, 74 AD3d 888, 890 [2010], quoting CPLR 5015 [a]; see Woodson v Mendon Leasing Corp., 100 NY2d 62, 68 [2003]). A defendant seeking to vacate a default in answering or appearing pursuant to CPLR 5015 (a) (1) must demonstrate a reasonable excuse for the default and a potentially meritorious defense to the action (see Pursoo v Ngala-El, 89 AD3d 712 [2011]; Citimortgage, Inc. v Brown, 83 AD3d 644, 645 [2011]). The court has the discretion to accept law office failure as a reasonable excuse (see CPLR 2005; Kohn v Kohn, 86 AD3d 630 [2011]; Campbell-Jarvis v Alves, 68 AD3d 701, 702 [2009]). Here, the detailed and uncontroverted affidavit of the defendant Neil Luden set forth a reasonable excuse for the defendants’ default (see Papandrea v Acevedo, 54 AD3d 915, 916 [2008]). He explained, inter alia, that he promptly retained legal counsel after being served with the summons and complaint, and that the attorney prepared an answer which the defendants signed, but, unbeknownst to the defendants, the attorney failed to file and serve the answer *702until some two months later resulting in the answer being returned as untimely by the plaintiffs counsel. Furthermore, the defendants demonstrated that they had a potentially meritorious defense based upon the defense of payment, as well as upon the purported misapplication of the defendants’ payments by the loan servicer.
The plaintiffs remaining contentions either are without merit or have been rendered academic in light of our determination.
Accordingly, the Supreme Court improvidently exercised its discretion in denying the defendants’ motion to vacate the judgment of foreclosure and sale entered November 21, 2005, entered upon their default in answering or appearing in the action. Dillon, J.E, Dickerson, Eng and Leventhal, JJ., concur.