Matthew Kundinger (Appellant) enrolled a default judgment against Louis and Linda Frazer (the Frazers) before the Frazers closed a refinance mortgage with Matrix Financial Services Corporation (Matrix). In Matrix’s foreclosure action, the master-in-equity granted Matrix equitable subrogation, giving the refinance mortgage priority over Appellant’s judgment lien. We certified the case pursuant to Rule 204(b), *136SCACR, and reversed in Matrix Financial Services Corp. v. Frazer, No. 26859, 2010 WL 3219472 (S.C.Sup.Ct. Aug.16, 2010). This Court granted a petition for rehearing and we now withdraw that opinion and substitute this opinion, which also reverses the master-in-equity’s grant of equitable subrogation.
Facts/Procedural Background
In 1998, Appellant brought suit against the Frazers in California. In 2000, the Frazers moved to South Carolina, and defaulted in Appellant’s California lawsuit.
In January 2001, the Frazers purchased a home in Green-ville County. That mortgage was assigned to Matrix in June 2001. In September 2001, Matrix and the Frazers entered into a loan commitment to refinance the January 2001 mortgage. A title search was conducted on September 18, 2001. The parties closed the refinance loan on November 26, 2001, but the new mortgage was not recorded until April 3, 2002.
Meanwhile, on September 4, 2001, Appellant obtained a default judgment against the Frazers in California, and enrolled that judgment in Greenville County on October 31, 2001.
The Frazers filed bankruptcy, and Matrix sought to foreclose its November 2001 refinance mortgage. Appellant counterclaimed, alleging his judgment had priority over Matrix’s mortgage because it had been recorded first. Matrix, attempting to gain the primary priority position, then sought to have the refinance mortgage equitably subrogated to the rights of the January 2001 mortgage. The master-in-equity granted Matrix’s request, and Appellant appeals that order.
Issues
I. Did the master-in-equity err in granting Matrix equitable subrogation to the rights of the January 2001 mortgage, giving Matrix priority over Appellant’s judgment lien?
II. Does the doctrine of unclean hands prevent Matrix from receiving the remedy of equitable subrogation?
*137Analysis
I. Equitable Subrogation
Appellant argues the master-in-equity erred in holding Matrix was entitled to equitable subrogation. We agree.
The requirements a mortgagee must meet to qualify for equitable subrogation are: (1) the party claiming subrogation has paid the debt; (2) the party was not a volunteer, but had a direct interest in the discharge of the debt or lien; (3) the party was secondarily liable for the debt or for the discharge of the lien; (4) no injustice will be done to the other party by the allowance of equitable subrogation; and (5) the party asserting the doctrine did not have actual notice of the prior mortgage. Dedes v. Strickland, 307 S.C. 155, 158, 414 S.E.2d 134, 136 (1992).
In Dedes, a bank refinanced its initial mortgage and sought to be equitably subrogated to the rights of that mortgage to gain priority over the rights of an intervening mortgagee. The Court held that the bank could not meet the elements of equitable subrogation because it merely paid “itself [the] outstanding debt by refinancing the balance owed” and had no “direct interest necessitating discharge of the debt....” Id. at 159, 414 S.E.2d at 136. The Court further stated, “The record is silent as to what secondary liability [the bank] could have had for [the mortgagor’s] debt secured by its own first mortgage lien.” Id. While the Dedes Court appears to have conflated the requirements of secondary liability and a direct interest in discharging the debt,1 the heart of its reasoning was that the bank could not be subrogated to the rights of its *138own prior mortgage. This conclusion comports with the general view that equitable subrogation contemplates a third party satisfying the original mortgage, not the same party to whom the original debt is owed. See Restatement (Third) of Property (Mortgages) § 7.6 cmt.e (1995) (“Obviously subrogation cannot be involved unless the second loan is made by a different lender than the holder of the first mortgage; one cannot be subrogated to one’s own previous mortgage.”); Black’s Law Dictionary (9th ed. 2009) (“Subrogation: The substitution of one party for another whose debt the party pays, entitling the paying party to rights, remedies, or securities that would otherwise belong to the debtor.”).
Thus, equitable subrogation is simply not a remedy available to a lender that refinances the original debt owed to it. This seems to yield the proper result, as opposed to the mangled logic that comes about when reasoning that a lender refinancing the original debt owed to it cannot prove secondary liability or a direct interest in discharging the debt. Matrix is not asserting priority under a theory of replacement and modification. Matrix expressly pled equitable subrogation in its reply to Appellant’s counterclaim. Both Dedes, controlling South Carolina precedent, and section 7.6 of the Restatement stand for the proposition that a lender that refinances its own debt is not entitled to equitable subrogation. We do not decide whether a lender that refinances its own debt could attain priority under the theory of replacement and modification illustrated in section 7.3 of the Restatement (Third) of Property (Mortgages).
II. Unclean Hands
Appellant also argues Matrix is not entitled to an equitable remedy because it closed the refinance loan unlawfully, and thus has unclean hands. We do not believe the doctrine of unclean hands is the appropriate basis for resolution of this case. However, we do agree that even if Matrix met the requirements for equitable subrogation, Matrix would be precluded from receiving that remedy because of its unauthorized practice of law.
All real estate and mortgage loan closings must be supervised by an attorney. Doe v. McMaster, 355 S.C. 306, *139585 S.E.2d 773 (2003); State v. Buyers Serv. Co., 292 S.C. 426, 357 S.E.2d 15 (1987). Performing a title search, preparing title and loan documents, and closing a loan without the supervision of an attorney constitutes the unauthorized practice of law. Buyers Serv., 292 S.C. at 430-34, 357 S.E.2d at 17-19.
In Wachovia Bank v. Coffey, 389 S.C. 68, 698 S.E.2d 244 (Ct.App.2010), Wachovia closed a home equity loan without the supervision of an attorney and later instituted foreclosure proceedings. Our court of appeals held that Wachovia, having committed the unauthorized practice of law in closing the loan without attorney supervision, came to the court with unclean hands and thus was barred from seeking equitable relief. In so holding, the court of appeals said:
The unauthorized practice of law is inherently prejudicial to not only the parties involved in the instant transaction but also to the public at large for the reason so cogently stated in Buyers:
The reason preparation of instruments by lay persons must be held to constitute the unauthorized practice of law is not for the economic protection of the legal profession. Rather, it is for the protection of the public from the potentially severe economic and emotional consequences which may flow from erroneous advice given by persons untrained in the law.
Coffey, 389 S.C. at 76, 698 S.E.2d at 248 (citing State v. Buyers Serv. Co., 292 S.C. 426, 431, 357 S.E.2d 15, 18 (1987)).
Similarly, in this case Matrix hired LandAmerica OneStop to perform the title search, prepare the documents, and close the refinance loan — all admittedly without the supervision of a licensed attorney. Thus, Matrix committed the unauthorized practice of law in closing the refinance mortgage, clearly violating South Carolina law.2 Matrix now comes to this *140Court, seeking equitable relief, based upon a mortgage contract it entered into in violation of the laws of this state.
This Court has previously held the presence of attorneys in real estate loan closings is for the protection of the public and that “protection of the public is of paramount concern” in loan closings. Buyers Serv., 292 S.C. at 433, 357 S.E.2d at 19. Enforcing this requirement will come as no surprise to any lender. Lenders cannot ignore established laws of this state and yet expect this Court to overlook their unlawful disregard. We take this opportunity to definitively state that a lender may not enjoy the benefit of equitable remedies when that lender failed to have attorney supervision during the loan process as required by our law. We apply this ruling to all filing dates after the issuance of this opinion.
Conclusion
For the above reasons, we hold Matrix is not entitled to equitable subrogation. The master-in-equity’s order is
REVERSED.
BEATTY, J., and Acting Justice JOHN H. WALLER, JR., concur. KITTREDGE, J., concurring in result in a separate opinion. PLEICONES, J., dissenting in a separate opinion.. The logic surrounding the elements of secondary liability and direct interest has been tortured in our case law because the current definition does not distinguish between a party who pays off the prior debt and a party who advances funds to the debtor for the purpose of paying off the prior debt. Judge Howard's concurrence in Dodge City of Spartanburg, Inc. v. Jones, 317 S.C. 491, 454 S.E.2d 918 (Ct.App.1995), explains the difficulties our courts have encountered concerning this issue. While we disagree with Judge Howard’s conclusion that the lender in Dodge City could receive equitable subrogation when it refinanced the debt already owed to it, we agree with his analysis that a lender who either pays the debt itself or provides the debtor funds with the understanding the debtor will satisfy the obligation may seek equitable subrogation.
. Buyers Service established in 1987 that attorney supervision is required for the four steps in the residential real estate loan and mortgage process: preparation of deeds, notes, and other instruments; preparation of title abstracts; the closing; and recording the instruments. 292 S.C. at 430-34, 357 S.E.2d at 17-19. No language, analysis, or discussion in Buyers Service indicates the Court intended to limit the holding to purchase money mortgages. In Doe v. McMaster, the petitioner suggested to the Court that Buyers Service's holding did not apply *140because the buyer and lender were refinancing an existing mortgage rather than purchasing new property. 355 S.C. at 312, 585 S.E.2d at 776. The Court said, "This distinction is without significance” because "[i]n refinancing a real estate mortgage the four steps in the initial purchase still exist.” id. Doe v. McMaster did not change the landscape regarding refinance loans, but simply stated the existing law.