
262 S.E.2d 705 (1980)
ROCKINGHAM SQUARE SHOPPING CENTER, INC.
v.
TOWN OF MADISON.
No. 7917SC253.
Court of Appeals of North Carolina.
February 19, 1980.
*707 C. Orville Light, Madison, for plaintiff-appellant.
S. J. Webster, Jr. and Donald P. Eggleston, Madison, for defendant-appellee.
PARKER, Judge.
Upon its motion for summary judgment on plaintiff's cause of action, defendant town had the burden of showing that there was no triable issue of fact, and that it was entitled to judgment as a matter of law. Pitts v. Pizza, Inc., 296 N.C. 81, 249 S.E.2d 375 (1978); Kessing v. Mortgage Corp., 278 N.C. 523, 180 S.E.2d 823 (1971). Because plaintiff's complaint on its face discloses that no cause of action exists, summary judgment for defendant was properly granted in the present case. McNair v. Boyette, 282 N.C. 230, 192 S.E.2d 457 (1972).
The basis of the action here at issue was a purported express contract entered into between plaintiff corporation and defendant Town of Madison. Plaintiff alleged that, in consideration of plaintiff's agreement to grade and pave C Street, a road owned by the Town of Madison, the town agreed to open Lonesome Road as an inducement for plaintiff to build a shopping center in Madison. The first question presented is whether, assuming that such an express contract existed, the town of Madison had the legal power to enter into it so as to be liable for breach thereof. As stated by our Supreme Court in Madry v. Town of Scotland Neck, 214 N.C. 461, 199 S.E. 618 (1938):
A municipality is a creature of the Legislature and it can only exercise (1) the powers granted in express terms; (2) those necessarily or fairly implied in or incident to the powers expressly granted; and (3) those essential to the accomplishment of the declared objects of the corporation. . .. In exercising such powers the municipal corporation's authority to bind itself by contract is limited. . ..
214 N.C. at 462, 199 S.E. at 619.
G.S. 160A-296 provides an express grant of power to municipalities "to open new streets and alleys, and to widen, extend, pave, clean, and otherwise improve existing streets, sidewalks, alleys, and bridges." This power is to be exercised in the discretion of the governing body of the municipality acting in its governmental, rather than its proprietary, capacity. Improvement Co. v. Greensboro, 247 N.C. 549, 101 S.E.2d 336 (1958); Hoyle v. Hickory, 164 N.C. 79, 80 S.E. 254 (1913). Although there is no question that a municipal corporation has the power to enter into contracts, there are certain limitations on its governing body's power to contract with respect to its governmental authority. As stated by our Supreme Court in Edwards v. Goldsboro, 141 N.C. 60, 53 S.E. 652 (1906):
Powers are conferred upon municipal corporations for public purposes; and as *708 their legislative powers cannot, as we have just seen, be delegated, so they cannot, without legislative authority, express or implied, be bargained or bartered away. Such corporations may make authorized contracts, but they have no power, as a party, to make contracts . . which shall cede away, control, or embarrass their legislative or governmental powers . . .. [The governing body] must at all times retain freedom of judgment, so that its decisions will be influenced only by a regard for the public welfare. 141 N.C. at 64-65, 53 S.E. at 653.
Accord, Improvement Co. v. Greensboro, supra; 10 McQuillin, The Law of Municipal Corporations, § 29.07, pp. 244-246. (3rd Ed. 1966 Revised Volume). If a contract does restrict the discretionary authority of the governing body of a municipality, it is ultra vires and of no legal effect. "The objection to the contract is, not merely that the corporation ought not to have made it, but that it could not make it." Jenkins v. Henderson, 214 N.C. 244, 248, 199 S.E. 37, 40 (1938). Thus, there can be no right of action upon the contract for its breach, and no performance on either side can give it any validity. Madry v. Scotland Neck, supra; Jenkins v. Henderson, supra.
Applying these principles to the present case, we conclude that the alleged contract relied upon by plaintiff is ultra vires, and, therefore, unenforceable. Assuming that a contract was in fact entered into between the parties, that contract purported to restrict the statutory discretion vested by G.S. 160A-296 in the Board of Aldermen of the Town of Madison to determine whether a street should be opened for the public benefit. Even if the opening of Lonesome Road would in fact serve the interest of the residents of Madison, the governing body's agreement with plaintiff, a private party, to do so would nevertheless be void as against public policy. Neither does plaintiff's performance of its part of the agreement in expending money for the paving of C Street render the agreement valid, since the Town of Madison cannot be estopped from asserting that the agreement was ultra vires and therefore void. Jenkins v. Henderson, supra. Thus, the alleged express contract being void, plaintiff corporation had no cause of action for its breach.
Having determined that plaintiff was not entitled to recover for breach of any express contract, we next consider whether plaintiff is entitled to recover the sum of $20,000, the amount by which it alleges defendant has been unjustly enriched at the expense of the plaintiff because of the paving of C Street. Plaintiff contends that even if the express contract is unenforceable, defendant Town of Madison may not retain the benefits of the paving without paying therefor. In support of its contention, the corporation relies upon the Supreme Court decision in Hawkins v. Dallas, 229 N.C. 561, 50 S.E.2d 561 (1948). In that case, the plaintiff brought an action against a municipality to recover on a theory of express contract for the paving of streets and the laying of sewer lines. The contract in question was improperly let because the municipality had failed, as required by statute, to take bids for the work. Although the court held that the contract was void because the statutory bidding requirements were not met and that the plaintiff had no right of recovery on the contract, it nevertheless concluded that the municipality, having accepted the plaintiff's services and materials, was bound to compensate him for the reasonable and just value of the benefits received.
The decision in Hawkins v. Dallas, supra, is in accord with the general rule that, where a contract is within the scope of the municipal powers but is void and unenforceable as an express contract because of irregularities in execution or performance, recovery may still be had for the value of benefits received by the municipality on a theory of implied contract. 10 McQuillin, supra, at § 29.111, pp. 536-537; see also, Manufacturing Co. v. Charlotte, 242 N.C. 189, 87 S.E.2d 204 (1955); Moore v. Lambeth, 207 N.C. 23, 175 S.E. 714 (1934); McPhail v. Commissioners, 119 N.C. 330, 25 S.E. 958 (1896). However, a distinction has *709 been drawn between cases in which the express contract involves an irregular exercise of a corporate power to contract, and those in which the express contract is ultra vires because the power of the municipality to contract is absent. In the latter cases, the municipality may not be bound, even in implied contract, for the value of benefits received. See generally, McQuillin, supra, § 29.111a, pp. 542-544; Annot., 154 A.L.R. 356, pp. 370-373 (1945); Annot., 110 A.L.R. 153, pp. 159-161 (1937). One rationale for such a rule is that the law will not permit a party to benefit directly or indirectly from a contract which is against a public policy. Our Supreme Court applied this rationale in Insulation Co. v. Davidson County, 243 N.C. 252, 90 S.E.2d 496 (1955), holding that a contract between a county and a private corporation of which the county manager was an officer was not only unenforceable, but that public policy precluded the corporation from recovering in an action indebitatus assumpsit on a quantum meruit basis. For the same reason of public policy, there can be no recovery in quasi contract by plaintiff in the present case. The express contract alleged by plaintiff being void as founded upon an illegal consideration, i. e., the promise of the Board of Aldermen to restrict its legislative discretion, plaintiff may not recover on account of the money he expended in executing his part of the agreement.
For the reasons stated, the judgment appealed from is
Affirmed.
MORRIS, C. J., and HILL, J., concur.
