
724 So.2d 525 (1998)
BUILDER'S SUPPLY COMPANY, INC.
v.
COMPASS BANK.
2961102.
Court of Civil Appeals of Alabama.
April 17, 1998.
Certiorari Denied October 30, 1998.
Ralph K. Strawn, Jr., of Henslee, Robertson & Strawn, L.L.C., Gadsden, for appellant.
Elbert H. Parsons, Jr., of Parsons & Eberhardt, Huntsville, for appellee.
Alabama Supreme Court 1971330.

On Application for Rehearing
CRAWLEY, Judge.
The opinion of March 6, 1998, is withdrawn and the following opinion is substituted therefor.
In August 1996, Compass Bank sued for a judgment declaring that mortgages it held on certain real estate had priority over several other liens on that real estate, including that of Builder's Supply Company, Inc., which claimed a materialman's lien. The trial court *526 entered a summary judgment for Compass, ruling that Compass's mortgages have priority over the other liens. Builder's Supply appeals.
A motion for summary judgment is to be granted when no genuine issue of material fact exists and the moving party is entitled to a judgment as a matter of law. Rule 56(c)(3), Ala. R. Civ. P. See West v. Founders Life Assurance Co. of Florida, 547 So.2d 870 (Ala.1989), and Bass v. SouthTrust Bank of Baldwin County, 538 So.2d 794 (Ala.1989), for a discussion of the application of the substantial evidence rule.
On April 14, 1995, Kenneth R. Poole and Sheila Poole executed to Compass a construction mortgage in the initial amount of $80,000, which included this provision for future advances:
"FUTURE ADVANCE MORTGAGE ...
"....
"THIS MORTGAGE IS A `CONSTRUCTION MORTGAGE' AS DEFINED IN SECTION 7-9-313(1)(C) OF THE CODE OF ALABAMA AND SECURES, AMONG OTHER OBLIGATIONS, AN OBLIGATION INCURRED FOR THE CONSTRUCTION OF AN IMPROVEMENT ON LAND
"....
"WHEREAS, the parties desire to secure the principal amount of the Note with Interest, and all renewals, extensions and modifications thereof, and all refinancing of any part of the Note and any and all other additional indebtedness of Borrower to Lender, now existing or hereafter arising, whether joint or several, due or to become due ... and any renewals, extensions, modifications and refinancing thereof....
"....
"1.03 Further Advances, Revolving and Open-End Loans, and Other Debts. It is expressly understood that this Mortgage is intended to and does secure not only the Loan, but also future advances and any and all Other indebtendness, obligations and liabilities ... of the Borrower to the Lender, whether now existing or hereafter arising, and any and all extensions, renewals, modifications and refinancing of same, or any part thereof, existing at any time before actual cancellation of this instrument on the probate records of the county or counties where the Mortgaged Property is located.... The Loan and the Other indebtedness... shall be secured by this Mortgage."
The mortgage was recorded on April 14, 1995. The due date was October 14, 1995. On August 14, 1995, Compass advanced $35,000. Builder's Supply began furnishing materials on September 13, 1995. On September 28, 1995, Compass advanced $30,000. On October 30, 1995, Builder's Supply filed in the probate court a materialman's lien for approximately $45,000. On November 22, 1995, the Pooles executed a mortgage[1] and note providing for permanent financing over a 30-year period. The amount of this last mortgage and note was $145,240; the amount of the balance due Compass on that date. In January 1996, Builder's Supply sued the Pooles to enforce its lien. The Pooles defaulted on their debt to Compass, and the mortgages became subject to foreclosure.
Ala.Code 1975, § 35-11-211(a), states that a materialman's lien "shall have priority over all other liens, mortgages or incumbrances created subsequent to the commencement of work on the building or improvement" and that "all liens, mortgages and incumbrances... created prior to the commencement of such work shall have priority over all liens for such work." Our supreme court has interpreted this section as follows:
"The date of the recording of a mortgage and the date of the furnishing of materials by the materialman control in determining the priority between the mortgage and the materialman's lien."
Metro Bank v. Henderson's Builders Supply Co., 613 So.2d 339, 340 (Ala.1993).
The dispositive issue is whether the taking of the permanent mortgage discharged the debt and released the lien created by the *527 construction mortgage, thus giving the Builder's Supply lien priority over Compass's later-filed permanent mortgage. Higman v. Humes, 127 Ala. 404, 30 So. 733 (1900). In Higman, our supreme court stated:
"`Whether the taking of the second mortgage is a payment of the first depends upon the intention of the parties. When no receipt is given as for the amount secured by the first mortgage, and no release thereof is executed, the presumption is that the latter notes and mortgage were not intended to discharge and pay the earlier.' ...
"... Where the purpose or object of the parties is the renewal and extension of the old debt, it is unimportant what form the transaction may take in effectuating such purpose....
"....
"... `The extension of time of payment of the mortgage debt does not impair the security as against subsequent incumbrances.'"
127 Ala. at 408-10, 30 So. at 734-35 (citations omitted). See also Stephens Wholesale Bldg. Supply Co. v. Birmingham Federal Sav. & Loan Ass'n, 585 So.2d 870, 872 (Ala.1991).
The provisions in the construction mortgage, the additional advances, and the provisions in the permanent mortgage indicate that the parties' intent was to protect Compass's secured interest in the same real estate described in both mortgages. The taking of the permanent mortgage, which was recorded November 22, 1995, did not extinguish the security interest created initially by the construction mortgage that was recorded April 14, 1995. Therefore, Compass's mortgages have priority over the Builder's Supply lien, and the trial court properly entered the summary judgment for Compass.
OPINION OF MARCH 6, 1998, WITHDRAWN; OPINION SUBSTITUTED; APPLICATION OVERRULED; RULE 39(k) MOTION DENIED; AFFIRMED.
ROBERTSON, P.J., and YATES, MONROE, and THOMPSON, JJ., concur.
NOTES
[1]  This mortgage was filed on the same day. The construction mortgage was not cancelled on the probate record. The final judgment held both mortgages valid and that both had priority over the Builder's Supply lien, and it allowed Compass to foreclose both mortgages.
