
718 So.2d 88 (1998)
John Steven WHITE, Petroleum Specialist, Inc., and Petroleum Engineering and Construction, Inc.
v.
Donald MILLER.
2970684.
Court of Civil Appeals of Alabama.
July 17, 1998.
*89 Mark J. Upton of Richardson, Daniell, Spear & Upton, P.C., Mobile, for appellants.
Carl Robert Gottlieb, Jr., and Kenneth A. Watson of Reams, Philips, Brooks, Schell, Gaston, Hudson & Gottlieb, P.C., Mobile, for appellee.
HOLMES, Retired Appellate Judge.
John Steven White, Petroleum Specialist, Inc., and Petroleum Engineering and Construction, Inc. (hereinafter referred to as "the contractor"), appeal a summary judgment in favor of Donald Miller.
Our review of the record reveals the following pertinent facts: Miller and the contractor entered into agreement, wherein the contractor agreed to build a convenience store/gas station for Miller. In the contract Miller agreed to pay the contractor "cost plus 20% of the total price, with a [price] not to exceed ... ($524,000), subject to additions and deductions pursuant to authorized change orders."
Miller paid approximately $520,000 under the contract. After the completion of the job, however, the contractor demanded an additional $144,514.39 for further improvements to the property. Miller did not respond, and the contractor filed a lien against Miller's property in the amount of $150,307.28.
Thereafter, Miller filed a complaint against the contractor, seeking declaratory and injunctive relief, as well as damages for breach of contract and fraud. Specifically, Miller requested that the trial court declare that he had no further obligation under the contract and order the contractor to cancel the lien. The contractor filed a counterclaim, seeking, among other things, enforcement of the lien.
During discovery, Miller learned that the contractor was not licensed to conduct business in Alabama in accordance with §§ 34-8-1 through -28, Ala.Code 1975. Miller amended his complaint and, accordingly, filed a motion for a summary judgment, based on the illegality of the contract. The contractor subsequently amended his counterclaim to assert additional claims for promissory fraud and deceit.
The trial court entered a partial summary judgment in favor of Miller on his claims for declaratory and injunctive relief and on all claims asserted by the contractor. The trial court subsequently entered an order, making the summary judgment final pursuant to Rule 54(b), Ala. R. Civ. P.
The contractor appeals. This case is before this court pursuant to § 12-2-7(6), Ala. Code 1975.
At the outset we note that in order for Miller to be entitled to a summary judgment, he must present evidence in accordance with § 34-8-1, Ala.Code 1975, showing "(1) that [the contractor] was unlicensed; (2) that the contracted work was of the type covered by the statute; and, (3) that the `cost' of the work was $20,000 or more." Tucker v. Walker, 293 Ala. 589, 592, 308 So.2d 245, 247 (1975).
It is undisputed that the contractor in this case was unlicensed, that the work was the type covered by the statute, and that the cost of the work exceeded $20,000. As such, the contractor cannot recover under a contract or a quasi-contract, or in an action to establish a mechanic's lien. J & M Industries, Inc. v. Huguley Oil Co., 546 So.2d 367 (Ala.1989).
It is well settled that "[e]xpress or implied contracts entered into by an unlicensed general contractor are null and void because they violate public policy." Goodwin v. Morris, 428 So.2d 78, 79 (Ala.Civ.App. 1983).
In Architectural Graphics & Constr. Servs., Inc. v. Pitman, 417 So.2d 574, 576 (Ala.1982), our supreme stated the following:
"This Court has held that § 34-8-1, et seq., Ala.Code 1975, is not a law enacted solely for revenue purposes, but rather is regulatory legislation designed to protect the public against incompetent contractors *90 and to assure properly built structures which are free from defects and dangers to the public. Cooper v. Johnston, 283 Ala. 565, 219 So.2d 392 (1969)."
Our supreme court, in commenting on § 34-8-1, noted that the statute was "a penal one, and harsh results sometimes flow from the construction of a penal statute." Hawkins v. League, 398 So.2d 232, 237 (Ala.1981).
On appeal, the contractor does not dispute that the contract is void and, thus, unenforceable. Instead, he contends that the licensing statute does not bar recovery in this case because, he says, his claims are based on theories of fraud, instead of contract. We find the contractor's contention to be without merit.
As noted previously, Miller commenced this case by filing an action based on a written contract. The contractor countersued, seeking recovery of a specific sum based on the contract. It was not until after Miller discovered that the contractor was unlicensed and moved for a summary judgment that the contractor sought to amend his counterclaim to assert claims for fraud and deceit.
The amount of damages claimed by the contractor in his amended counterclaim is specifically the same amount claimed in his original counterclaim. In other words, the damages that the contractor seeks for fraud and deceit are measured by the value of the work and labor performed under the contract. Hence, it is logical to conclude in this situation that the contractor's claims for fraud and deceit are intrinsically founded on, and are intertwined with, the facts surrounding the underlying contract. As such, the contractor cannot prevail. Stated differently, the contractor cannot circumvent the licensing statute by asserting claims for fraud and deceit when the facts surrounding his claims are grounded in contract. Architectural Graphics & Constr. Servs., Inc., supra.
The contractor also suggests that Miller should be estopped from asserting the illegality of the contract based upon Miller's own inequitable conduct, i.e., fraud and deceit. It is well settled, however, that the contractor "cannot, by way of estoppel, endow with validity a transaction which is illegal and against public policy." Cochran v. Ozark Country Club, Inc., 339 So.2d 1023, 1024 (Ala.1976).
Based on the foregoing, we conclude that the trial court did not err in entering a summary judgment in favor of Miller. Consequently, the judgment of the trial court is due to be affirmed.
The foregoing opinion was prepared by Retired Appellate Judge Richard L. Holmes while serving on active duty status as a judge of this court under the provisions of § 12-18-10(e), Ala.Code 1975. AFFIRMED.
ROBERTSON, P.J., and YATES, CRAWLEY, and THOMPSON, JJ., concur.
MONROE, J., concurs in the result.
