
770 P.2d 964 (1989)
95 Or.App. 719
TUM-A-LUM LUMBER, Respondent,
v.
Richard and Jean PATRICK, Appellants.
CSC 87-0858, CA A48888.
Court of Appeals of Oregon.
Argued and Submitted January 18, 1989.
Decided March 22, 1989.
Dale L. Smith, Hermiston, argued the cause for appellants. With him on the brief was Reynolds & Smith, P.C., Hermiston.
Brant Medonich, Pendleton, argued the cause for respondent. With him on the brief was Kottkamp & O'Rourke, Pendleton.
Before JOSEPH, C.J., and RIGGS and EDMONDS, JJ.
EDMONDS, Judge.
Defendants appeal from a judgment after a jury trial, assigning as error the trial court's denial of their motion to dismiss for failure to state a claim. ORCP 21 A. We reverse.[1]
We accept the facts pled by plaintiff as true. Sager v. McClenden, 296 Or. 33, 35, 672 P.2d 697 (1983). Plaintiff alleged that defendants entered into a construction contract with a contractor to build a barn on defendants' property, that plaintiff supplied raw materials to the contractor for use in construction of the barn, that after partial completion of the barn the contractor ceased work and that defendants did *965 not pay for the materials. The issue is whether the allegations suffice to state a claim for "unjust enrichment."
In order to state a claim for unjust enrichment, a complaint must contain allegations showing that the "enrichment" was "unjust." The mere fact that a benefit was conferred is insufficient. Porter Const. Co. v. Berry, 136 Or. 80, 91, 298 P. 179 (1931): Restatement of Restitution, § 1, comment c at 13 (1927). On facts similar to those alleged by plaintiff, a majority of courts have held that, before recovery can be obtained against the landowner, the furnisher of the materials must have exhausted all remedies against the contractor and still remain unpaid. See, e.g., Idaho Lumber, Inc. v. Buck, 109 Idaho 737, 710 P.2d 647 (1985); Paschall's, Inc. v. Dozier, 219 Tenn. 45, 407 S.W.2d 150 (1966); see also Annot., 62 A.L.R.3d 288 (1975).
We adopt the majority rule and hold that, under facts such as pled here, a material element that must be alleged and proved for a claim of unjust enrichment to succeed is that the remedies against the contractor were exhausted. The policy underlying the notice provisions of ORS 87.023[2] supports our holding. Those provisions are intended to provide notice to a landowner that the land may be subject to a construction lien by a furnisher of materials and provide a remedy to a furnisher of materials in plaintiff's circumstances.[3] No direct contractual relationship existed between the parties here. For these reasons, a furnisher of materials must exhaust all remedies against the contractor before the "enrichment" can be "unjust." Plaintiff failed to allege the necessary facts to state a claim for unjust enrichment.[4]
Reversed.
NOTES
[1]  Defendants' other assignments of error are moot as a result of this disposition.
[2]  Plaintiff could have filed a construction lien against defendants' property pursuant to ORS 87.001 et seq. Had it pursued that remedy, it would have complied with the notice requirements of ORS 87.023.
[3]  Restatement (Second) Restitution § 1, comment j, 24-25 (Tent draft No. 1, 1983), states:

"A statute that is particularly addressed to situations of unjust enrichment may also preclude a claim to restitution, though the claim would otherwise be maintainable * * * by providing remedies for certain cases of the type it deals with, the statute may be held to foreclose additional or more extensive relief in those cases, or to foreclose restitution in other cases of the same type."
[4]  Although there was testimony at trial that a "demand" was made on the contractor on behalf of plaintiff, there was also undisputed testimony that plaintiff did not sue the contractor or file a lien against the property. The testimony clearly establishes that plaintiff did not exhaust its remedies against the contractor. Thus, the pleading defect was not cured by evidence presented at trial. See Richards v. Dahl, 289 Or. 747, 753, 618 P.2d 418 (1980).
