
82 Wis.2d 469 (1978)
263 N.W.2d 167
VILLAGE OF McFARLAND, Respondent,
v.
TOWN OF DUNN, Appellant.
No. 75-848.
Supreme Court of Wisconsin.
Submitted on briefs February 8, 1978.
Decided March 7, 1978.
*471 For the appellant the cause was submitted on the briefs of Lloyd A. Schneider of McFarland.
For the respondent the cause was submitted on the brief of Bruce K. Kaufmann of Madison.
CONNOR T. HANSEN, J.
The single issue presented is whether the complaint states a claim on which relief may be granted.
[1]
The principles applicable in determining whether a complaint is subject to a demurrer or a motion to dismiss[1] have often been stated and need not be repeated *472 here. See, e.g.: Gorski v. Gorski, 82 Wis.2d 248, 262 N.W.2d 120 (1978). It is sufficient to observe that all material facts stated in the complaint must be assumed to be true and that the complaint must be given the most liberal interpretation possible in determining whether the facts are sufficient to state any cause of action. Bischoff v. Appleton, 81 Wis.2d 612, 619, 260 N.W.2d 773 (1978); Gorski v. Gorski, supra; De Bauche v. Knott, 69 Wis.2d 119, 121, 122, 230 N.W.2d 158 (1975).
The material facts alleged in the complaint, and assumed to be true for purposes of this appeal, are as follows:
McFarland and Dunn are municipal corporations located in Dane county, Wisconsin. At some time prior to the commencement of this action, McFarland had provided emergency police services within the Town of Dunn without charge to Dunn.
Prior to June, 1975, the village board of McFarland notified the town board of Dunn that McFarland would charge Dunn $70 for each emergency police call answered thereafter; that McFarland would consider any calls for assistance received from the Dane county sheriff's department dispatcher to be direct requests for assistance from Dunn, in the absence of any specific and direct order from an appropriate county official; and that McFarland would respond to such calls only on the understanding that it would be compensated at the rate of $70 per call.
From June through December, 1975, McFarland answered certain calls for assistance "... at the request of the Town of Dunn through the Dane County dispatcher and other direct means of communication and requests." *473 McFarland has demanded payment in the amount of $4,200 for the police services thus rendered, but Dunn has refused to pay.
On this appeal, Dunn contends, as it did in the trial court, that these facts do not state a cause of action. McFarland maintains that the complaint alleges facts sufficient to support recovery on a theory of express contract and on alternative theories of estoppel and unjust enrichment.
[2]
On appeal, we are obliged to construe the complaint liberally and to affirm the order of the trial court denying the motion to dismiss for failure to state facts sufficient to state a claim if the complaint expressly or by reasonable inference states any cause of action. Estate of Mayer, 26 Wis.2d 671, 677, 133 N.W.2d 322 (1965). The motion to dismiss must be denied if any cause of action is stated. Milwaukee County v. Schmidt, Garden & Erikson, 43 Wis.2d 445, 453,168 N.W.2d 559 (1969).
[3]
We are of the opinion that, liberally construed, the complaint sets forth facts sufficient to allege causes of action upon the theories of estoppel and unjust enrichment. Therefore, at this stage in the proceedings, it is not necessary for us to decide whether the complaint also sets forth facts sufficient to allege a cause of action on the theory of an express contract enforceable against the defendant, the Town of Dunn.
The complaint alleges that the village board of McFarland informed the town board of Dunn that it would continue to respond to calls for assistance only on the condition that Dunn would pay $70 for each such response. This allegation can reasonably be understood as an offer by McFarland, in accordance with the principle that:
*474 "An offer is the manifestation of willingness to enter into a bargain, so made as to justify another person in understanding that his assent to that bargain is invited and will conclude it."
Restatement 2d of Contracts (Tent. Draft Nos. 1-7, 1973), p. 58, sec. 24.
The complaint then states that law enforcement services were provided by McFarland "... at the request of the Town of Dunn...," and that these requests were conveyed (1) through the Dane county dispatcher, and (2) through "... other direct means of communications and requests."
The complaint thus alleges formation of a contract and it further alleges performance by McFarland, demand for payment, and refusal to pay by Dunn. However, the complaint does not expressly allege that the contract was authorized by the town board of Dunn. We express no view on the question whether the absence of such an allegation affects the enforceability of the contract alleged; on the view we have taken of the case, we do not reach this question.
It is generally held that municipal corporations may not be estopped to deny the validity of a contract which is ultra vires in the sense that it is not within the power of the municipality to make, 10 McQuillin, Municipal Corporations (1966 Rev. Vol.), pp. 512, 513, sec. 29.104c (hereinafter McQuillin); Pohland v. Sheboygan, 251 Wis. 20, 26, 27, 27 N.W.2d 736 (1947), and that estoppel cannot make enforceable a municipal contract which is not executed in compliance with the mandatory or prohibitive conditions expressly prescribed by statute, or which violates public policy. Blum v. Hillsboro, 49 Wis.2d 667, 183 N.W.2d 47 (1971) (contract not in compliance with competitive bidding requirements); Federal Paving Corp. v. Wauwatosa, 231 Wis. 655, 661, 286 N.W. 546 (1939); McQuillin, supra, pp. 513, 514, sec. 29.104c.
*475 The instant case is not within the category of a contract expressly prohibited by statute, nor does it violate public policy. Municipalities, including towns and villages, may contract with one another for the receipt or furnishing of law enforcement services or for mutual law enforcement assistance under see. 66.30(2), Stats.[2]See also: secs. 66.305 and 66.315.
The Town of Dunn has clear authority to execute a contract for law enforcement services, and the contract as alleged does not contravene any conditions affirmatively prescribed by statute. If the contract as pleaded is not enforceable, its nonenforceability stems only from the failure of the complaint to allege the expressed authorization of the town board of the Town of Dunn to make the contract. See: Sec. 60.29(1), Stats. 1973.
[4]
Where, as here, the power to make the contract is clearly vested in the municipality and the power may have been improperly or irregularly exercised by the municipality and its officers and agents, the doctrine of *476 equitable estoppel is properly invoked. McQuillin, supra, p. 507, sec. 29.104a; 56 Am. Jur.2d, Municipal Corporations, pp. 581-584, secs. 526, 527. Under this principle:
"... contracts ... as to which an estoppel may exist, include those defectively executed in some particular. Thus, where an officer having power to enter into a contract, if authorized by the proper municipal body, makes a contract without such authority, such body may ratify the contract....
"The acceptance by a municipal corporation of benefits under a voidable contract ... may be a sufficient ground to estop the municipal corporation from asserting the invalidity of the contract...." McQuillin, supra, pp. 509-511, sec. 29.104b.
The instant complaint expressly states that McFarland notified Dunn that charges would be imposed for any subsequent assistance and that Dunn then requested such assistance. Dunn does not deny that these services were rendered or that it received the benefit of these services. Any invalidity of the contract arises solely from uncertainty whether the requests were duly authorized by the town board.
The complaint can therefore be said to come within the rule that:
"... where a municipal corporation receives the benefit of the performance of a contract, invalid merely for the failure to comply with some formality in its execution not affecting the power of the corporation in the matter, it is thereby estopped to assert the invalidity of the contract...." 56 Am. Jur.2d, Municipal Corporations, pp. 582, 583, sec. 527.
The rule as stated above is consistent with the decisions of this court summarized in Bugge, Wisconsin Municipal Indebtedness, The Effects of Irregularities in Municipal Obligations and Contracts, 1964 Wis. L. Rev. 549, 577:
*477 "... [W]here the municipality has received and accepted benefits under a contract its agents were not authorized to enter, it has been held estopped to assert the lack of authority as a defense. Thus where a municipal officer, with the knowledge and apparent acquiescence of the governing board receives and accepts, as a result of an unauthorized or informal agreement, payment from a taxpayer in compromise of tax liability (Kneeland v. Gilman, 24 Wis. 39 (1869)) or services from an attorney, (MacLeod v. Washburn, 178 Wis. 379, 190 N.W. 124 (1922)) or a teacher, (Monagahan v. School Dist., 38 Wis. 100 (1875)) or the use of real property from a railroad, (Chicago St. P., M. & O. Ry. v. Black River Falls, 193 Wis. 579, 214 N.W. 451 (1927)) or maintenance services on a bridge serving the community, (Eau Galle v. Waterville, 207 Wis. 389, 241 N.W. 377 (1932)) or the performance of public works projects, (Marathon County v. Industrial Comm'n, 225 Wis. 514, 272 N.W. 374, 275 N.W. 437 (1937)) the municipality becomes liable on the informal agreement...."
This principle is applicable to the facts alleged and implied by the present complaint. The complaint states facts sufficient to allege the formation of a contract; implies that the contract was entered into by an agent or officer of the town; and alleges that the defendant received and accepted benefits thereunder. Acquiescence in the contract can reasonably be inferred from the allegation that numerous police calls, itemized in the exhibits appended to the complaint, were made at the request of Dunn over a seven-month period.
[5]
The complaint thus states a claim for relief on principles of equitable estoppel. If this claim is successful, the municipality will be estopped to deny the validity of the contract, and the plaintiff will be permitted to recover at the contract price. See: Blum v. Hillsboro, supra, at 676.
It is also the position of McFarland that the complaint states a further and alternative claim for relief on a *478 theory of unjust enrichment. In Blum v. Hillsboro, supra, this court held that a municipality may under certain circumstances be liable on a theory of unjust enrichment where a contract is invalid.
[6]
This liability arises when work has been performed for the municipality under a contract which is not malum in se but merely malum prohibitum, which is entered into in good faith, and which is devoid of bad faith, fraud or collusion, where the relevant statutes impose no penalty. Blum v. Hillsboro, supra, at 673. This rests on the principle that:
"... When a municipality has received the benefits of work performed, or materials furnished, in good faith, it is not just to permit the municipality to retain those benefits without paying the reasonable value thereof."
Dunn argues that there can be no recovery on this theory in the present case because the complaint does not allege a contract between the two municipalities. This assertion is incorrect because we believe the complaint states facts sufficient to allege the existence of a contract. Dunn cites no authority for its offhand assertion that the contract as alleged by the complaint is malum in se, and this argument is not persuasive.
[7]
Dunn also contends that the complaint is defective for failure to affirmatively allege that the contract was entered into in good faith. Although an action for unjust enrichment may not be maintained where the contract is not entered into in good faith, Blum v. Hillsboro, supra, at 673, it does not necessarily follow that good faith must be affirmatively or expressly pleaded by the plaintiff. The absence of an express allegation of good faith is not fatal to the instant complaint, and, liberally construed, the complaint alleges a claim for relief on a theory of unjust enrichment.
*479 [8]
Under this theory, the plaintiff's possible recovery is limited to the amount of plaintiff's actual costs, not including any profits or overhead costs, and may not exceed the original contract rate, and is also limited to the value of the benefits conferred. Blum v. Hillsboro, supra, at 674.
The order of the trial court is affirmed.
By the Court.Order affirmed.
NOTES
[1]  Demurrers were abolished, effective January 1, 1976, by sec. 802.01(3), Stats. The functional equivalent, under the present Rules of Civil Procedure, of the former demurrer for failure to state facts sufficient to constitute a cause of action is a motion to dismiss for failure to state a claim upon which relief can be granted, under sec. 802.06(2)(f). See: Judicial Council Committee's Notes to sec. 802.06.
[2]  Sec. 66.30(2), Stats. 1973, in effect at the time the instant cause of action arose, provided:

"(2) Any municipality may contract with another municipality or municipalities or the state or any department or agency thereof for the receipt or furnishing of services or the joint exercise of any power or duty required or authorized by statute."
This subsection, as subsequently amended, now provides:
"(2) In addition to the provisions of any other statutes specifically authorizing cooperation between municipalities, unless such statutes specifically exclude action under this section, any municipality may contract with other municipalities, for the receipt or furnishing of services or the joint exercise of any power or duty required or authorized by law. If municipal parties to a contract have varying powers or duties under the law, each may act under the contract to the extent of its lawful powers and duties. This section shall be interpreted liberally in favor of cooperative action between municipalities." Sec. 66.30(2), Stats. 1975.
