
257 N.W.2d 295 (1977)
LAYNE MINNESOTA COMPANY, Appellant,
v.
TOWN OF STUNTZ, Respondent.
No. 46703.
Supreme Court of Minnesota.
July 22, 1977.
*296 Carlsen, Greiner & Law and John E. Rode, Minneapolis, for appellant.
Clarence H. Kleffman, Hibbing, for respondent.
Heard before PETERSON, MacLAUGHLIN, and SCOTT, JJ., and considered and decided by the court en banc.
MacLAUGHLIN, Justice.
This is an action brought by plaintiff, Layne Minnesota Company (Layne), for the balance owed on a contract for drilling a water supply well for the town of Stuntz *297 (Stuntz), a municipal corporation in St. Louis County. Stuntz counterclaimed to recover a partial progress payment made to Layne during the performance of the contract. The trial court found the contract void for failure to comply with the applicable competitive-bidding statute and denied recovery to both parties. Layne appealed from the judgment and Stuntz sought review of the dismissal of its counterclaim. We affirm.
The essential facts are not disputed by the parties. For 25 years iron mining companies had supplied water to Kelly Lake, located within the municipal boundaries of Stuntz, as part of the operation of open pit mines in the area. The natural flow of water into Kelly Lake was disrupted by these mining operations and, when the mining companies ceased production and removed their pumps in 1969, the level of the lake declined, resulting in stagnant water and insufficient overflow from the lake into a creek which carried effluent downstream from the town sewage plant.
Stuntz brought a lawsuit in 1969 against the mining companies and received a settlement to be used for drilling a well to supply water to Kelly Lake. Shortly thereafter, Stuntz hired Robert R. Wallace, a member of a Hibbing firm of consulting engineers, to prepare a preliminary study of lake levels and to develop plans and specifications for a new well to supply water to the lake. At a special meeting on April 10, 1970, the Town Board of Stuntz (board) declared an emergency with respect to Kelly Lake. The board authorized Wallace to supervise the construction of a sheet-piling dam at the outlet of the lake and called for bids for the construction of a water supply well in accordance with the plans and specifications which Wallace had prepared.
After advertising for bids, Stuntz entered into a contract on May 4, 1970, with the sole bidder, Mead Well Drilling Co., Inc. (Mead), for drilling a test well, an observation well, and a 150-foot water-supply well, to be constructed in an area selected by Wallace. The Mead contract called for completion of the work within 45 days, at a cost to be computed on a unit-price basis. In the event of Mead's default, Stuntz had the right to terminate the Mead contract and to complete the work by reletting the contract, with additional costs to be paid by Mead or its bonding company.
On September 2, 1970, after the board became dissatisfied with Mead's progress in drilling the water-supply well, it adopted a resolution that Mead be given 5 days notice, pursuant to the contract, to complete its performance or be terminated for default. Mead was given the requisite notice but after the 5 days had expired, the board failed to serve timely notice on Mead's bonding company as required by the contract. In October, notice to Mead was given once again and subsequently, notice to the bonding company was made in timely fashion. However, the bonding company refused to take over and complete Mead's contract.
Throughout the fall, Stuntz continued to negotiate with Mead as to possible terms and conditions upon which Mead would be reinstated and permitted to continue the work but these negotiations were unsuccessful and were discontinued on December 29, 1970. In January 1971, Stuntz commenced an action against Mead and the bonding company for breach of contract, and Mead counterclaimed for the alleged balance due under the contract for services already rendered. On April 6, 1972, Stuntz agreed to dismiss the action against Mead with prejudice and stipulated that judgment be entered against Stuntz on Mead's counterclaim for $16,784.50.
In the meantime, in September 1970, Wallace telephoned Richard Netz, a sales representative of Layne, which specializes in municipal well drilling and development, and asked Netz to come to Hibbing to discuss the completion of Mead's work. Shortly thereafter Netz met with Wallace and inspected the Mead well site. Wallace told Netz that a notice of termination had been sent to Mead and explained that the Mead contract provided for a change in contractors in event of Mead's default.
*298 At a special meeting of the board on February 13, 1971, after the lawsuit against Mead had been commenced, the following motion was adopted:
"Moved by Supervisor Chamernick, that based upon all of the files and records and correspondence relative to the Kelly Lake Water Well, and upon the recommendation of the project engineer, Robert R. Wallace and Associates, Inc., that said engineer be instructed to obtain the services of a competent contractor to perform the contract according to the specifications as set out in the contract between the Town of Stuntz and Mead Well Drilling Company, Inc., dated May 4, 1970."
Pursuant to this motion, Wallace called Netz, asking that Layne take over the construction of the water-supply well since the Mead contract had been terminated and Stuntz was suing to recover from Mead's bonding company. Netz agreed but told Wallace that Layne could do the work only on a time-and-materials basis. Netz returned to Hibbing a few days later, and drew up a one-page handwritten contract for the construction of a water-supply well which was signed on February 18, 1971, by Netz on behalf of Layne and by Peter Terzich, chairman of the board.
On March 1, 1971, Layne sent men and equipment to the site and began to drill a new well about 50 feet from the holes left by Mead. Testimony was offered that Layne chose to drill a new well because of the unreliability of Mead's drilling records and to avoid interference with Mead's work and materials in light of the pending litigation between Mead and Stuntz.
By early April, Layne had reached a depth of 200 feet without finding water. Wallace directed Layne to continue drilling deeper and by the end of April, Layne had reached the taconite level at 334 feet. After extensive efforts to obtain water from the slaty material between 274 and 334 feet had failed, Wallace ordered Layne to drill into the taconite below. Layne needed special equipment and subcontracted with Anderson Well Drilling of Duluth which had a special air rotary drill for this purpose. After Anderson had drilled to a depth of 700 feet without reaching water, Wallace and the board decided to terminate Layne's efforts and Layne moved out of the site on August 17, 1971.[1]
On May 31, 1971, during the performance of the contract, Stuntz had made a partial progress payment to Layne of $19,637.56 pursuant to an invoice for work completed through April 29, 1971. However, Stuntz refused to pay Layne for the balance of its work and in September 1972 Layne brought this action against Stuntz. Stuntz denied liability on the basis that the contract had been let without advertising for competitive bids pursuant to Minn.St. 365.37,[2] and was thus void and of no effect. Stuntz counterclaimed to recover the $19,637.56 already paid to Layne on the first invoice.
The trial court found that the minutes of the board contained no declaration of an emergency nor was there an emergency in fact to allow for a waiver of the competitive-bidding statute, and that the "force" provision in the Mead contract was not applicable and did not serve to waive the statutory requirement. Therefore, the trial court concluded that the Layne contract was void and unenforceable. Further, since no water had been found, Layne had conferred *299 no benefit on Stuntz and could not recover in quasi-contract even though the unpaid value of the services and materials furnished was $28,551.79. The trial court also denied recovery to Stuntz of the $19,637.56 paid to Layne during its performance.
Three issues have been raised on appeal: (1) Whether the Layne contract was excepted from the competitive-bidding requirement set forth in Minn.St. 365.37; (2) whether Layne should have been allowed to recover for the services and materials furnished to Stuntz under a theory of quasi-contract; and (3) whether Stuntz should have been granted recovery of the amount paid to Layne during the course of Layne's performance.
1. Although the trial court found the Layne contract had been ratified by the subsequent acts of the board, despite the board's failure to authorize it in the first instance,[3] the trial court determined that the contract was void since it had been let without advertising for competitive bids pursuant to Minn.St. 365.37.
Layne argues that the competitive-bidding requirement was not applicable to its contract with Stuntz for the following reasons: (a) Layne was the only contractor available with the requisite skill to perform the work; (b) Stuntz had entered into the contract with Layne to complete the Mead contract; and (c) there was a "special emergency" which allowed for a waiver of the competitive-bidding requirement.
(a) Whether Layne was the only contractor with the requisite skill to perform the job of drilling the well was not considered by the trial court and may not be raised for the first time on appeal. Failure to plead and offer proof of this allegation in the trial court precludes Layne's assertion before this court. Duenow v. Lindeman, 223 Minn. 505, 27 N.W.2d 421 (1947); 1B Dunnell, Dig. (3 ed.) § 384.
(b) Layne contends that its contract with Stuntz was let in order to complete the Mead contract and thus was not subject to the mandatory bidding requirement of Minn.St. 365.37.
There is no dispute that Stuntz attempted to terminate its contract with Mead and made unsuccessful efforts to charge Mead's surety with the expense of the completion of Mead's work. However, Stuntz and Mead continued negotiations regarding Mead's continuation of the drilling even after proper notice of termination had been served, and the $16,784.50 stipulated judgment against Stuntz makes it apparent that the parties agreed that Mead had not defaulted on or abandoned its contract with Stuntz.
In any event, Layne drilled its own well to a depth of 700 feet, utilizing no part of Mead's labor or materials. The trial court concluded, and we agree, that Stuntz' contract with Layne was not let for the completion of the Mead contract but was a wholly new and separate undertaking to attain the same objective, which was the location of a source of water to supply Kelly Lake.[4]
*300 (c) Layne also argues that the "special emergency" provision in Minn.St. 365.37 allows a town board to let a contract without advertising for competitive bids and that such an emergency existed with respect to Kelly Lake in February 1971.
At a special meeting in April 1970, the board had declared such an emergency before authorizing the contract with Mead. Layne argues that the situation at Kelly Lake had worsened by the time of its contract with Stuntz in February 1971, and offered testimony at trial to show that the board and its attorney had believed an emergency existed, although the board failed to adopt a formal resolution to that effect.
The term "emergency" signifies a "situation which has suddenly and unexpectedly arisen and which requires speedy action." 64 Am.Jur.2d, Public Works and Contracts, § 39. It is the general rule that an emergency exists in situations where immediate action must be taken, essential to the health, safety, or welfare of the community. 10 McQuillin, Municipal Corporations (3 ed.) § 29.38, qualifies the definition by stating:
"* * * However, an emergency which will warrant dispensing with advertising for competitive bids must be present, immediate and existing, and not a condition which may or may not arise in the future, or a condition which reasonably may be foreseen in time to advertise for bids."
The evidence in the instant case does not establish the existence of a special emergency but only of extreme pressure applied to the board by the citizens of Stuntz to obtain water for the lake, primarily for recreational and aesthetic purposes. Moreover, the trial court concluded that the conditions at the time of the Layne contract were no worse than those which had existed during the previous 2 years and that the health, welfare, and safety of the citizens of the township did not require such immediate action that it was necessary to dispense with competitive bids.
We stated in Griswold v. County of Ramsey, 242 Minn. 529, 536, 65 N.W.2d 647, 652 (1954), that a contract, let without competitive bidding where required by statute, is void as a matter of sound public policy and explained:
"* * * A fundamental purpose of competitive bidding is to deprive or limit the discretion of contract-making officials in the areas which are susceptible to such abuses as fraud, favoritism, improvidence, and extravagance."
See, also, Coller v. City of St. Paul, 223 Minn. 376, 26 N.W.2d 835 (1947). Since the Layne contract fell within the mandatory competitive-bidding requirement of Minn.St. 365.37, Layne's contract with Stuntz was void and unenforceable.
2. Although the majority of jurisdictions deny quasi-contractual recovery where a municipal contract has been let without compliance with competitive-bidding requirements, there has been a recent trend toward permitting recovery under the theory of unjust enrichment since such relief does not rest on the void or unenforceable contract. Recovery is permitted, however, only to the extent of the benefit conferred upon the municipality since this imposes upon the municipality no greater liability than if it had complied with the proper bidding requirements. 1A Antieau, Municipal Corporation Law, § 10.27.
Minnesota has long followed the view that a municipality may be held liable under theories of unjust enrichment or quasi-contract even though an express contract made and carried out in good faith is invalid because of noncompliance with statutory provisions requiring competitive bidding. Kotschevar v. Township of North Fork, 229 Minn. 234, 39 N.W.2d 107 (1949). We have avoided inequitable and unconscionable results by the application of this rule and contractors have been allowed to recover to the extent of the benefit received by the municipality, as distinguished from the value of the goods or services furnished. Lundin v. Township of Butternut Valley, 172 Minn. 259, 214 N.W. 888 (1927); Laird Norton Yards v. City of Rochester, 117 Minn. 114, 134 N.W. 644 (1912).
*301 It is important to note, however, that although we have allowed recovery where municipal benefit could be shown, relief has been denied under circumstances where a municipality has received no benefit at all. For example, in Lundin v. Butternut Valley Township, supra, a contractor undertook to construct a bridge pursuant to an invalid contract which violated the statutory bidding requirement. The bridge collapsed prior to completion and recovery of the reasonable value of labor and material furnished was denied because the town had received no benefit.
In Fargo Foundry Co. v. Village of Callaway, 148 Minn. 273, 274, 181 N.W. 584 (1921), in which we compelled the village to pay only the net value of what it received under an invalid contract, we observed:
"* * * The cause of action arises, not from any contract on the subject, but from the general obligation to do justice which binds all persons, natural and artificial. First Nat. Bank v. Village of Goodhue, 120 Minn. 362, 139 N.W. 599, 43 L.R.A.(N.S.) 84. The obligation to pay is measured by the benefit which the village has received.

"Plaintiff urges that it is entitled to the full amount of its claim, on the theory that the intrinsic value of the material furnished and the cost or value of the labor furnished were of that amount, that in law the benefit to defendant was this intrinsic value, irrespective of any use or failure of use as desired by the village, and that, whether the heating system performed the purpose desired by the village or not, its reasonable cost was the amount which the village must pay. We cannot sustain this contention. The heating plant was installed as a system. If, as a system, it was worthless and defendant was obliged to discard it at an expense, defendant has received no value for which it is required to pay." (Emphasis supplied.)
In the instant case, Layne had the right to recover in quasi-contract to the extent of the benefits actually received by Stuntz since the void contract was made in good faith and was one within the power of the municipality to make. However, since Layne has bestowed no benefit on Stuntz because no water was ever obtained through the drilling, Layne may not recover on a quasi-contractual basis. Although the result seems harsh, the deterrent effect of our rule serves to prevent the deliberate and repeated violation of the competitive-bidding statute and its application in this case must be sustained.
3. Finally, the trial court concluded that equity and good conscience precluded recovery by Stuntz of the $19,637.56 made as a progress payment to Layne. The evidence discloses that Layne performed its contract in good faith in accordance with the terms therein, as directed by Wallace. At no time during the course of Layne's performance, during which expenditures of labor and materials were made in reliance on the contract, did anyone inform Layne that the contract was an illegal one or that Layne would not be paid. Moreover, midway through Layne's performance Stuntz made the partial progress payment which Stuntz now seeks to reclaim.
In the absence of fraud or collusion on the part of the contractor, a municipality cannot recover payments made to a contractor where the invalidity of the contract stems merely from the fact that there was a violation of the competitive-bidding statute. See, Annotation, 33 A.L.R.3d 397, § 3; 64 Am.Jur.2d, Public Works and Contracts, § 130. In Village of Pillager v. Hewett, 98 Minn. 265, 107 N.W. 815 (1906), a contract had been let for a bridge without calling for competitive bids as required by law. The contract was entered into in good faith and the price to be paid was fair and reasonable, but the bridge was carried away by a flood after acceptance by the village, depriving the village of any benefit. The village had made progress payments and demanded their return. While we ruled that the village had no obligation to complete payments under the invalid contract, we noted that the consideration for the progress payments had been full and fair, and we denied *302 the village's claims for recovery finding it inequitable and unconscionable to compel the contractor to return the money. See, also, Gamewell Company v. City of Phoenix, 216 F.2d 928 (9 Cir. 1954).
We also denied recovery of partial progress payments in City of St. Paul v. Dual Parking Meter Co., 229 Minn. 217, 39 N.W.2d 174 (1949), where the city had violated several statutory provisions, including the competitive-bidding statute. In the instant case, there was no evidence of any fraud, collusion, or inequitable conduct by Layne, and Stuntz' counterclaim was properly denied.
Affirmed.
NOTES
[1]  Shortly thereafter Stuntz discovered an abandoned well which had been drilled by Layne in 1942 on Great Northern Railroad property, one-fourth of a mile from the site where Mead and Layne had failed to find water. Stuntz hired Layne to make repairs to the abandoned well and paid Layne $2,000 for this work. The well has provided an adequate supply of water to Kelly Lake since that time.
[2]  Minn.St. 365.37 provides in pertinent part: "* * * [A]ll contracts involving an expenditure of $1000 or more shall be let to the lowest responsible bidder after ten days public notice, posted in the three most public places in the town or published for two weeks in a newspaper generally circulated in the town, of the time and place of receiving bids. In cases of special emergency, amounts in excess of $1000 may be expended without such notice being given. * * * Every contract made and payment voted or made contrary to the provisions of this section shall be void * * *."
[3]  Since the town clerk had failed to keep an accurate and complete record of the proceedings of the board pursuant to Minn.St. 367.11, the trial court properly allowed the admission of parol evidence to supplement the minutes in an effort to determine whether authorization of the Layne contract had been made but inadvertently omitted from the written record of the board's proceedings. 5 McQuillin, Municipal Corporations (3 ed.) § 14.09. The trial court concluded that this extrinsic evidence did not establish proper authorization of the Layne contract but that the contract, expressly within the scope of Stuntz' corporate powers, had been ratified by the subsequent acts of the board and its agent, Wallace, and by the partial payment made to Layne. See, Chisholm Water Supply Co. v. City of Chisholm, 205 Minn. 245, 285 N.W. 895 (1939); Peterson v. County of Koochiching, 133 Minn. 343, 158 N.W. 605 (1916).
[4]  The question of whether reletting a contract for the purpose of completing an abandoned contract exempts the relet contract from the competitive-bidding requirement has not been decided by this court. The facts in this case do not allow a determination of this question since the trial court concluded that the Mead contract had not been abandoned.
