
919 S.W.2d 1 (1996)
RIVER'S BEND RED-E-MIX, INC., Suburban Concrete, Inc., Appellants,
v.
PARADE PARK HOMES, INC., Housing Development And Info Cntr., Missouri Gas Energy, Respondents.
No. WD 50851.
Missouri Court of Appeals, Western District.
January 9, 1996.
Motion for Rehearing and/or Transfer Denied February 27, 1996.
Application to Transfer Denied April 23, 1996.
*2 Weston A. Sechtem, Kansas City, for appellants.
John Lawrence Williams, Kansas City, for Parade Park Homes & Housing Development Corp.
Douglas M. Weems, Kansas City, for Missouri Gas Energy.
Before FENNER, C.J., P.J., and SPINDEN and SMITH, JJ.
Motion for Rehearing and/or Transfer to Supreme Court Denied February 27, 1996.
FENNER, Chief Judge.
River's Bend Red-E-Mix, Inc., and Suburban Concrete, Inc., appeal the trial court's decision sustaining Missouri Gas Energy's motion to dismiss for failure to state a claim for which relief could be granted. The judgment of the trial court is affirmed.
Missouri Gas Energy (MGE) is the owner and operator of a franchise and gas pipeline which provides natural gas to a substantial part of the Kansas City metropolitan area. MGE is a successor in interest of the franchise which was granted to Kansas Power & Light Company (KPL) and Western Resources, Inc., by the City of Kansas City, Missouri. KPL hired Able Contracting Company (Able) as a general contractor to provide labor and concrete to repair surface damage to city streets resulting from KPL's work on its pipeline. River's Bend Red-E-Mix, Inc. (River's Bend) and Suburban Concrete, Inc. (Suburban) supplied concrete materials to Able under an open account agreement.
Able failed to make payments under the open account agreement, and River's Bend and Suburban filed a mechanic's lien on MGE's pipeline, the City of Kansas City, Missouri's utility easements, and the fee simple title to the property owned by Parade Park Homes, Inc. (Parade Park) running over and adjoining the pipeline. River's Bend and Suburban then filed petitions seeking foreclosure of the mechanic's liens and recovery under quantum meruit.
MGE, the successor in interest of KPL, filed a motion to dismiss arguing that (1) no mechanic's liens were available to plaintiffs because they did not perform work under contracts with the owner of the real estate and because the statute does not provide liens against a gas pipeline and franchise, (2) *3 the Public Service Commission had exclusive jurisdiction over any attempt to transfer or otherwise dispose of a gas corporation's franchise, works, or system, and (3) public policy prohibited the enforcement of mechanic's liens in this situation. The trial court granted MGE's motion to dismiss, and this appeal followed.
On appeal, River's Bend and Suburban claim that the trial court erred in granting MGE's motion to dismiss on the grounds cited by MGE in its motion. The judgment of the trial court sustaining the motion may be upheld on the first ground.
Review of a motion to dismiss for failure to state a claim is solely a test of the adequacy of the plaintiff's petition. Nazeri v. Missouri Valley College, 860 S.W.2d 303, 306 (Mo. banc 1993). All of plaintiff's facts and averments are assumed to be true, and the non-moving party is given the benefit of all reasonable inferences that are fairly deducible from the facts. Id.
The applicable mechanic's lien statute, § 429.020, RSMo 1994, provides:
Every mechanic or other person who shall do or perform any work or labor or furnish any material for the construction of any street, curb, sidewalk, sewerline, waterline, or other pipeline in front of, adjacent to, along or adjoining any lot, tract or parcel of land ... under or by virtue of any contract with the owner or proprietor of such lot, tract or parcel of land, or his agent, trustee, contractor or subcontractor... shall ... have a lien upon such lot, tract or parcel of land for his work or labor done, or material furnished.
Section 429.020, RSMo 1994. An exception exists, however, barring the imposition of a mechanic's lien on public property owned by a traditional governmental body and devoted to public use. Redbird Eng'g Sales, Inc. v. Bi-State Dev. Agency, 806 S.W.2d 695, 697 (Mo.App.1991). In Redbird Engineering Sales, Inc. v. Bi-State Development Agency, the Eastern District held that a quasi-public corporation which is affected with a public use is also encompassed within the exception and is not subject to a mechanic's lien.[1]Id. at 698. Not all property held by a quasi-public corporation, however, is automatically protected from the imposition of a mechanic's lien. Id. "Only such property held by a quasi-public corporation for the benefit of the public which can be determined to be reasonably necessary for public use is exempt." Id. (citing Burgess v. Kansas City, 259 S.W.2d 702, 704 (Mo.App.1953)).
In Redbird, a subcontractor brought an action seeking imposition of a mechanic's lien on the property owned by a development agency involved in the construction of a public transportation facility after the contractor failed to pay the amount owed for materials. Id. at 696-97. The Eastern District determined that the agency's property, a garage where public buses were kept and repaired, was reasonably necessary for public use and rendered the property exempt from the mechanic's lien. Id. at 698.
In this case, MGE is a quasi-public corporation and its pipelines are reasonably necessary for public use. MGE's predecessor in interest, KPL, was granted a franchise from the city of Kansas City, Missouri, to provide natural gas to residences throughout the metropolitan area. MGE, as a gas and pipeline corporation, is a public utility as defined by section 386.020(32), RSMo 1994. Section 393.010, RSMo 1994 authorizes it to "manufacture and sell and to furnish such quantities of gas ... as may be required by the city" and "to lay conductors for conveying gas ... through the streets, alleys and squares of any city." § 393.010, RSMo 1994. To allow River's Bend and Suburban to disable and sell MGE's pipelines would render MGE unable to perform its duties to the public. The pipelines, therefore, are reasonably *4 necessary for a public use, and are not subject to a mechanic's lien.
Likewise, the mechanic's lien may not be enforced against the utility easements owned by the City of Kansas City, Missouri. An easement is an interest in land entitling the owner of the easement to a limited use of the land. Gilbert v. K.T.I., Inc., 765 S.W.2d 289 (Mo.App.1988). Kansas City's utility easements are governmental property interests in land devoted to public use and, thus, are not subject to the imposition of a mechanic's lien.
River's Bend and Suburban also attempt to enforce its mechanic's lien against the property of Parade Park. Section 429.020 grants a mechanic lien on private property adjacent to, along or adjoining a pipeline. "However, the statute sets forth as a prerequisite to the right of a lien that the work be performed or the materials be furnished `under or by virtue of any contract with the owner or proprietor of such lot, tract or parcel of land, or his agent, trustee, contractor or subcontractor'." J & H Gibbar Constr. Co., Inc. v. Adams, 750 S.W.2d 580, 585 (Mo.App.1988).
River's Bend and Suburban did not have a contract with the owner of the land, Parade Park. They argue, however, that the lien on Parade Park's property would be valid if it could be demonstrated that MGE was an agent or contractor of the landowners.
Agency is a legal concept consisting of three elements: (1) the agent's power to alter legal relationships between the principal and third persons and between the principal and himself, (2) a fiduciary relationship with respect to matters within the scope of the agency, and (3) the principal's right to control the conduct of the agent. State ex rel. Bunting v. Koehr, 865 S.W.2d 351, 353 (Mo. banc 1993). An agency relationship arises out of contract, express or implied. Markland v. Travel Travel Southfield, Inc., 810 S.W.2d 81, 83 (Mo.App.1991). No facts were pleaded by River's Bend and Suburban in their pleadings from which an agency or contractor relationship between Parade Park and MGE could be inferred. The trial court, therefore, did not err in sustaining MGE's motion to dismiss with respect to Parade Park.
Finally, River's Bend and Suburban claim that the trial court erred in dismissing their claims for quantum meruit. They argue that they can recover if MGE knew that they undertook the work with the expectation that MGE would pay for the work.
Quantum meruit is based on the concept of unjust enrichment. Lee Brothers Contractors v. Christy Park Baptist Church, 706 S.W.2d 608, 609 (Mo.App.1986). "Unjust enrichment occurs where a benefit is conferred upon a party under circumstances where retention of that benefit without paying for it would be unjust." Id. Payment or nonpayment by an owner determines the most important element for a recovery based on quantum meruitunjust enrichment. Id. Nonpayment of a general contractor by a property owner, therefore, must be pleaded and proved to establish a cause of action for quantum meruit. Id.; Green Quarries, Inc. v. Raasch, 676 S.W.2d 261, 265-66 (Mo.App. 1984).
In this case, River's Bend and Suburban failed to plead in their petitions nonpayment of Able by MGE. The trial court, therefore, did not err in dismissing their cause of action against MGE for quantum meruit.
The judgment of the trial court is affirmed.
All concur.
NOTES
[1]  It is significant to note that in Redbird, the court held that since Bi-State Development Agency was given responsibility to construct the public transportation facility in question, it was acting as an "agent" of the state. Therefore, the project was considered a public work within the purview of section 107.170, RSMo 1994, requiring the bonding of public work contractors. Redbird Eng'g Sales, Inc. v. Bi-State Dev. Agency, 806 S.W.2d at 701. That issue is not raised or addressed in this appeal, although we recognize that under Redbird, it could be argued that MGE would likewise be within the purview of section 107.170, RSMo 1994.
