
266 P.2d 655 (1953)
STATE ex rel. NIELSON
v.
CITY OF GOODING.
No. 8062.
Supreme Court of Idaho.
December 23, 1953.
Rehearing Denied February 2, 1954.
*656 Robert E. Smylie, Atty. Gen., J. R. Smead, Asst. Atty. Gen., for appellant.
Branch Bird and Cecil D. Hobdey, Gooding, for respondent.
Dale Clemons and James W. Blaine, Boise, amici curiæ.
THOMAS, Justice.
The legislature of the State of Idaho, in 1947, passed an act cited as "Local License Act" providing for the licensing, regulating, controlling or prohibiting the operation of coin-operated amusement devices, commonly known as slot machines, within the corporate limits of cities and villages and specifically declaring such devices "to be gaming but not lottery." I.C. § 50-1502. The act became effective March 11, 1947. Session Laws of 1947, Ch. 151, p. 359, now appearing as Title 50, Ch. 15, Idaho Code.
Under the act such devices may be lawfully operated only within the corporate limits of cities and villages after the procurement of licenses provided for in the act pursuant to the adoption of ordinances or resolutions, as the case may be, and providing further that the operation of such devices without a license is unlawful and subject to the penalties provided for in the act.
With reference to the license requirement under the act, Section 50-1506, I.C., provides as follows:
"License fees.  The license fee imposed and collected by the local authority shall be not less than $500.00 per annum for the calendar year for each coin-operated amusement device, which license fee may be pro rated as of the actual month of issue for the remainder of the license year. Of the license fee so collected $125.00 shall be collected for the state of Idaho and remitted quarterly by the collecting local authority to the state treasurer and by him placed in the general fund of the state; of the license fee so collected $125.00 shall be collected for the county in which the collecting local authority is located and shall be by said collecting local authority remitted quarterly to the treasurer of such county and by him placed in the general fund of such county; provided, however, if the license is issued for less than the full calendar year, the amounts so collected for the state and for the county respectively shall be pro rated as of the actual month of issue."
Pursuant to the act and by virtue of the authority therein given to incorporated cities and villages, the City of Gooding on April 1, 1947, adopted Ordinance No. 252 which in all essential aspects conformed with and referred to the provisions of the state "Local License Act". The licensing provisions of the ordinance provides for an annual license fee of 50% of the gross amount deposited in each machine but in no event should the license fee be less than $500 per year for each machine which must be paid at the time the application for a license is made. The ordinance further in this respect expressly provides the city shall collect for and on behalf of the State of Idaho the sum of $125 per year on each machine so licensed for a year, or the pro rata share of license for less than a year, and remit such sum to the treasurer of the State quarterly on the first day of the months of April, July, October and January.
*657 From and after the enactment of the ordinance and at all times prior to January 1, 1949, the City of Gooding remitted quarterly to the state treasurer the State's share of such license fees. During the period from January 1, 1949, to September 30, 1950, the city, pursuant to such statute and ordinance, collected license fees in the sum of $7,310.11 for and payable to the state treasurer and failed, neglected and refused to remit such sum, or any part thereof, to the state treasurer although demand for such payment was duly made.
Thereafter the State filed an action against the city to collect said sum of $7,310.11, together with interest accrued thereon.
The sole and only ground of defense in the amended answer of the city urged here is that the provisions of the so-called slot machine act, T. 50, Ch. 15, I.C., is unconstitutional under the provisions of Art. 3, § 20, of the Idaho Constitution.
The matter was tried before the court, the parties waiving a jury. At the conclusion of the trial the court made its findings of fact and conclusions of law, denying plaintiff any relief and entered judgment for the City of Gooding on the ground that the so-called slot machine act violates Art. 3, § 20, of the State Constitution which provides as follows:
"Lotteries not to be authorized.  The legislature shall not authorize any lottery or gift enterprise under any pretense or for any purpose whatever."
From the judgment for the city, the State appealed.
It is a firmly established principle of law, of uniform application, that the constitutionality of a statute may not be questioned by one whose rights have not been or are not about to be injuriously affected by the operation of such statute, Poffenroth v. Culinary Workers Union, 71 Idaho 412, 232 P.2d 968; Twin Falls Canal Co. v. Huff, 58 Idaho 587, 76 P.2d 923; Powell v. McKelvey, 56 Idaho 291, 53 P.2d 626; In re Brainard, 55 Idaho 153, 39 P.2d 769; In re Allmon, 50 Idaho 223, 294 P. 528; Williams v. Baldridge, 48 Idaho 618, 284 P. 203; 16 C.J.S., Constitutional Law, § 76, p. 157, or as stated differently, unless it is being or is about to be applied to his disadvantage, or he will be injured by its enforcement, State v. Heitz, 72 Idaho 107, 238 P.2d 439; Albrethsen v. State, 60 Idaho 715, 96 P.2d 437, or where, pursuant to the authority conferred by such statute, one has voluntarily claimed and accepted its benefits, Henderson v. Twin Falls County, 59 Idaho 97, 80 P.2d 801; Taylor v. Girard, 54 Idaho 787, 36 P.2d 773; Brady v. Place, 41 Idaho 747, 242 P. 314, 243 P. 654; Sacramento County v. City of Sacramento, 75 Cal.App.2d 436, 171 P.2d 477; Foster v. Superior Court, 26 Cal.App.2d 230, 79 P.2d 144; McMahon v. Cooney, 95 Mont. 138, 25 P.2d 131; Buck v. Kuykendall, 267 U.S. 307, 45 S.Ct. 324, 69 L.Ed. 623, 38 A.L.R. 286; Daniels v. Tearney, 102 U.S. 415, 26 L.Ed. 187; Grand Rapids & Indiana Railway Co. v. Osborn, 193 U.S. 17, 24 S.Ct. 310, 48 L.Ed. 598. See also State ex rel. City of Wolf Point v. McFarlan, 78 Mont. 156, 252 P. 805; Brockman v. Contractors Licensing Board, 48 N.Mex. 304, 150 P.2d 125; 16 C.J.S., Constitutional Law, §§ 89 and 90, pp. 184 and 191; 11 Am.Jur., Secs. 121 and 123, pp. 766 and 767.
The principle applies not only to an individual but also to the State, Albrethsen v. State, 60 Idaho 715, 96 P.2d 437, to a county, Henderson v. Twin Falls County, 59 Idaho 97, 80 P.2d 801; Farrell v. Placer County, 23 Cal.2d 624, 145 P.2d 570, 153 A.L.R. 323; Riverton Valley D. Dist. v. Board of County Com'rs, 52 Wyo. 336, 74 P.2d 871, 114 A.L.R. 1093, or to a city, Sacramento County v. City of Sacramento, 75 Cal.App.2d 436, 171 P.2d 477; Belhassen v. Town of Iaeger, 112 W.Va. 598, 166 S.E. 10; 16 C.J.S., Constitutional Law, § 76, p. 168, note 1.
An examination of the record in this case, as well as the authorities presented and the argument made for and on behalf of the City, discloses that the rights of the city have not been or are not about to be adversely affected by the operation of the statute or that the statute has been or is about to be applied to its disadvantage or injury; indeed the city advances no such contention and the record reveals the contrary; moreover, it affirmatively appears *658 that the statute challenged conferred power and authority upon the city to prohibit the licensing and operation of such devices within the city, yet it voluntarily took advantage of the alternative under the statute, that is, the licensing, operation and regulation of such devices when it adopted an ordinance and exacted, claimed and accepted substantial financial benefits thereunder. It was not content to exact the minimum license of $500 a machine and retain 50% thereof for itself but by such ordinance it exacted a license fee of 50% of the gross amount deposited in each machine over and above the initial $500 fee or the pro rata part thereof in the event any machine was not licensed for the full calendar year. Under the ordinance, the city elected to and did participate with the owners in sharing in the gross profits realized from the operation of such machines.
The position of the city presents an unusual situation; it seeks to challenge the constitutionality of the statute which is the source of its authority and power to exact and collect such license fees; it seeks by such a defense to be relieved of the obligation to remit to the State funds which, under both the statute and the ordinance, are declared to belong to the State; it in effect concedes the claim of the State to be otherwise just but refused to remit and seeks to retain such funds for its own use and benefit only because it asserts that the statute is unconstitutional; the city has not been injured nor is it immediately threatened with injury under the statute; on the contrary, by the authority of the statute which it voluntarily took advantage of, it has and still does enjoy substantial benefits from its authority and operation. It is clear that the statute has not nor is it about to be applied to the disadvantage of the city; neither has the city been injured nor is it threatened with injury by its enforcement. Its position under the record is no different than that of any other litigant and hence it may not question the constitutionality of the statute.
In the case of Sacramento County v. City of Sacramento, 75 Cal.App.2d 436, 171 P.2d 477, a somewhat analogous situation arose and the California court applied the rule against a city as this court applies it here. There, Sacramento, though not required to, adopted the Municipal Court system by the vote of the people, pursuant to a state statute. Under the statute the city was required to reimburse the county for all costs in excess of $25,000 a year for the maintenance of the municipal court, irrespective of whether such expenses were incurred for the benefit of the county alone or for both. During the particular fiscal year the county paid out for the maintenance of the court in excess of $61,000. Demand was made upon the city to reimburse the county for all in excess of $25,000. Upon the refusal of the city to pay a substantial portion of the amount, the county brought an action for its recovery. Although it clearly appeared that the city obtained benefits from the statute, it elected to defend the action on the ground that the statute was unconstitutional and hence assail the statute under which it had obtained benefits. In denying the city the right to question the constitutionality of the statute the court clearly and aptly made an observation which is strikingly appropriate here:
"It must be presumed to have weighed the advantages of the new system as against its disadvantages, if any, and concluded in favor of the adoption of the system. We cannot assume that it was acting for other than what it presumed would be its own advantage; and having accepted the benefits of the statute it is now in no position to question its constitutionality."
The following statement made by the court in the case of People v. Fidelity & Deposit Co. of Maryland, 28 Cal.App.2d 325, 82 P.2d 495 at page 498, is particularly fitting:
"Neither justice nor common sense permit the state to accept the benefits of the enactment with one hand, and use the other to void the very provisions that create those same benefits."
Moreover, it is a rule of uniform application based upon firm grounds of public policy, repeatedly reiterated by this court, that the constitutionality of a statute will not be determined in any case unless *659 such determination is absolutely necessary in order to determine the merits of the action in which the statute has been drawn in question. State v. Heitz, 72 Idaho 107, 238 P.2d 439; Poffenroth v. Culinary Workers Union, 71 Idaho 412, 232 P.2d 968; McLean v. Hecla Min. Co., 62 Idaho 75, 108 P.2d 299; Albrethsen v. State, 60 Idaho 715, 96 P.2d 437; United Mercury Mines Co. v. Pfost, 57 Idaho 293, 65 P.2d 152; In re Brainard, 55 Idaho 153, 39 P.2d 769; Garrity v. Board of County Com'rs, 54 Idaho 342, 34 P.2d 949; State Ins. Fund v. Board of Com'rs, 54 Idaho 359, 34 P.2d 956; State ex rel. Macey v. Johnson, 50 Idaho 363, 296 P. 588; In re Allmon, 50 Idaho 223, 294 P. 528; Logan v. Carter, 49 Idaho 393, 288 P. 424; Knoor v. Reineke, 38 Idaho 658, 224 P. 84; Abrams v. Jones, 35 Idaho 532, 207 P. 724; Kimbley v. Adair, 32 Idaho 790, 189 P. 53; Greene v. Rice, 32 Idaho 504, 186 P. 249; Howard v. Grimes Pass Placer Min. Co., 21 Idaho 12, 120 P. 170; Mills Novelty Co. v. Dunbar, 11 Idaho 671, 83 P. 932; Jack v. Village of Grangeville, 9 Idaho 291, 74 P. 969; McGinness v. Davis, 7 Idaho 665, 65 P. 364; In re Marshall, 6 Idaho 516, 56 P. 470; State v. Baker, 6 Idaho 496, 56 P. 81; Howell v. Board of Com'rs, 6 Idaho 154, 53 P. 542; State v. Ridenbaugh, 5 Idaho 710, 51 P. 750. See also Thomas v. Riggs, 67 Idaho 223, 175 P.2d 404; 16 C.J.S., Constitutional Law, § 94, p. 208, note 43.
We conclude that the city has shown no injury under the statute nor that the statute is being or is about to be applied to the disadvantage of the city with reference to the subject matter of this action and that it may not in this action question the constitutionality of the statute; moreover, it is not absolutely necessary in this action, in order to determine the merits thereof, that the court pass upon the constitutionality of the statute in question and thus we do not herein pass upon its constitutionality in any respect.
The judgment should be and hereby is reversed and the cause remanded with directions to enter judgment for plaintiff as prayed.
Costs to appellant.
PORTER, C. J., and GIVENS and KEETON, JJ., concur.
TAYLOR, Justice (dissenting).
The doctrine that a party may not challenge the constitutionality of a statute if he has accepted benefits conferred by the statute, is an application of the equitable doctrine of estoppel. This court has many times recognized the general rule that estoppel will not be invoked against the government or its agencies except where manifest justice requires its application. Common School Dist. No. 61 v. Bank & Trust Co., 50 Idaho 711, 4 P.2d 342; Lloyd Crystal Post No. 20 v. Jefferson County, 72 Idaho 158, 237 P.2d 348.
The generalizations from the opinions of the courts cited are stated by the annotator in 1 A.L.R.2d as follows:
"As a general rule the doctrine of estoppel will not be applied against the public, the United States government, or the state governments, where the application of that doctrine would encroach upon the sovereignty of the government and interfere with the proper discharge of governmental duties, and with the functioning of the government, or curtail the exercise of its police power, or where the application of the doctrine would frustrate the purpose of the laws of the United States or thwart its public policy; or where the officials on whose conduct or acts estoppel is sought to be predicated, acted wholly beyond their power and authority, were guilty of illegal or fraudulent acts, or of unauthorized admissions, conduct or statements; or where the public revenues are involved." Pages 340 and 341.
"Although the doctrine of estoppel may be more readily applied to subordinate governmental agencies than to the government and state itself, yet it will not be applied to municipal corporations with the same strictness as to private individuals and private corporations; particularly in matters wholly ultra vires of the municipality, in matters involving or affecting its governmental *660 or public functions or the taxing or police power, or in matters wholly beyond the powers of the officers or agents whose act or conduct is relied upon as forming the basis of estoppel against the municipality; or to require the municipality or its officers to do an act expressly forbidden by law." Pages 349-351.
The general rule has been, and still is, firmly adhered to in most jurisdictions where the estoppel sought to be invoked would be detrimental to the public interest, the public morals, or against public policy, or where it would obstruct free exercise of the police power. Cameron v. International Alliance T.S.E., 118 N.J.Eq. 11, 176 A. 692, 97 A.L.R. 594; Home Bldg. & Loan Ass'n v. Blaisdell, 290 U.S. 398, 54 S.Ct. 231, 78 L.Ed. 413, 88 A.L.R. 1481; Palmer v. Board of Education, etc., 276 N.Y. 222, 11 N.E.2d 887; Greenlund v. Fenner, 127 Misc. 295, 216 N.Y.S. 357; Gibbs v. Bergh, 51 S.D. 432, 214 N.W. 838; City of Baton Rouge v. Baton Rouge Waterworks Co., 5 Cir., 30 F.2d 895; Craig v. Board of Education, etc., 173 Misc. 969, 19 N.Y.S.2d 293; Fitzsimmons v. Rauch, 195 Okl. 529, 159 P. 2d 264; Fifth Church of Christ, etc., v. W. F. Pigg & Son, 109 Colo. 103, 122 P.2d 887; Ex parte Gray, 74 Okl.Cr. 200, 124 P.2d 430; State v. Loveless, 62 Nev. 17, 136 P.2d 236; People ex rel. Battista v. Christian, 249 N.Y. 314, 164 N.E. 111, 61 A.L.R. 793.
"The company urges as a separate ground for estoppel the fact that the county has retained the benefits of the asserted agreement. All of the California cases hold, however, that receipt of benefits by the governmental body is insufficient to raise an estoppel where, as here, the transaction is unauthorized by law and contrary to public policy." San Diego County v. California Water & Telephone Co., 30 Cal. 2d 817, 186 P.2d 124, at page 132, 175 A.L.R. 747, and cases cited.
"The acceptance of benefits by a municipality under a contract entered into in violation of statute or contrary to public policy, cannot be made the basis of liability by estoppel." Johnson County Savings Bank v. Creston, 212 Iowa 929, 231 N.W. 705, 237 N.W. 507, 84 A.L.R. 926.
In Harfst v. Hoegen, 349 Mo. 808, 163 S.W.2d 609, 614, 141 A.L.R. 1136, the Missouri court said: "No one may waive the public interest" or the constitutional policy of the state.
The public policy of the state can have no higher sanction or source than the constitution adopted by vote of the people. Harfst v. Hoegen, 349 Mo. 808, 163 S.W.2d 609; 11 Am.Jur., Constitutional Law, § 139; 16 C.J.S., Constitutional Law, §§ 1 and 2.
The constitutional provision banning lotteries fixes the public policy of this state beyond the power of the legislature to modify or otherwise declare. By recognizing slot machines as within the inhibition, this court in effect finds that the legislature in the enactment of the licensing law violated this positive constitutional prohibition and attempted to authorize the cities of the state to license lotteries contrary to the constitutionally established public policy of the state. In State ex rel. Anderson v. Garden City, Idaho, 265 P.2d 328, we have branded the operation of slot machines as a public moral nuisance. Thus the court recognizes the interdiction of these machines as a constitutional dedication of the police power of the state to their eradication in the interest of public welfare and public morals. It is utterly inconsistent with that conclusion to allow the state to assert an estoppel against the City of Gooding, and thus to deny, delay and obstruct the police power of the state and the protection of the public welfare and public morals. The law attempting to authorize these lotteries was enacted in 1947. It is common knowledge that slot machines have been operated in great numbers all over the state these past six years. During that time no case reached this court to determine the constitutionality of the licensing act, and the constitutionally expressed will of the people was held for naught. Suppose the Garden City case had not been brought. Then the effect of the estoppel in this case would be to continue to an indefinite date this disregard for the *661 express command which the people wrote in their constitution, that the state, and all its officers and its courts, protect them from these public moral nuisances. Thus estoppel, born of equity, is perverted to serve the ends of inequity and injustice.
This court has many times espoused the principles here contended for. "* * * equity cannot and will not interpose its power to relieve any one against the violation of express constitutional prohibitions." Village of Heyburn v. Security Savings & Trust Co., 55 Idaho 732, 49 P.2d 258, 266. In Yellow Cab Taxi Service v. Twin Falls, 68 Idaho 145, 190 P.2d 681, and in Boise City v. Sinsel, 72 Idaho 329, 241 P.2d 173, we held estoppel would not be applied to prevent a municipality from exercising its police power. In Hillman v. City of Pocatello, 74 Idaho 69, 256 P.2d 1072, we held that a property owner who accepted benefits under a city ordinance was not thereby estopped to challenge the ordinance. We have also held that the obligation of a contract will not be allowed to contravene public policy. Stearns v. Williams, 72 Idaho 276, 240 P.2d 833, and in Lloyd Crystal Post No. 20 v. Jefferson County, 72 Idaho 158, 237 P.2d 348, 350, where Mr. Justice Thomas said, if the contract be "one where no power exists for its execution or it is expressly and directly prohibited by constitutional or statutory enactment, estoppel can never be invoked in aid of such a contract". In Pepple v. Headrick, 64 Idaho 132, 128 P.2d 757, 762, we held that the acceptance of benefits did not estop the licensing authority from confiscating and destroying gambling machines, in the words of Mr. Justice Ailshie: "The payment of taxes on, or licensing of, a gambling machine or device, furnishes no defense or justification for its operation in violation of the antigambling laws." And he might have added; "or the anti-lottery provision of the constitution." Here the majority in effect overrule that holding.
The rule that where the parties are in pari delicto the law will not grant relief to either, but will leave them where it finds them, should be accorded full recognition and application in this case. The majority recognizes that both the state and City of Gooding are particeps criminis and in pari delicto, but refuse to apply the rule because of the alleged estoppel. In other words, because it would be inequitable to the state to allow the city to keep proceeds of the unlawful transaction. The truth of the matter is that the state is the more culpable of the two. The state is the author of the unconstitutional act. Whereas the city did only what the state represented to it that it could do. There is no ground for the intervention of equity on the side of the state. Paramount considerations of public policy, public welfare, public morals, and a due regard for the police power of the state, would compel a different result.
On authority of the Garden City case the judgment should be affirmed.

On Petition for Rehearing
THOMAS, Justice.
In the opinion filed December 23, 1953, the judgment was reversed and the cause remanded to enter judgment for plaintiff as prayed. Plaintiff prayed for judgment for $7,310.11 and accrued interest.
The former decision of this court is hereby modified to exclude therefrom the allowance of any interest; in all other respects we adhere to the conclusion reached therein.
Petition for rehearing denied.
PORTER, C. J., and GIVENS and KEETON, JJ., concur.
TAYLOR, J., dissents.
