
261 N.W.2d 346 (1977)
CARL H. PETERSON COMPANY, Respondent,
v.
ZERO ESTATES, et al., Respondents,
First National Bank of Lakeville, Appellant.
HEDBERG & SONS CO., Respondent,
v.
Emil J. BRAUN, et al., Defendants,
First National Bank of Lakeville, Appellant.
Richard L. LUNDAHL, Respondent,
v.
Emil J. BRAUN, et al., Defendants,
First National Bank of Lakeville, Appellant,
W. J. Sutherland & Associates, Inc., intervenor, Respondent,
Road Machinery & Supplies of Minneapolis, Respondent.
No. 47294.
Supreme Court of Minnesota.
December 16, 1977.
Rehearing Denied January 10, 1978.
*347 Ahl, Halberg & Nord, R. Glenn Nord, and William E. Macklin, Lakeville, for appellant.
Peterson & Holtze and Theodore N. Treat, Jr., Minneapolis, for Carl Peterson Co.
Richard M. Greeman, Minneapolis, for Zero Estates, et al.
O. A. Brecke and J. Robert Nygren, Minneapolis, for Hedberg & Sons Co.
Brenner & Harroun and Bernard M. Harroun, Minnetonka, for Richard L. Lundahl.
Robert E. Johnson, Minneapolis, for W. J. Sutherland & Associates.
John J. Waters, Minneapolis, for Road Machinery Supplies.
Heard before SHERAN, C. J., and PETERSON and YETKA, JJ., and considered and decided by the court en banc.
PETERSON, Justice.
The First National Bank of Lakeville (hereafter "bank") appeals from judgment in a mechanics lien foreclosure action in which the bank, as the mortgagee of property in Scott County, unsuccessfully claimed priority for its mortgage, although second in time to the mechanics liens on the same property, on grounds of equitable subrogation or, alternatively as to certain of the lienholders, on various grounds of notice and waiver.
The factual situation upon which the bank's claims are asserted is not in dispute. It made a loan to Emil and Emma Braun in 1970 for $25,000, which was secured by a mortgage on 152 acres of land owned by the Brauns. The Brauns contemplated the construction of a 300- by 176-foot horse barn on the property, but how the loaned funds were used is not clear from the record. This mortgage was filed on October 14, 1970.
The first materials for the horse barn were delivered in June 1972. Construction continued after that date, with labor and materials supplied by respondent mechanics lienholders. It is undisputed that there was an actual and visible improvement on the land some time during 1972.
The issue centers on a second loan and mortgage made between the bank and the Brauns on March 6, 1973, and filed of record March 12, 1973. This loan, in the amount of $180,000, was to finance the continued construction of the horse barn. It was filed subsequent to the beginning of the improvement and the initial furnishing of labor and materials for construction.
The bank's second loan was guaranteed, up to 85 percent, by the Small Business Administration (SBA). SBA, in an attempt to establish priority of the 1973 mortgage, directed that part of the proceeds of the second loan be used to pay the balance of the 1970 loan ($20,133.18) and delinquent taxes ($1,463.17). The building was also to be insured. Additionally, on March 30, 1973, Braun paid one of the mechanics lienholders, Hedberg & Sons Co. (hereafter Hedberg), $4,400 for labor and materials furnished to that date, receiving a lien waiver from Hedberg.
Three actions to foreclose the several mechanics liens on the property were commenced in June and July 1974. On February 12, 1975, the barn collapsed. The insurance on the barn had lapsed. The district court consolidated the three actions and upon trial ruled, pursuant to Minn.St. 514.05, that the mechanics liens had attached in 1972 and were prior to the bank's 1973 mortgage. Judgment was granted to respondent lienholders in the amount of $23,189.56, together with interest, costs, and attorneys fees. The recovery was impressed only upon a 39.5-acre tract carved out of the entire 152-acre Braun property, pursuant to Minn.St. 514.03, subd. 3.
*348 1. The principal contention of the bank is that, in equity, its 1973 mortgage should be subrogated to its 1970 mortgage and thus granted priority over the 1972 mechanics liens (to the extent of $21,596.35) inasmuch as the proceeds of its second loan were used to pay the balance of the first loan and delinquent taxes in that sum. We hold that, in the factual circumstances of this case, the trial court properly denied such equitable subrogation.
Heisler v. C. Aultman & Co., 56 Minn. 454, 57 N.W. 1053 (1894), in which priority was accorded to a second mortgage over a judgment lien and upon which the bank most heavily relies, is distinguishable in its equitable circumstances. There, plaintiff Heisler was surety on a note made by her son, a note secured by a second mortgage on land purchased by him. A judgment lien on the land was third in priority to this second mortgagebut the plaintiff knew nothing of its existence. When her son defaulted on the note, the plaintiff paid the note in full. The second mortgage was discharged, thus elevating priority of the judgment lien. This court affirmed a trial court judgment reinstating the second mortgage and declaring the plaintiff subrogated to the rights of the second mortgagee, thus according her priority over the judgment lienholder to the proceeds of the sheriff's sale of the land. This equitable principle will be applied in the interest of substantial justice, as we held in Heisler, where one party has provided funds used to discharge another's obligations if (a) the party seeking subrogation has acted under a justifiable or excusable mistake of fact and (b) injury to innocent parties will otherwise result.[1]
The bank in this case has not demonstrated such equities in its favor. Unlike the unsophisticated individual wholly unaware of a judgment lien, the bank is a professional lender with knowledge of construction in progress giving rise to inchoate liens for contractors and materialmen. Its failure to consider potential priority conflicts and to obtain subordination agreements from them, as well as its failure to ascertain that its mortgagor was maintaining insurance in force, cannot be deemed justifiable as an excusable mistake.
The mechanics lienholders, moreover, are innocent parties whose rights could be substantially impaired, if not lost, were equitable subrogation granted to the bank. Their only recourse is to the 39.5-acre tract of land subject to their liens. The bank has undisputed priority on the remaining 112 acres covered by its 1973 mortgage.
2. Emil Braun, the property owner, paid Hedberg $4,400 on March 30, 1973, for which Hedberg gave Braun a lien waiver as to all labor and materials "furnished or acquired prior to date hereof." Hedberg's claim as a mechanics lienholder is for labor and material delivered to Braun for construction subsequent to that date. Notwithstanding the clear language of that lien waiver, the bank contends that the waiver subordinated Hedberg's future lien rights to its 1973 mortgage.
The bank really premises its argument on the asserted fact that Hedberg "knew" at the time of the $4,400 payment that the funds therefor came from the proceeds of the bank's 1973 loan. It is probably true that Hedberg knew at the time that a commitment for the 1973 loan had been made, but it is not proven that Hedberg knew the loan in fact had been madebut the result in either case is the same. Minn.St. 514.05, which governs the time at which a lien attaches, provides that, as against a mortgagee, the lien attaches at the time of the "actual and visible beginning of the improvement on the ground." See, e. g., M. E. Kraft Exca. & Grad. Co. v. Barac Const. Co., 279 Minn. 278, 156 N.W.2d 748 (1968). The actual and visible beginning of the improvement occurred in 1972, not in 1973. Therefore, whatever notice Hedberg or other *349 lien claimants had of the 1973 mortgage has no effect on their priority. The argument is, in essence, merely a variation of the bank's claim for equitable subrogation.
Affirmed.
OTIS, J., took no part in the consideration or decision of this case.
NOTES
[1]  The other cases where the equitable subrogation doctrine has been applied involve generally similar fact situations, and use the same standards. Sucker v. Cranmer, 127 Minn. 124, 149 N.W. 16 (1914); Elliott v. Tainter, 88 Minn. 377, 93 N.W. 124 (1903); Emmert v. Thompson, 49 Minn. 386, 52 N.W. 31 (1892).
