
6 So.3d 7 (2008)
Ex parte Theresa LAWSON d/b/a The Design Company.
(In re Theresa Lawson d/b/a The Design Company v. Brian Homes, Inc., et al.)
1060206.
Supreme Court of Alabama.
July 18, 2008.
*8 Gregory A. Reeves of Edwards, Mitchell & Reeves, Decatur; and Robert H. Harris of Harris, Caddell & Shanks, P.C., Decatur, for petitioner.
Guy V. Martin, Jr., of Martin, Rawson & Woosley, P.C., Birmingham, for respondents Wells Fargo Home Mortgage, Inc., Chase Manhattan Mortgage Corporation, Countrywide Home Loans, Inc., and Full Spectrum Lending, Inc.
BOLIN, Justice.
Theresa Lawson d/b/a The Design Company ("Lawson") petitioned this Court for a writ of certiorari to review the Court of Civil Appeals' opinion in Lawson v. Brian Homes, Inc., 6 So.3d 1 (Ala.Civ.App.2006). Lawson asked this Court to review whether the Court of Civil Appeals' opinion conflicts with prior decisions of this Court and the Court of Civil Appeals regarding equitable *9 subrogation. We granted the writ on this ground.

Facts and Procedural History
The Court of Civil Appeals' opinion sets out the facts as follows:
"Brian Homes, Inc. (`Brian Homes'), a homebuilding company, developed certain parcels of property in Madison County by building single-family residences on those parcels. On June 20, 2003, Brian Homes obtained a construction loan secured by a mortgage upon those parcels (`the senior mortgage') from New South Federal Savings Bank. Theresa Lawson, who does business as The Design Company (`Lawson'), performed subcontractor work for Brian Homes, installing carpet, tile, and marble flooring in numerous residences. In January 2004, the construction loan secured by the senior mortgage was paid in full with the proceeds of loans made on behalf of the ultimate occupiers of the constructed houses (`the purchasers') by Wells Fargo Home Mortgage, Inc.; Chase Manhattan Mortgage Corporation; Countrywide Home Loans, Inc.; and Full Spectrum Lending, Inc. (`the lenders').1 At the time that the construction loan was paid in full, no materialman's liens had been recorded as to any of the parcels. In fact, it is undisputed that the lenders had no notice of a junior or secondary lien at the time they provided the funds to satisfy the loan secured by the senior mortgage. Lawson perfected materialman's liens as to the seven parcels at issue during the spring of 2004, and in August 2004 she filed multiple actions against the lenders and the purchasers to enforce those liens. The time line of each of the seven actions is marginally different from the others, but the priority issues are the same in all seven cases.
"In each of the cases, the sequence of events is substantially the same: New South Federal Savings Bank held a first mortgage on each parcel on which a house was to be built by Brian Homes and its subcontractors. Lawson then provided material and labor to complete the flooring as to each house. Shortly after the completion of Lawson's work, Brian Homes sold each separate parcel of property to one of the purchasers, who acted in good faith and had no notice of the existence of Lawson's potential lien. After Brian Homes had failed to pay Lawson with proceeds from those sales, Lawson attempted to perfect liens as to each parcel.2 The filing and recording of those liens occurred after the recording of the senior mortgage and after the recording of the lenders' mortgages. In each action, Lawson asserted that her lien took priority over the lenders' mortgages pursuant to § 35-11-211, Ala.Code 1975, and she requested that the trial court order the sale of each of those parcels in order to pay Lawson the amount due on each lien.
"The lenders filed summary-judgment motions in each of Lawson's actions to enforce the liens; in those motions, the lenders argued that either Lawson's liens did not have priority over the lenders' mortgages or that the lenders were due to be equitably subrogated as to the senior mortgage. Lawson, relying on this court's decision in Collateral Investment Co. v. Pilgrim, 421 So.2d 1274 (Ala.Civ.App.1982), opposed the lenders' motions and filed her own summary-judgment motion in each action.
"The trial court entered summary judgments in favor of the lenders and the purchasers in all of Lawson's lien-enforcement actions, noting that Lawson might otherwise have priority pursuant to § 35-11-211, Ala.Code 1975 (the materialman's *10 lien priority statute), but that, in each case at issue, the lenders were equitably subrogated to the first-priority position of the senior mortgage.3 Lawson appeals and asserts that the trial court erred in failing to correctly apply § 35-11-211, Ala.Code 1975, and the holding in Pilgrim.

"The primary question on appeal is whether the trial court could properly enter a summary judgment against Lawson in each of her actions seeking to force a sale of the pertinent parcel of property in order to enforce her lien. In each case, Lawson and the current homeowners and the lenders agreed to accept the trial court's judgment without a hearing and based upon the pleadings and exhibits, and, in each case, the trial court determined that despite Lawson's statutory-priority argument, her position was secondary to that of the lenders, who were held to be entitled to equitable subrogation as to the senior mortgage.
"1 Although Lawson named the purchasers of each parcel in her seven complaints, the purchasers are not parties to this appeal.
"2 The record contains detailed statements concerning the total amount that Brian Homes owed Lawson; although that total was over $425,000, the liens involved in these appeals range in value from $5,500 to $10,800.
"3 The trial court entered a Rule 54(b), Ala. R. Civ. P., order at the same time that it entered the summary judgments in these cases; each judgment also noted that `[t]his judgment does not establish the existence of a lien in favor of [Lawson], which issue is reserved for trial.'"
Lawson, 6 So.3d at 2-3.
The Court of Civil Appeals concluded that Wells Fargo Home Mortgage, Inc., Chase Manhatten Mortgage Corporation, Countrywide Home Loans, Inc., and Fall Spectrum Lending, Inc. ("the lenders"), all of whom loaned money to the homeowners to purchase their homes, had established all the elements necessary to invoke the doctrine of equitable subrogation. Lawson conceded that her materialman's liens were subordinate to the mortgage held by New South Federal Savings Bank, which financed Brian Homes' construction loan ("the senior mortgage"). The lenders had satisfied the senior mortgage without actual notice of the materialman's liens claimed by Lawson and, therefore, the Court of Civil Appeals reasoned, should be treated as assignees of the senior mortgage. The Court of Civil Appeals further held that that result was not inequitable because it leaves Lawson in the same position she occupied at the time she supplied the materials and labor to Brian Homes and that the application of the doctrine of equitable subrogation will not change the priority of her liens because she started in a subordinate position.
The Court of Civil Appeals stated that although the materialman's lien statutes, §§ 35-11-210 through XX-XX-XXX, Ala. Code 1975, provide subcontractors the opportunity and procedure by which to perfect liens against property to which improvements have been made, those statutes do not guarantee that such liens will not be subject to equitable subrogation when the facts and equity require it. In reaching its conclusion, the Court of Civil Appeals overruled Collateral Investment Co. v. Pilgrim, 421 So.2d 1274 (Ala. Civ.App.1982). It stated:
"The construction industry today relies on banks and mortgage lenders to provide both initial construction-loan moneys to underwrite the construction of new houses and other buildings as well as purchase-money loans to prospective *11 individual buyers of those completed structures. In a completely honest and fair world, every developer, contractor, and subcontractor would be paid for his or her work from the proceeds of the sale of the property to the ultimate purchaser. However, if we were to accept Lawson's argument that the materialman's lien statute gives her liens priority over the lenders' purchase-money mortgages, all unpaid subcontractors who perfected materialman's liens as to these pertinent properties will receive an immediate windfall by forcing the sale of the residences, leaving the lenders (and the purchasers) without recourse. The doctrine of equitable subrogation therefore serves a remedial purpose in this context, and we conclude that the trial court's application of that doctrine in these cases is consistent with cases decided since Pilgrim that discuss the doctrine."
Lawson v. Brian Homes, 6 So.3d at 5-6.

Standard of Review
"On certiorari review, this Court accords no presumption of correctness to the legal conclusions of the intermediate appellate court. Therefore, we must apply de novo the standard of review that was applicable in the Court of Civil Appeals." Ex parte Toyota Motor Corp., 684 So.2d 132, 135 (Ala.1996). We are reviewing the Court of Civil Appeals' affirmance of summary judgments. "The law is well established that a de novo standard applies to appellate review of a trial court's summary judgment." Ex parte Patel, 988 So.2d 957, 959 (Ala.2007).

Analysis
The dispositive issue before us is whether the Court of Civil Appeals properly applied the doctrine of equitable subrogation to hold that the lenders' loans are subrogated to the priority position of the senior mortgage held by the construction lender even though there was an intervening materialman's lien.
In Bailey Mortgage Co. v. Gobble-Fite Lumber Co., 565 So.2d 138 (Ala. 1990), this Court set out the history of mechanic's liens and materialman's liens. In 1791, Maryland passed the first mechanic's lien law. In 1821, Alabama enacted its first mechanic's lien statute for the protection of materialmen and mechanics. The section of the statute regarding priorities remained virtually unchanged until 1933. Before 1933, a materialman had an advantage over a lender. The materialman had absolute priority. Following pleas from construction lenders, the legislature in 1933 amended the priority section of the mechanic's lien statute. The effect of the 1933 amendment was to reverse the priorities between a materialman's lien and a prior recorded mortgage. However, the legislature made it clear that a materialman's lien had "priority over all other liens, mortgages or incumbrances created subsequent to the commencement of work on the building or improvement...." Act No. 64, Ala. Acts 1933, Ex.Sess. (emphasis added). Today, § 35-11-211(a) still provides, in pertinent part, that "[s]uch lien as to the land and buildings or improvements thereon, shall have priority over all other liens, mortgages or incumbrances created subsequent to the commencement of work on the buildings or improvement...."
"[A materialman's] lien comes into existence immediately when one provides any materials or performs labor upon the property but remains inchoate unless a statement of lien is timely filed with the judge of probate of the county in which the property is situated (§ 35-11-213), and unless suit is timely filed to *12 perfect the [materialman's] lien (§ 35-11-221). Once these two steps are timely undertaken, the lien relates back to the date that the materials or labor was provided, and the priority of the lien is determined according to § 35-11-211. Such a lien has priority over encumbrances attaching after the commencement of the work."
Greene v. Thompson, 554 So.2d 376, 379 (Ala.1989) (citations and footnotes omitted).
This Court has long recognized the doctrine of equitable subrogation. See, e.g., Bolman v. Lohman, 74 Ala. 507, 512 (1883) ("[W]here money is expressly advanced in order to extinguish a prior incumbrance, and is used for this purpose, with the just expectation on the part of the lender of obtaining a valid security; or where its payment is secured by a mortgage, which for any reason is adjudged to be defective, the lender or mortgagee may be subrogated to the rights of the of the prior incumbrancer, whose claim he has satisfied, there being no intervening equity to prevent.... So, where there is misrepresentation and fraud, by which one has been induced to advance money to discharge a lien on property, and the money is so appropriated, it is common for equity to protect the lender, by subrogating him to the lien which his money has been used to extinguish.").
The elements of the doctrine of equitable subrogation are:
"(1) [T]he money is advanced at the instance of the debtor in order to extinguish a prior incumbrance; (2) the money is used for that purpose with the just expectation on the part of the lender for obtaining security of equal dignity with the prior incumbrance; (3) the whole debt must be paid before subrogation can be enforced; (4) the lender must be ignorant of the intervening lien; and (5) the intervening lienor must not be burdened or embarrassed."
Pilgrim, 421 So.2d at 1276.
The Court of Civil Appeals has addressed the application of the doctrine of equitable subrogation when the intervening lien was a materialman's lien. In Pilgrim, the Court of Civil Appeals held that a materialman's lien had a priority position over a mortgage company that held a purchase-money mortgage on the property after paying off a construction mortgage. In Pilgrim, a construction company executed construction-money mortgages on townhomes on the real property in question. The materialman supplied lighting equipment and related fixtures for the construction project. The townhome owners purchased the finished townhomes. The mortgage company loaned the town-home owners money in exchange for a purchase-money mortgage on the townhomes. The attorneys for the mortgage company examined a title abstract and found no materialman's liens. Additionally, the construction company and the mortgage company signed an affidavit at closing stating that all moneys owed to materialmen had been paid. However, the materialman in question had not been paid, and he filed a verified statement of lien. The trial court concluded that the materialman's lien had priority over the mortgage company's purchase-money mortgage.
The mortgage company appealed. The Court of Civil Appeals in Pilgrim noted that the construction-money mortgage had been executed before the materialman supplied any materials to the job site and that, as a result, it was undisputed that the construction-money mortgage had priority over the materialman's lien. The mortgage company satisfied the construction-money mortgage and argued that by satisfying that mortgage, it should now be allowed to claim first priority under the doctrine of *13 equitable subrogation. The Court of Civil Appeals affirmed the judgment of the trial court on two grounds. First, it held that the mortgage company did not meet the first element of equitable subrogation because the money had not been advanced at the instance of the debtor to satisfy the prior mortgage. In other words, the mortgage company loaned the money to the townhome owners based on their individual credit. The money was not loaned for the express purpose of satisfying the construction-money mortgage. The mortgage company ordered that the closing attorney pay the construction-money mortgage for its own benefit, and not for the benefit of the debtor, i.e., the construction company. Second, the Court of Civil Appeals held that the mortgage company did not meet the fourth element of equitable subrogation. The mortgage company was satisfying a construction-money mortgage for new homes, and it had constructive notice that by statute materialmen had six months within which to file liens. The mortgage company was not ignorant of the materialman's lien; therefore, another element of equitable subrogation was not met.
In the present case, instead of following its decision in Pilgrim, the Court of Civil Appeals overruled Pilgrim and relied upon three cases from this Court that applied the doctrine of equitable subrogation. See Brooks v. Resolution Trust Corp., 599 So.2d 1163 (Ala.1992)(granting the purchasers' request for equitable subrogation where the purchasers discharged a debt to the senior lienholder without knowledge that an intermediate vendor had mortgaged the property to a junior lienholder); Whitson v. Metropolitan Life Ins. Co., 225 Ala. 262, 142 So. 564 (1932)(imposing equitable subrogation upon a showing of lack of actual knowledge by the party paying to discharge a prior incumbrance at the debtor's instance); and Shields v. Hightower, 214 Ala. 608, 108 So. 525 (1926)(holding that purchasers of real estate from a tax collector, who satisfied, with part of the purchase money, a mortgage that had been given prior to the execution of the tax collector's bond, are entitled to subrogation to the rights of the mortgagee as against the lien of the bond despite being charged by law with notice of the tax collector's lien). However, none of these cases involved a materialman's lien.
In the present case, all the elements of the doctrine of equitable subrogation have not been met. The first element of equitable subrogation is that "the money is advanced at the instance of the debtor in order to extinguish a prior incumbrance." Pilgrim, 421 So.2d at 1276. In his dissent in Lawson v. Brian Homes, Judge Murdock stated:
"The second loans, which the main opinion believes should be subrogated to the developer's construction loan, were not made to the original debtor. That is, they were not made to the developer. Rather, they were made to the ultimate purchasers of the houses. Also, the second loans were made to the ultimate purchasers not for the direct purposes of extinguishing any prior encumbrance, but rather for the purpose of enabling the purchasers to make their purchases of the houses. Although the moneys from these second loans were loan proceeds in the hands of the purchasers, they merely constituted payments by the purchasers to the developer. Under the majority's analysis, the lien of a material's supplier properly recorded under our statutes would become all but meaningless whenever a house is purchased by a purchaser who utilizes loan proceeds to pay the builder or developer for the house and the builder or developer, in turn, upon being paid for the house by the purchaser, uses the proceeds *14 of the sale of pay off its construction loan."
6 So.3d at 6-7. We agree.
Additionally, the fourth element of equitable subrogation has not been met. That is, the lender must be ignorant of the intervening lien. In the present case, the Court of Civil Appeals concluded that the lenders satisfied the senior mortgage without actual notice of the materialman's liens claimed by Lawson and that, therefore, the lenders should be treated as assignees of the senior mortgage.
This Court has addressed notice in the context of materialman's liens. In Starek v. TKW, Inc., 410 So.2d 35 (Ala.1982), overruled on other grounds, Ex parte Grubbs, 571 So.2d 1119 (Ala.1990), the purchasers bought a house from a builder. The purchasers obtained a mortgage from a lending company in order to buy the house. Unknown to the purchasers, the builder had failed to pay one of its suppliers that had provided materials for the construction of the house, even though the builder had signed an affidavit stating that he had paid all materialmen. The builder filed a petition in bankruptcy. The unpaid supplier filed a lien against the property. This Court noted that although the general rule of law protects a purchaser who is without notice of the existence of a lien, a lien filed on a new building does have priority over a purchaser, regardless of actual notice. "This is true because a purchaser of a new building has constructive notice that material used to build the structure may not be paid for. Therefore, one who purchases a new home prior to the running of the six-month statute of limitations is put on constructive notice that the filing of a lien is still statutorily permissible." 410 So.2d at 36-37 (emphasis added).
We hold that the constructive notice supplied by the materialman's lien statute defeats the lenders' equitable-subrogation claim. The materialman's lien statutes "are an expression of legislative intent that should stay the hand of equity in this situation. If we held otherwise, we would violate the equitable maxim that equity follows the law." Richards v. Security Pacific Nat'l Bank, 849 P.2d 606, 611 (Utah App.1993)(holding that under Utah's mechanic's lien statute a subsequent lender had constructive notice of the intervening mechanic's lien so that the subsequent lender was not entitled to use the doctrine of equitable subrogation to defeat the mechanic's lien). In determining the meaning of a statute, this Court looks to the plain meaning of the words as written by the legislature, and the legislature, in § 35-11-211, clearly stated that a materialman's "lien as to the land and buildings or improvements thereon, shall have priority over all other liens, mortgages or incumbrances created subsequent to the commencement of the work on the building or improvement." (Emphasis added.)
In Bank of America, N.A. v. Prestance Corp., 160 Wash.2d 560, 160 P.3d 17 (2007), the Washington Supreme Court held, as a matter of first impression, that it would adopt the approach of the Restatement (Third) of the Law of Property § 7.6 (1997), under which a refinancing mortgagee's actual or constructive knowledge of intervening liens does not automatically preclude a court from applying the doctrine of equitable subrogation. The Washington court quoted with approval from Ex parte AmSouth Mortgage Co., 679 So.2d 251, 255-56 (Ala.1996), the following: "`If all persons who negligently confer an economic benefit upon another are disqualified from equitable relief because of their negligence, then the law of restitution, which was conceived in order to prevent unjust enrichment, would be of little or no *15 value'" and "`"[O]ne is not penalized for lack of care unless this results in harm to someone else"'" (quoting Restatement of the Law of Restitution § 59 cmts. at 232 (1937)).[1]
We are aware of the approach in the Restatement, but it is not necessary for this Court to embrace that approach in this case because a mechanic's/materialman's lien falls within an exception as set out in the Restatement. Illustration no. 30, Restatement (Third) of the Law of Property § 7.6, cmt. f (1997), provides:
"30. Mortgagor owns Blackacre subject to a mortgage held by Mortgagee-1. Mortgagor obtains a loan from Mortgagee-2 for the purpose of discharging Mortgagee-1's mortgage. Mortgagee-2 makes the loan and disburses the proceeds to pay and discharge Mortgagee-1's mortgage. A satisfaction of Mortgagee-1's mortgage is recorded in the public records. However, Mortgagee-2's mortgage is not recorded until several days later. During the period between recordation of the satisfaction and the new mortgage, Mechanic, a contractor hired by Mortgagor, commences work under a contract to build a house on Blackacre. Mortgagor fails to pay Mechanic, who records a notice of mechanics lien on Blackacre. Under applicable law, such liens take their priority from the date work on the contract commenced. A court is warranted in finding that a grant of subrogation to Mortgagee-2 would be unjust to Mechanic, and upon such a finding may deny Mortgagee-2's subrogation claim."
The Court of Civil Appeals contends that Lawson would be receiving a "windfall" if the lenders' purchase-money mortgages were not subrogated to the builder's construction loan. If we held against Lawson, however, the builder would receive the windfall. The builder would have the value of Lawson's work without having paid anything for it. The legislature created a specific statutory scheme in which a materialman's lien is given priority over a subsequently created mortgage. The lenders who loaned the money to the purchasers in the present case are sophisticated mortgage companies that could have easily protected their interests.[2] Based on *16 the statutory preference given to materialmen, it is the commercial lenders who bear the burden of protecting themselves.

Conclusion
The judgment of the Court of Civil Appeals is reversed, and the cause is remanded for proceedings consistent with this opinion.
REVERSED AND REMANDED.
COBB, C.J., and SEE, WOODALL, STUART, SMITH, and PARKER, JJ., concur.
LYONS, J., concurs in part and concurs in the result.
MURDOCK, J., recuses himself.
LYONS, Justice (concurring in part and concurring in the result).
I concur based on the recognition in the main opinion of the statutory mandate for priority of liens over subsequent encumbrances as set forth in § 35-11-211(a), Ala.Code 1975, and the obligation of equity to follow the law. See Moulton v. Reid, 54 Ala. 320, 324 (1875) ("Equity follows the law, and `when a rule, either of common, or statute law, is direct, and governs the case with all its circumstances, or the particular point, a court of equity is as much bound by it as a court of law, and can as little justify a departure from it.'1 Story's Eq. § 64." (cited with approval in Turner v. Cooper, 347 So.2d 1339, 1346-47 (Ala. 1977))).
I concur in the result as to the discussion in the main opinion of the Restatement of the Law of Restitution § 59 (1937). I would conclude that it is simply unnecessary to decide in this case whether the principles there announced are sound and susceptible of application, notwithstanding § 35-11-211(a), because, even if we were to embrace them, illustration no. 30 of the Restatement (Third) of the Law of Property § 7.6, cmt. f (1997), quoted in the main opinion, recognizes this Court's authority to deny equitable subrogation to a mortgagee so as to prevent unfairness to a holder of a mechanic's lien. The unfairness in this proceeding stems from the status of a mechanic's lienholder when subordinated to a construction mortgage with an indebtedness of limited duration being substantially more advantageous to the lienholder than subordination to the typical purchase-money mortgage authorizing repayment over a term of many years.
NOTES
[1]  In AmSouth Mortgage, a mother bought a house for the use and benefit of her daughter, paying off the seller's equity and assuming an existing mortgage. The mother and daughter understood that as soon as she was able, the daughter would refinance the loan in her own name. Subsequently, the daughter applied for a loan from AmSouth, and the mother's mortgagor paid off the mother's loan. As part of the refinancing, the mother executed a warranty deed conveying title to herself and the daughter. However, as a result of the closing attorney's negligence, only the daughter signed the new note and mortgage from AmSouth. Less than a month after the closing, the daughter died, and the mother claimed to be the owner of an undivided one-half interest in the property as a tenant in common. She sued AmSouth, seeking a sale of the property and a division of the proceeds. The trial court determined that the mother was the sole owner of the property but that her ownership was subject to a mortgage in favor of AmSouth. The Court of Civil Appeals reversed the trial court's judgment, holding that because AmSouth (through its attorney) had been negligent and the mother was free from fault, AmSouth was not entitled to a mortgage on the property. The Court of Civil Appeals also concluded that the mother owned an undivided one-half interest in the property. This Court reversed the judgment of the Court of Civil Appeals, holding that AmSouth's negligence in failing to discover that the mother was a one-half owner of the property and in failing to have the mother sign the new mortgage did not bar restitution.
[2]  The lenders argue that the subcontractors could have protected themselves by "(1) a credit check on the general contractor; (2) agreement with the contractor's lender to require joint checks to the subcontractor and the contractor for work done by the subcontractor; (3) escrow of earmarking of loan funds for the benefit of the subcontractor; (4) mortgage on the personal residence of the contractor; (5) letters of credit; (6) payment bond; (7) individual guarantees from principals of the contractor; (8) advances from the contractor for work or materials; and (9) criminal indictments for theft." (Lenders' brief, p. 16.) It is also true that the lenders could have obtained a subrogation agreement or assumed the rights of the earlier lender by an assignment of the construction mortgage.
