
535 N.W.2d 302 (1995)
HOME LUMBER CO., petitioner, Appellant,
v.
KOPFMANN HOMES, INC., et al., Defendants,
MidAmerica Bank Maplewood, Respondent,
Sullivan Services, Inc., Pella Products, Inc., petitioners, Appellants.
No. C2-94-172.
Supreme Court of Minnesota.
July 28, 1995.
*303 Todd A. Sattler, Lang, Pauly & Gregerson, Ltd., Minneapolis, for Home Lumber Co.
Robert R. Roos, Minneapolis, for Sullivan Services, Inc.
Mark Anderson, Wagner, Falconer & Judd, Minneapolis, for Pella Products, Inc.
Michael D. Quayle, Dudley Younkin, Merrigan, Johnson, Quayle & Younkin, Minneapolis, for MidAmerica Bank Maplewood.
Bradley N. Beisel, Scholle & Beisel, Ltd., Minneapolis, for amicus curiae MN Land Title Assoc.
Heard, considered and decided by the court en banc.

OPINION
GARDEBRING, Justice.
In this case, we consider whether mortgage loan disbursements made subsequent to the attachment of mechanics liens have priority over those liens. Kopfmann Homes, Inc. (Kopfmann) obtained a construction loan mortgage from MidAmerica Bank Maplewood (Bank) in order to build a residence for resale. In the construction loan agreement, the Bank was authorized to disburse funds for the construction project, pursuant to its inspector's progress reports or "acceptable invoices and lien waivers." Some disbursements were made but, for reasons which are not clear in the record, the Bank stopped making disbursements.
Subsequently, businesses that had supplied materials and labor for the construction project (appellants) brought mechanics lien foreclosure actions. The trial court held that the mechanics liens had priority over all disbursements the Bank made after the date the mechanics liens attached because the disbursements were "optional." The court of appeals reversed, holding that the disbursements were "obligatory" and, thus, had priority over the mechanics liens. We agree and affirm the court of appeals.
In April 1990, Kopfmann entered into a construction loan mortgage of $450,000 with the Bank. The mortgage was recorded on April 20, 1990. Disbursements were made on April 18, May 23, June 20, August 15 and September 20, 1990, for a total amount of approximately $271,000. The mechanics liens at issue attached no later than May 16, 1990. Thus, certain disbursements were made prior to the time the liens attached, and others were made after that date.
A number of businesses, including Home Lumber, that had provided materials and labor for the project filed mechanics lien foreclosure actions. Disposition of this case *304 at trial turned on whether the disbursements made after the date the mechanics liens attached retained the priority of the prior recorded mortgage or had been "optional" and thus lost their priority. The trial court held that, "in light of the nature of the entire transaction," including the lack of clarity in the loan documents, the behavior of the responsible Bank official and the failure of the Bank to comply with disbursement safeguards, the advances made after May 16, 1990, were "optional and discretionary" and thus, inferior to the mechanics liens. The court of appeals reversed, holding that the advances were obligatory.
Appellants argue first that the court of appeals erred in applying a de novo standard of review. The "[c]onstruction and effect of a contract presents a question of law, unless an ambiguity exists." Trondson v. Janikula, 458 N.W.2d 679, 681 (Minn.1990) (citing Hydra-Mac, Inc. v. Onan Corp., 450 N.W.2d 913, 916-17 (Minn.1990)). Here there is no question of ambiguity. The issue before us is the effect of the Bank's waiver of certain disbursement conditions on the priority of the mechanics liens. Because we conclude that the question of priority is to be determined solely by reference to the controlling documents, the question is one of law and our standard of review is de novo.
The critical issue is whether the Bank had a legal obligation to make disbursements after attachment of the liens. On this issue, appellants argue that, based upon "the entire transaction," the disbursements made after the attachment of the mechanics liens can only be considered "optional."
To determine the issue of priority, we begin with the controlling statutes. Minn. Stat. § 507.34 (1994) establishes mortgage priority from the date of recording with the county recorder or the registrar of titles. Minn.Stat. § 514.01 (1994) grants a mechanics lien to anyone who contributes to the improvement of real estate by performing labor or furnishing skill, material or machinery. A mechanics lien attaches, takes effect, and is preferred to any mortgage not then of record from the time the first item of material or labor is furnished upon the premises for the beginning of the improvement, unless the lienholder had actual notice thereof. Minn. Stat. § 514.05, subd. 1 (1994). Mechanics lienholders can bring foreclosure suits pursuant to Minn.Stat. § 514.10 (1994). This statutory scheme is intended to protect the prior mortgagee. See Reuben E. Johnson Co. v. Phelps, 279 Minn. 107, 112, 156 N.W.2d 247, 251 (1968), reh'g denied, (Minn. Mar. 5, 1968).
In addition to the statutory provisions, the common law provides that a mechanics lien has priority over certain mortgage payments if the subsequent payments are "optional." Finlayson v. Crooks, 47 Minn. 74, 79, 49 N.W. 398, 400 (1891), reh'g denied, (Minn. Aug. 27, 1891).[1] Where a mortgage is given to secure future advances, the mortgage has priority over mechanics liens attaching after the mortgage is given but before such advances are made, if the advances are "obligatory" upon the mortgagee under the terms of the mortgage. Erickson v. Ireland, 134 Minn. 156, 158, 158 N.W. 918, 919 (1916). Although appellants suggest that confusion has existed as to whether the characterization of the payments as "optional" or "obligatory" is determined strictly by reference to the contract, or whether the court may consider the circumstances surrounding the payments, we hold, consistent with our earlier cases, that this question is to be answered solely on the basis of the terms of the controlling documents themselves.
In Landers-Morrison-Christenson Co. v. Ambassador Holding Co., we said:
[T]he undertaking of a mortgagee to make future advances is not deemed optional within the rule which gives subsequent incumbrances priority over optional advances thereafter made, unless it appears *305 from his contract, without resorting to extrinsic evidence, that he has the right to decline to make them.

171 Minn. 445, 451, 214 N.W. 503, 506 (1927) (emphasis added).
Some confusion may have resulted from our choice of language in Phelps, where we said, "[w]hether the payments of a mortgagee are obligatory or optional must be determined from the nature of the entire transaction." 279 Minn. at 117, 156 N.W.2d at 253 (1968). However, our application of this principle to the facts in Phelps makes clear that it was not intended as a departure from our earlier rule. The decision in Phelps did not turn on whether disbursement safeguards were waived, but rather looked to the legal relationships created by the related documents in that case.
Limiting the optional advance rule to instances where the controlling documents themselves clearly define the option is in accord with underlying policy in this area of real estate law. In this case, the conditions precedent to additional disbursements under the construction loan agreement were intended for the benefit of the Bank. The lien claimants were neither parties to, nor the intended beneficiaries of, the construction loan agreement; indeed, their very standing to question compliance with its terms is not clear. In Landers-Morrison, we said "[c]onditions may be waived by the parties for whose benefit they were imposed, and those who are strangers to such parties and to the transaction have no ground to complain because of such waiver." 171 Minn. at 451, 214 N.W. at 506. Such a rule places the risk of loss squarely upon those whose claims would otherwise be secondary, the lienholders, and allows the mortgagee to proceed by waiving certain contract conditions in order to avoid putting the question of breach before a court or jury. The mortgagee, under this rule, "may disregard [the breach] and make the stipulated advances in reliance on [its] security." Id. By contrast, adoption of appellants' position would require the mortgagee to guess at the eventual outcome of a fact determination on whether the disbursements were optional and could allow the mechanics lienholders a windfall.
Applying this rule to the facts here, we conclude that the payments made by the Bank after May 16, 1990, were obligatory, and thus retained their priority over the liens which arose on that date. Pursuant to the construction loan agreement, the Bank was authorized to disburse funds as follows:
[T]he bank is authorized to disburse funds under its control in said construction loan account, together with the net proceeds of the loan, only in proportion to its inspector's report of progress, or by acceptable invoices and lien waivers submitted and signed by the undersigned and appropriate contractor.
Kopfmann was required to:
[F]urnish the Bank with approved plans, specifications and statements showing itemized cost of proposed building, including a true and accurate sworn Construction Statement duly signed and notarized.
The agreement further required Kopfmann to submit plans and contracts for the construction, proof of insurance, a survey of the property and signed invoices from suppliers and subcontractors. Testimony at the trial established that the Bank did not require Kopfmann to submit all of these documents, and disbursed money without full compliance with the documentation required by the construction loan agreement. The Bank official responsible for approving disbursements testified that while the Bank did not always rely on invoices or bills in making disbursements, the Bank did send an inspector out to the property to inspect the improvements in order to determine if additional disbursements were warranted.[2] Appellants contend that based on the construction loan agreement and the Bank official's testimony, the Bank was not obligated to make future advances.
However, we conclude that the construction loan agreement clearly establishes that the parties agreed that regular advances were to be made as the construction proceeded. *306 The conditions under which additional disbursements were to be made are clearly stated in the construction loan agreement and it cannot reasonably be interpreted to create a mere option. Like the mortgagee in Phelps, the Bank was under an obligation to advance the full amount of the mortgage for the completion of the improvement of the property. That the Bank waived certain of the conditions (receipt of lien waivers) and relied on others (inspections by Bank personnel) does not change the priority of its recorded mortgage.
Accordingly, the court of appeals decision is affirmed.
NOTES
[1]  In Finlayson, a mortgagee agreed to provide $3000 to a borrower, with $1250 cash down, $200 for plastering at the appropriate stage, and the remainder when the building was completed. 47 Minn. at 78, 49 N.W. at 400. The lender paid the down payment, the plastering costs and approximately $300 of the remaining amount. Mechanics lien foreclosures were brought against the mortgagee and this court held that the mechanics lien had priority over the $300, which we said was optional, not obligatory, because the building was not completed. Id. We also noted that the advance was made with actual notice of the lien. Id.
[2]  The Bank official also testified that on one occasion she denied a request for disbursement based on her conclusion that the amount sought for payment to a lumber supplier was inconsistent with the amount of material on the site.
