
83 Wis.2d 686 (1978)
266 N.W.2d 361
PUTTKAMMER, d/b/a Asphalt Spraying Company, Appellant,
v.
MINTH, Respondent.
No. 76-082.
Supreme Court of Wisconsin.
Submitted on briefs May 3, 1978.
Decided June 6, 1978.
*687 For the appellant the cause was submitted on the brief of James H. Mason of Land O'Lakes.
For the respondent the cause was submitted on the brief of Dennis M. Burgy, and Drager, O'Brien, Anderson & Stroh of Eagle River.
CONNOR T. HANSEN, J.
On November 20, 1974, Victor Puttkammer, d/b/a Asphalt Spraying Co., plaintiff-appellant, commenced this action against the defendant-respondent, Arthur Minth, seeking compensation for improvements made to certain real property owned by Minth. The complaint was subsequently amended, and the material facts alleged in the amended complaint and assumed to be true for purposes of this appeal, are as follows:
The defendant, Minth, is the owner of the Hiawatha Supper Club in Eagle River, Wisconsin, which he leased during 1972 and 1973 to James Piekarski. During the period of the lease, the plaintiff, at the request of Piekarski, resurfaced the access and service areas of the supper club, providing labor and materials with a reasonable *688 value of $2,540, and increasing the value of the property by the same amount.
The defendant was aware that this work was being done and "stood by and acquiesced" in its completion. Piekarski did not pay for the work and was subsequently adjudged bankrupt, with no assets in his estate for the payment of plaintiff. The defendant now has the benefit of the improvements but refuses to pay for them, and the plaintiff has not been paid for any portion of the work.
The complaint further alleges that the plaintiff has exhausted his remedy against Piekarski and that if the defendant is not required to pay for the improvements, he will be unjustly enriched at the plaintiff's expense. The amended complaint therefore prays for damages in the amount of $2,540, plus costs and disbursements.
The defendant demurred to this amended complaint on the ground that it failed to state a cause of action. The trial court sustained the demurrer and denied the plaintiff leave to further amend the complaint.
The issues on this appeal are whether the complaint alleges facts sufficient to state a cause of action and whether the trial court abused its discretion in denying the plaintiff the right to plead over.
[1]
The rules applicable on review of an order sustaining or overruling a demurrer have been stated so often that they need not be set forth in detail. See, e.g., Gorski v. Gorski, 82 Wis.2d 248, 252, 262 N.W.2d 120 (1978). It is sufficient to state that the material facts pleaded in the complaint will be accepted as true, and the complaint will be liberally construed and will be upheld if it expressly or by any reasonable inference states a cause of action.
The plaintiff maintains that the complaint states a cause of action in equity for unjust enrichment. The elements *689 of such a cause of action are: (1) a benefit conferred upon the defendant by the plaintiff; (2) an appreciation or knowledge by the defendant of the benefit; and (3) acceptance or retention by the defendant of the benefit under circumstances making it inequitable for the defendant to retain the benefit without payment of its value. S & M Rotogravure Service, Inc. v. Baer, 77 Wis. 2d 454, 460, 252 N.W.2d 913 (1977); Seegers v. Sprague, 70 Wis.2d 997, 1004, 236 N.W.2d 227 (1975); Gebhardt Bros., Inc. v. Brimmel, 31 Wis.2d 581, 584, 143 N.W.2d 479 (1966); Don Ganser & Assos., Inc. v. MHI, Inc., 31 Wis.2d 212, 217, 142 N.W.2d 781 (1966); Kelley Lumber Co. v. Woelfel, 1 Wis.2d 390, 83 N.W.2d 872 (1957); Nelson v. Preston, 262 Wis. 547, 55 N.W.2d 918 (1952).
The amended complaint in the present case alleges facts sufficient to satisfy the first and second of these requirements. The complaint alleges that a benefit has been conferred on the defendant in that the value of his property has been enhanced by $2,540. The complaint also alleges appreciation by the defendant of the fact of the benefit, since it is alleged the defendant was aware the work was being performed and stood by and acquiesced in its completion.
The question is whether the complaint alleges facts sufficient to establish, either expressly or by inference, the third requirement: that the benefit was accepted or retained under such circumstances as to make retention of the benefit of the resurfacing, without payment therefor, inequitable.
[3]
In an action for unjust enrichment, "`. . . [r]ecovery is based upon the universally recognized moral principle that one who has received a benefit has the duty to make restitution when to retain such benefit would be unjust.' . . ." Fullerton Lumber Co. v. Korth, 37 Wis.2d 531, 536, 155 N.W.2d 662 (1968), quoting Arjay v. Kohlmetz, 9 *690 Wis.2d 535, 539, 101 N.W.2d 700 (1960). It is not enough to establish that a benefit was conferred and retained; the retention must be inequitable.
The law in this state thus recognizes the principle set forth in the Restatement, Restitution, sec. 1, Comment c., p 13, that:
". . . Even where a person has received a benefit from another, he is liable to pay therefor only if the circumstances of its receipt or retention are such that, as between the two persons, it is unjust for him to retain it. The mere fact that a person benefits another is not of itself sufficient to require the other to make restitution therefor . . ."
See also: 66 Am. Jur.2d, Restitution and Implied Contracts, secs. 3, 4, pp. 946, 947.
The defendant relies upon a series of cases in which subcontractors, unable to recover from the general contractor with whom they contracted, have sought to recover payment for labor and materials directly from property owners on a theory of unjust enrichment. In these cases, this court has denied recovery and has held that retention of the benefit of the improvements by the owner is not unjust. Seegers v. Sprayue, supra; Gebhardt Bros., Inc. v. Brimmel, supra; Superior Plumbing Co. v. Tefs, 27 Wis.2d 434, 134 N.W.2d 430; and Utschig v. McClone, 16 Wis.2d 506, 114 N.W.2d 854 (1962). The denial of recovery in the subcontractor cases is attributable to the fact that in such cases the owner has paid, or is obligated to pay, the general contractor for the value of the improvements. Retention of the benefits is therefore equitable. In the recent case of S & M Rotogravure Service, Inc. v. Baer, supra, at 465, this court reviewed several of the subcontractor cases and concluded that:
". . . the critical factor in each was that it appeared, upon the face of the [sic] the complaint or upon the evidence after trial, that the defendant had paid another for the benefits conferred, and thus it was not inequitable to permit the defendant to retain the benefits without *691 paying the plaintiff. Hence the third element of unjust enrichment, that the defendant would be unjustly enriched, was nonexistent."
This "critical factor" is not present here. There is no suggestion that the defendant has paid for the benefits, and the cases cited by the defendant are therefore inapposite.
The plaintiff, on the other hand, relies on two cases sustaining actions by contractors against property owners on the theory of unjust enrichment.
In Nelson v. Preston, supra, a plumbing contractor had contracted with a developer, Franklyn Preston, to provide labor and materials in connection with the construction of eight houses. Preston did not own the houses; his mother did. Preston was not a co-owner of the property and was not an agent of his mother, nor did his mother have any part in contracting for the improvements. Nevertheless, this court concluded that the mother would be unjustly enriched if permitted to retain the benefits, and she was therefore required to pay for the work.
The decisive consideration in the Nelson Case was the relation between the party at whose instance the work was performedthe sonand the party from whom recovery was sought, the mother. This court emphasized that the mother and son were jointly engaged in developing a subdivision, with the son building houses which were then sold, with the proceeds going to the mother. This court found that there was "a relation . . . between the mother and the son under which services and material procured by the son from the [contractor] were to go into her property and to become of benefit to her." Nelson, supra, at 554. In view of this relation, this court held that it would be unjust for the mother to retain the benefits of the improvements without paying therefor.
Kelley Lumber Co. v. Woelfel, supra, was an appeal from the overruling of a demurrer. There, the complaint *692 alleged that the plaintiff had sold building supplies to a William Woelfel, who had used them to construct a house. Shortly after selling the house, Woelfel died, and the plaintiff sought to recover the value of the building supplies from Woelfel's widow on a theory of unjust enrichment.
This court held that the complaint stated a cause of action. The house in which the materials were used was located on a lot which had been owned jointly by Mr. and Mrs. Woelfel, and the sale proceeds had been deposited in their joint checking account and had passed to Mrs. Woelfel on her husband's death. Further, the complaint alleged that the widow had "assented" to the use of the materials and had "accepted" them. In Kelley, therefore, as in Nelson, there was a relationship between the party procuring the work and the party from whom recovery was sought, or an intermingling of their interests such that the services were provided for the benefit of both parties.
In S & M Rotogravure Service, Inc. v. Baer, supra, as in the present case, a contractor sought to recover in unjust enrichment from a property owner for work done under contract with the owner's lessee. This court upheld the complaint as against a demurrer. In that case, however, the complaint alleged that much of the work had been performed "at the special instance and request" of the property owner; that the owner had approved all plans for the work and all payments therefor; and that the payments were made by checks drawn on the owner's account. S & M Rotogravure Service, Inc. v. Baer, supra, at 461.
Nelson v. Preston, supra; Kelley Lumber Co. v. Woelfel, supra; and S & M Rotogravure Service, Inc. v. Baer, supra, are distinguishable from the instant case. Each of those cases was decided on the basis of the special relationship that existed between the party procuring the *693 work and the party retaining the benefits. These relationships were such that it was not inequitable to hold that the work had been for the benefit of both parties. These cases are exceptions to the general rule. They rest on the proposition that interests of the owner and occupant or procurer of services are closely intermingled and the benefits of the transaction are by prearrangement to be shared between them.[1]
The case before us is not such a case. Rather, this case is representative of the usual case in which the owner has no part in initiating the work and is merely a passive beneficiary of the work performed at the instance of another.[2] The unjust enrichment or restitution claim is asserted by one who did the work, and produced an incidental gain to the owner, by merely performing his contract with another and is now dissatisfied because the return promised under the contract is not forthcoming. In a sense it can be said that the contractor, at least to the extent of the gain, seeks to make the owner an insurer of the contract entered into by the defaulting procurer. The fact that the owner knew of the work, acquiesced in its performance and voiced no disapproval of the work, does not make the owner liable. There is no allegation in the instant complaint from which it can reasonably be inferred that the work was done by authority of the owner.
The general rule of the authorities which have come to our attention is summarized in 98 C.J.S., Work & Labor, sec. 42, pp. 779, 780, as follows:
*694 ". . . [A] landlord or lessee [sic] cannot be held liable for materials furnished and labor performed by plaintiff on the leased premises where plaintiff entered into the undertaking looking only to the tenant or lessee for payment, in the absence of anything to show that the landlord ordered the work, or authorized anyone to have it done, or ratified the work after it was done, and notwithstanding the landlord ultimately benefits from the work that was done by reason of his ownership of the property."
In the instant case the complaint does not allege or reasonably imply that the work was ordered or ratified by the defendant; that the plaintiff performed the work expecting to be paid by the defendant; that the plaintiff was prejudiced by any misconduct or fault on the part of the defendant; or that the interests of Piekarski and the defendant were so related or intermingled that it can be said that the contract was executed for the defendant's benefit. The most that can be said from the complaint is that the defendant knowingly acquiesced in the performance of the work. This is insufficient basis to impose liability on one who did not request the work and may not have desired it. The trial court was correct in ruling that the complaint fails to state a cause of action.
However, the plaintiff further argues that rather than entering judgment sustaining the demurrer and dismissing the action on its merits, the trial court should have granted the plaintiff a reasonable opportunity to plead over. This decision rests within the sound discretion of the trial court. Selective Ins. Co. v. Michigan Mut. L. Ins. Co., 36 Wis.2d 402, 153 N.W.2d 523 (1967); Angers v. Sabatinelli, 239 Wis. 364, 1 N.W.2d 765 (1942). In sustaining the demurrer, the trial court stated:
"Ordinarily, this court when sustaining a demurrer prefers to grant opposing counsel a limited time to amend its pleadings, but with the sustaining of this demurrer and the fact that the contracting tenant has been adjudged *695 bankrupt there seems to be no other options available."
It appears that this refusal to permit the plaintiff to plead over may have been premised on an erroneous view of the law. The trial court correctly stated that retention of the improvements was not inequitable because there had been no showing that the owner needed or wanted the resurfacing. The trial court further stated, however, that Gebhardt Bros., Inc. v. Brimmel, supra, "held against unjust enrichment on the grounds that plaintiff was not hired by defendant-owner." This suggests that the trial court's ruling may be based on a misconception that lack of privity precludes the existence of a cause of action for unjust enrichment.
However, this court's decisions establish that privity is not necessary for recovery on a theory of unjust enrichment. Such a theory may be asserted by a subcontractor or contractor against an owner without any contractual relation between the parties. See: Seegers v. Sprague, supra; S & M Rotogravure Service, Inc. v. Baer, supra.
[4]
We agree with the holding of the trial court that this complaint, as presently constituted, even given a liberal construction, does not state a cause of action against this defendant. The demurrer was properly sustained.
[5]
However, it appears the decision of the trial court not to permit further amendment of the complaint may have been founded on the erroneous premise that lack of privity precludes the existence of a cause of action for unjust enrichment. The trial court denied the plaintiff an opportunity to amend the complaint and entered judgment dismissing the action. We believe the plaintiff should have a reasonable opportunity to amend the complaint if he elects to do so and is able to allege facts and circumstances *696 sufficient to show that retention of the benefits by the defendant would be unjust.
Therefore we are obliged to reverse the judgment and remand the cause with directions to sustain the demurrer and grant the plaintiff leave to serve and file an amended complaint within thirty days from the date of remittitur, if he elects to do so.
By the Court.Judgment reversed and cause remanded.
NOTES
[1]  Dawson, The Self-Serving Intermeddler, 87 Harv. L. Rev. 1409, 1450 (1974).
[2]  See, e.g.: Griffith Co. v. Hofues, 201 Cal. App.2d 502, 19 Cal. Rptr. 900 (1962); Henske & Sons, Inc. v. Cold Spring Holding Corp., 39 App. Div.2d 769, 332 N.Y.S.2d 730 (1972); Dowd H. Price Fixture Co. v. Flowers & Monroe, Inc., 175 S.E.2d 695 (N. C. App. 1970); La Chance v. Rigoli, 325 Mass. 425, 91 N.E.2d 204 (1950).
