
453 P.2d 149 (1969)
22 Utah 2d 348
Glen MOSLEY, Plaintiff and Appellant,
v.
Marinus JOHNSON and Katie A. Johnson, husband and wife, and DeLila Knudsen, Defendants and Respondents.
No. 11073.
Supreme Court of Utah.
April 3, 1969.
John L. McCoy, Milford, for appellant.
Fred L. Finlinson, Richard J. O'Rourke, Salt Lake City, for respondents.
ELLETT, Justice:
The appellant as plaintiff below sued to recover for the balance due him on a contract to drill a well for the respondents. His action was in two counts: (a) for the contract price; (b) for the reasonable value of the work done. The respondents, who were defendants below, defended on the ground that plaintiff was not licensed *150 to drill wells as required by Sec. 73-3-25, U.C.A. 1953, which provides:
Every person, * * * drilling a well or wells in the state of Utah shall, before the first day of May, 1937, and thereafter annually, make application to the state engineer for a permit to drill such well or wells. The application shall be in a form to be prescribed by the state engineer. All permits shall expire on the thirty-first day of December following the issuance thereof and shall not be transferable. The state engineer is authorized and directed to prepare and keep on file in his office rules and regulations for well drilling.

No person, * * * shall drill a well or wells in this state without having first obtained an annual permit therefor as provided in this section and without having first filed with the state engineer a bond in the penal sum of $500, conditioned upon the proper compliance with the provisions of this section and the rules and regulations promulgated pursuant thereto. Such bond shall be made payable to the state of Utah and shall be approved by the state engineer. Well drillers are required to comply with the rules and regulations to be promulgated by the state engineer and if the state engineer determines, after an investigation and after a hearing upon at least ten days' notice to the permittee, by registered mail, that such permittee has failed to comply with such rules and regulations, the state engineer may revoke the permit. The state engineer may refuse to issue a permit to a well driller if it appears that there has been a violation of the rules and regulations or a failure to comply with Sec. 73-3-22.[1] * * * [Emphasis added.]
The defendants also counterclaimed for recovery of a core drill which had been delivered to plaintiff as part payment for drilling the well. The plaintiff refused to accept the core drill as part payment on the contract because he claimed some parts, including a mud pump and swivel, were missing. He claims to have a lien on the core drill to secure his right to recover under the contract.
The defendants by written motion moved for summary judgment. The plaintiff orally moved for summary judgment, and the court considered both motions. The court denied plaintiff's motion but granted that of defendants. In doing so, however, it dismissed the counterclaim with prejudice. This appeal followed, the plaintiff appealing from dismissal of his complaint, the defendants from dismissal of their counterclaim.
As to the dismissal of the complaint: The plaintiff had no permit to drill the well in question. This court had a similar situation before it in the case of Olsen v. Reese, 114 Utah 411, 200 P.2d 733 (1948). That was a case wherein an unlicensed contractor sued on his contract. The court said at pages 416-417 of the Utah Reports, at page 736 of 200 P.2d:
The authorities are fairly uniform to the effect that failure to obtain a license which is required by a statute enacted solely for revenue purposes does not render contracts made by the offending party void. On the other hand, contracts made by an unlicensed contractor when in violation of a statute passed for the protection of the public are held to be void and unenforceable. Our statute is so worded as to indicate a legislative intent to protect the citizens from irresponsible contractors. The statute, while not comprehensive, provides for a small license fee. Control over the contractor is given to the Department of Registration. Upon an appropriate hearing, the department may, for unprofessional conduct, suspend or cancel the license. Good reputation and integrity are essential to obtaining a license and the entire object of the statute is protection of the public against fraudulent and illegal practice, *151 which have always been recognized as a distinct characteristic of statutes, which are not mere revenue measures. The statute being enacted for the protection of the public, plaintiff's written contract is void * * *.
We are asked to overrule the case of Olsen v. Reese, but we decline to do so for the reason that we are convinced the decision therein given is sound. The law is set out in 53 C.J.S. Licenses § 59a, as follows:
Where the statute or ordinance merely imposes a penalty without expressly prohibiting the business or declaring void acts done or contracts made therein, it becomes necessary to determine whether the imposition of the penalty is intended to be prohibitory, which determination is reached on a consideration of the nature, language, and terms of the statute. Generally the following tests are applied: Where the evident object of the statute or ordinance in requiring a license or tax and imposing a penalty for its violation is for the purpose of police regulation and protection of the public, it will be construed as forbidding, by implication, the carrying on of the business without a license, and a contract made by an unlicensed person in violation of the statute or ordinance ordinarily is void and unenforceable; * * *
In the Olsen case, supra, this court did not pass on the question of whether or not the contractor could have recovered upon the theory of quantum meruit. In fact, the court was not required to pass on that question and stated in that regard:
We do not pass on the question as to whether or not plaintiff might recover upon the theory of quantum meruit for the reason that the pleadings are not sufficient to raise this question and many ancillary problems might be presented if plaintiff were to elect to proceed on that theory.
We are unable to see why this plaintiff, whose contract is void, should be able to recover on the theory of quantum meruit. To permit him to do so would permit him to evade the law and recover for work which he is forbidden to pursue. If he got the reasonable value of his services, he might even prove more than his contract would have given him had it been valid.
The general law is to be found in 53 C.J.S. Licenses 59b as it pertains to quantum meruit:
Where a contract is unenforceable by one of the parties thereto by reason of his noncompliance with a license or occupation tax law, such party may not recover for services which he has performed under such contract.
The law seems plain enough, but how does it apply to an unlicensed well driller? What is the purpose of the law in requiring an annual permit in such cases? The fee required is nominal, and if it were a revenue-producing measure, it would be difficult to see why the state engineer should be required to set rules and regulations for well drilling. Why, too, should the state engineer be authorized to revoke a permit when the driller failed to comply with the rules and regulations required?
Pursuant to the statute quoted above, the state engineer has set forth rules and regulations. Section 1 thereof is as follows:
1. It is the purpose and intent of these rules and regulations:
(a) To assist in the orderly appropriation of water, the construction and maintenance of wells, and the distribution of water;
(b) To insure the construction or repair of wells in such manner that the flow, if any, can be completely controlled;
(c) To prevent waste of water from wells at the ground surface, and from one aquifer to another below the ground surface;
(d) To prevent pollution and contamination of underground water;
(e) To prevent overappropriation of water;

*152 (f) To obtain complete logs of formations and materials encountered in drilling wells.
In order to understand the purpose and intent as set out one must know that water in Utah is scarce and must be conserved. Much of our underground water is in aquiferous strata separated by impervious layers. Often the water is under pressure, and careless puncturing of the impervious layers will permit water to mix underground. Appropriators may have priorities in the various water bodies, and by intermingling, these priorities would be impaired. One aquifer may be pure and fit for culinary uses, while another may be polluted, and the public has an interest in seeing that well drillers are skilled in the manner in which they drill wells.
All unappropriated water in Utah is owned by the State for the use and benefit of its citizens, and the State has a decided interest in seeing to it that water is not wasted in quantity or deteriorated in quality. Wells must be so cased as to prevent leakage outside the pipe, particularly when the flow of water is shut off in the pipe.
It is obvious that the statute requiring well drillers to secure and keep an annual permit is designed for the protection of the people of this State, and the one who drills a well in Utah without first securing an annual permit cannot recover in the courts of this State for the work done, either on a contract or on a theory of quantum meruit.
As to the dismissal of the counterclaim: The contract provided that plaintiff would accept a core drill equipped with a mud pump and swivel as part payment for the services to be rendered. The core drill was delivered, but because it was not equipped with a mud pump and swivel, the plaintiff refused to accept it as part payment and claims to be holding it under a lien to secure payment of the amount due him.
Had he accepted the equipment as part payment, the defendants could not have recovered it back, even though the contract is void. In cases involving an action to recover for work performed by an unlicensed well driller, etc., the penalty prohibiting him from recovering in the courts is severe enough, and the one for whom the work was performed may not add to that penalty by recovering back that which was voluntarily paid for the work done by such an unlicensed person. See Comet Theatre Enterprises v. Cartwright, 9 Cir., 195 F.2d 80, 30 A.L.R.2d 1229 (1952). See also the annotation at page 1233 in 30 A.L.R.2d.
A court will no more assist one who fails to secure a required license to recover money by means of a lien foreclosure than it will in an action on the contract or on a theory of quantum meruit. Since there is nothing due plaintiff in this matter, he has no lien on the equipment, and the defendants are entitled to a return thereof.
The judgment of the trial court is affirmed as to the holding that plaintiff cannot recover in this case. It is reversed as to the plaintiff's claim of lien on the core drill and is remanded pursuant to the claim of the defendant with directions to enter judgment for a return of the equipment to the defendants. Costs to the respondents.
CALLISTER, TUCKETT and HENRIOD, JJ., concur.
CROCKETT, Chief Justice (dissenting):
I cannot agree with the main opinion, the effect of which is to deprive the plaintiff of compensation for services rendered to the defendant at the latter's request. One of the most elementary principles of justice is that where one contracts for goods or services from another he must keep his contract and pay for them.[1] It is appreciated that there are some exceptions where the law does not so require. But it is so squarely contrary to basic concepts of *153 justice to deny compensation to one who has rendered service, and to give an unearned benefit to the recipient of the service, that this is done only when cogent and persuasive considerations of public policy render the result necessary. This is usually where there is involved the commission of a crime or the doing of something wherein there is such a hazard to health, safety or morals, that it is deemed that the harm to result from enforcement of such a contract outweighs the injustice of not enforcing it.[2] In my opinion there is nothing shown in this case from which it can reasonably be concluded that the drilling of a well without a permit has any such vital relationship or hazard to public health, welfare or morals, as to impose the penalty of denying plaintiff pay for his work and to unjustly enrich the undeserving defendant. It is significant that the statute in question, Sec. 73-3-26, U.C.A. 1953, is in the chapter dealing with the appropriation of waters and its purpose relates to control of rights in underground waters.
Where the resolution of such a question is based upon a statute, it is to that statute that we should look to determine whatever penalty and/or sanction was intended for its violation.[3] In this instance the statute simply provides that a person drilling a well without a permit is guilty of a misdemeanor and subject to fine or imprisonment, but provides no other sanction or disability. It is important to keep in mind that where our legislature has intended that there be sanctions or limitations for the failure to comply with a statute it has expressly so provided. Some examples are: (1) the disability of a foreign corporation to sue unless certain requirements are met;[4] (2) disabilities placed on insurance companies under certain circumstances;[5] (3) forfeiture of interest when usurious rates have been charged.[6] Inasmuch as there is no express provision in the statute of concern here prohibiting the collection for services rendered the reasonable inference is that the legislature intended the fine or imprisonment to be the only penalty for violation. Insofar as this statute and its enforcement are concerned, that is something strictly between the plaintiff, the State Engineer, and the other appropriate law enforcement authorities. Whether the plaintiff had a permit or not has no causative relationship whatsoever to the rights and obligations which exist between him and defendant; and the defendant has suffered no harm or disadvantage on that account.
It is appreciated that the case of Olsen v. Reese referred to in the main opinion must be taken cognizance of. I take up no quarrel with it upon the particular facts of that case. But if its rule is made too broad and applied beyond those facts, it obviously is a harsh one and works injustice. This has been given recognition in subsequent cases by this court in different fact situations. In the case of Platt v. Locke,[7] it was held that the plaintiff who had not obtained a required license nor complied with the statute requiring the filing of an affidavit DBA, doing business under an assumed name, was not precluded from recovering for the cost of constructing a swimming pool for the defendant. In pointing out the justice so required Justice Wade wrote for the court: "* * * no fraud or other detriment was inflicted on the defendant, and therefore the contract entered into * * * was enforceable." He further observed that the statutes prescribed appropriate penalties for their violation and that failure to comply with them *154 had no relationship to the rights between the parties.
Similar recognition of what justice requires in such situation is indicated in the case of Butterfield v. Cheney.[8] There the defense was that plaintiff had not obtained a required building permit for construction work for defendant where the amount exceeded $1000. The view was taken that the work done in the construction of a retaining wall, a patio and putting in the lawn, should be regarded as three separate jobs and thus each below the $1000; and thus recovery was allowed to the plaintiff.
There is a good treatment of the principle here involved in Rosasco Creameries v. Cohen.[9] The court recognizes the rule of unenforceability of illegal contracts generally but states:
* * * Where contracts which violate statutory provisions are merely malum prohibitum, the general rule does not always apply. If the statute does not provide expressly that its violation will deprive the parties of their right to sue on the contract, and the denial of relief is wholly out of proportion to the requirements of public policy or appropriate individual punishment, the right to recover will not be denied.

The cases just referred to are consistent with the view which is reflected generally by the authorities on the subject: that courts are reluctant to apply a rule which prevents recovery by a plaintiff who has rendered service. The recognized authority, Williston on Contracts, Rev.Ed., Vol. 5, § 1630, at p. 4561, states:
* * * but the rule of public policy that forbids an action for damages for breach of such an agreement is not based on the impropriety of compelling the defendant to pay the damages; in itself that would generally be a desirable thing. When relief is denied it is either because the plaintiff is a wrongdoer, and such a person the law does not aid, or, in exceptional cases, because the transaction is declared absolutely void by the law.
In reference to this rule, Corbin on Contracts, Vol. 6A, Sec. 1512, observes that the rule which precludes recovery by one unlicensed to perform a particular service should not be arbitrarily applied and that:
* * * even in these cases enforcement of the wrongdoer's bargains is not always denied him. The statute may be clearly for protection against fraud and incompetence; but in very many cases the statute breaker is neither fraudulent nor incompetent. He may have rendered excellent service or delivered goods of the highest quality, his non-compliance with the statute seems nearly harmless, and the real defrauder seems to be the defendant who is enriching himself at the plaintiff's expense. Although many courts yearn for a mechanically applicable rule, they have not made one in the present instance. Justice requires that the penalty should fit the crime; and justice and sound policy do not always require the enforcement of licensing statutes by large forfeitures going not to the state but to repudiating defendants.

In the present situation allowing the defendant to invoke the technical defense of failure to have a drilling permit and thus escape payment for services he requested and received the benefit of runs particularly counter to one's sense of justice. The law charges him with knowing about the requirement of a permit and it is to be assumed that he knew as much about it as did the plaintiff. Yet he engaged the plaintiff to drill the well. Our law provides that every person who aids, abets or encourages the commission of an unlawful act is guilty as a principal.[10] If plaintiff was guilty of wrongdoing, the defendant was in pari delicto with him and should not be permitted *155 to use his own wrong to avoid the obligation of his contract and to thus unjustly enrich himself.
On the basis of what I have said above it is my belief that under the circumstances here shown, it is inequitable and unjust to rule as a matter of law on summary judgment that the defendant can take the benefit of the plaintiff's labor and refuse to pay for it. I would remand the case for trial on all issues. (All emphasis added.)
NOTES
[1]  This section requires the driller to furnish data to the state engineer relating to any well drilled or abandoned.
[1]  See 5 Williston, Contracts, § 1630 (Rev.Ed.).
[2]  E.g., see Lyon v. Leet, 199 Iowa 1034, 202 N.W. 881 (chiropractor posing as physician denied recovery), 42 A.L.R. 1226, 118 A.L.R. 646, and Corbin on Contracts, § 1513.
[3]  See Ross v. Producers Mutual Ins. Co., 4 Utah 2d 396, 295 P.2d 339.
[4]  See Sec. 16-10-120, U.C.A. 1953.
[5]  See Secs. 31-15-17 and 31-35-4, U.C.A. 1953.
[6]  See Sec. 15-1-7, U.C.A. 1953.
[7]  11 Utah 2d 273, 358 P.2d 95.
[8]  12 Utah 2d 347, 366 P.2d 607.
[9]  276 N.Y. 274, 11 N.E.2d 908, 118 A.L.R. 641.
[10]  Sec. 76-1-44, U.C.A. 1953.
