
21 Cal.2d 237 (1942)
In re FRANK PORTNOY et al., on Habeas Corpus.
Crim. No. 4429. 
Supreme Court of California. In Bank.  
Nov. 17, 1942.
 Clifford Thoms for Petitioners.
 John Neblett, District Attorney, for Respondent.
 GIBSON, C.J.
 Petitioners were convicted in the Justice's Court of Riverside County under two counts of a complaint charging them with violating the provisions of Ordinance No. 248 of that county. The judgments of conviction were affirmed on appeal by the superior court. A writ of certiorari, which was sought to annul the judgments of conviction, was denied by this court upon the ground that no excess of jurisdiction was present. (Portnoy v. Superior Court, 20 Cal.2d 375 [125 P.2d 487].) This proceeding in habeas corpus is based upon the contention that the sections of the ordinance under which petitioners were convicted are *239 unconstitutional. If petitioners were in fact convicted under the terms of an unconstitutional ordinance, there can be no doubt of the power and duty of this court to order them released upon a proceeding in habeas corpus. (See In re Bell, 19 Cal.2d 488 [122 P.2d 22].)
 The first count of the complaint is founded upon section 2 of the ordinance which provides: "It shall be unlawful for any person, either as owner, lessee, principal, agent, employee, servant, clerk, waiter, cashier or dealer to establish, lease, open, maintain, keep, carry on or work in any building, house or room or any other place where any game, device, scheme, gaming or gambling is permitted, allowed or carried on in violation of any of the provisions of this Ordinance or in violation of the law of the State of California." Count two of the complaint was subsequently dismissed. The third count is based upon section 4 of the ordinance which reads: "... it shall be unlawful for any person to own or have in his possession or under his custody or control any slot machine, upon the result of the action of which money or other valuable thing is staked or hazarded and which is or may be operated or played by placing or depositing therein any coins, checks or slugs, or as a result of the operation of which any money or other representative of value is or may be won or lost, when the result of the action or operation of said slot machine is dependent in whole or in part upon hazard or chance."
 Petitioners contend that sections 2 and 4 of the ordinance are unconstitutional in that they constitute a duplication of existing provisions of the Penal Code, a duplication which creates a conflict between the state and the local law necessitating the invalidation of the latter. [1] The control of gambling activities is a matter concerning which local governments possess power to enact and enforce local regulations not in conflict with general laws, for the purpose of supplementing those laws. (Const., art. XI,  11; In re Murphy, 128 Cal. 29 [60 P. 465]; cf. Mann v. Scott, 180 Cal. 550, 556 [182 P. 281]; In re Hoffman, 155 Cal. 114 [99 P. 517, 132 Am.St.Rep. 75].) This is not a matter, in other words, which comes within the group of municipal affairs as to which local regulations are superior to a state statute (cf. City of Pasadena v. Charleville, 215 Cal. 384 [10 P.2d 745]), or within the class of cases in which the Legislature has indicated its intent to occupy the field fully to the exclusion *240 of any local regulation. (Cf. Pipoly v. Benson, 20 Cal.2d 366 [125 P.2d 482].)
 [2] Insofar as the provisions of Ordinance No. 248 purport to prohibit acts which already are made criminal by the Penal Code, it is clear that they exceed the proper limits of supplementary regulation and must be held invalid because in conflict with the statutes which they duplicate. (Pipoly v. Benson, supra, p. 370; In re Sic, 73 Cal. 142 [14 P. 405]; In re Mingo, 190 Cal. 769 [214 P. 850]; Ex parte Daniels, 183 Cal. 636, 645 [192 P. 442, 21 A.L.R. 1172].) An examination of Penal Code, section 330a, illustrates the duplication here existing and demonstrates the invalidity of section 4 of the ordinance upon which count three of the complaint is founded. Thus, Penal Code, section 330a, provides: "Every person, who has in his possession or under his control, either as owner, lessee, agent, employee, mortgagee, or otherwise, or who permits to be placed, maintained or kept, in any room, space, inclosure or building owned ... by him, or under his management or control, any slot or card machine, contrivance, appliance or mechanical device, upon the result of action of which money or other valuable thing is staked or hazarded, and which is operated, or played, by placing or depositing therein any coins, checks, slugs, balls, or other articles or device, or in any other manner and by means whereof, or as a result of the operation of which any merchandise, money, representative or articles of value, checks, or tokens, redeemable in, or exchangeable for money or any other thing of value, is won or lost, or taken from or obtained from such machine, when the result of action or operation of such machine, contrivance, appliance, or mechanical device is dependent upon hazard or chance ... is guilty of a misdemeanor. ..." (Italics ours.) Substantially the entire text of section 4 of the ordinance is found in Penal Code, section 330a. Under the cases cited above there is no alternative to declaring section 4 invalid to the extent of such duplication.
 Respondents urge, however, that certain of the language used in section 4 of the ordinance is broader than the language used in the Penal Code, and it is suggested that the ordinance can be sustained insofar as its provisions can be said to supplement, rather than duplicate, existing statutes. Thus, it is pointed out that the ordinance, unlike the statute, is so worded as to prohibit the possession of any slot machine upon the action of which money is hazarded and which "is *241 or may be operated or played by placing or depositing therein any coins ... or as a result of the operation of which any money ... is or may be won or lost. ..." Assuming for the purposes of this proceeding the validity of respondents' contention that there is a substantial difference between prohibiting the possession of slot machines upon which money is hazarded and prohibiting the possession of machines upon which money may be hazarded (see Chapman v. Aggeler, 47 Cal.App.2d 848 [119 P.2d 204]; cf. contra People v. Kay, 38 Cal.App.2d Supp. 759 [102 P.2d 1110]), this distinction is unavailing in the present case. The ordinance, like the statute, contains as an integral part of the description of the prohibited acts the phrase "upon the result of the action of which money or other valuable thing is staked or hazarded." The words "may be" appearing in the ordinance are used only in connection with the additional descriptive phrases dealing with the operation of the machines. Thus, the requirement is identical under both the statute and the ordinance with respect to an essential element of the crime, the hazarding of money. It follows that section 4 of the ordinance results in an unconstitutional duplication of section 330a of the Penal Code and is therefore invalid.
 [3a] Similar considerations are controlling with respect to a portion of the activities prohibited by section 2 of the ordinance. Penal Code, section 331, provides: "Every person who knowingly permits any of the games mentioned in section three hundred thirty and section three hundred thirty a of this code to be played, conducted, or dealt in any house owned or rented by such person, in whole or in part, is punishable as provided in the preceding sections." It is apparent that section 2 of the ordinance is a duplication of Penal Code, section 331, insofar as it purports to prohibit an owner or lessee from establishing, leasing, opening, maintaining, keeping, or carrying on a house in which any of the gambling activities covered by the Penal Code are permitted to be conducted. Partial invalidity of section 2 of the ordinance must therefore be conceded. Respondents contend, however, that the language of section 2 includes activities which are not prohibited by the Penal Code. Thus, the prohibitions of the ordinance apply to a "principal, agent, employee, servant, clerk, waiter, cashier or dealer" as well as to an owner or lessee, and the ordinance includes "building, room, or any other place" as well as a house. Relying upon section 20 *242 of the ordinance, which provides that if "any section, subdivision, paragraph, sentence, clause or phrase of this Ordinance is for any reason held to be unconstitutional, such decision shall not affect the remaining portions of this Ordinance. ...", respondents argue that section 2 must be sustained insofar as it prohibits acts in addition to those prohibited in the Penal Code. [4] The rule is well settled, where such a severability clause is included, that the valid portions of a statute or ordinance which is partially unconstitutional will be upheld if the remaining portion is severable and constitutes a completely operative expression of the legislative intent. (Bacon Service Corp. v. Huss, 199 Cal. 21, 32 [248 P. 235].) On the contrary, however, where the invalid portions of the statute are so connected with the rest of the statute as to be inseparable, it is clear that the entire act must fall. (Bacon Service Corp. v. Huss, supra; In re White, 195 Cal. 516 [234 P. 396]; Robison v. Payne, 20 Cal.App.2d 103 [66 P.2d 710].)
 [3b] In the instant case the provisions of section 2 are so inseparably connected that it is impossible to sustain any part of the section after the invalidation of the part in conflict with the provisions of the Penal Code. This conclusion becomes apparent upon examining the language of the section, because the question of a conflict between the ordinance and the Penal Code depends upon which combination of the various individuals and activities specified is involved in a particular case. Nothing less than a complete rewriting of this section could make it consistent with the provisions of the Penal Code and accomplish its true function as supplementary legislation. Since the invalid portions of section 2 cannot be severed from the rest of the section, it must be declared wholly invalid.
 Sections 2 and 4 of Ordinance No. 248 are unconstitutional. The judgments of conviction thereunder and petitioners' present detention are therefore unlawful. Petitioners are discharged.
 Shenk, J., Curtis, J., Edmonds, J., Carter, J., Traynor, J., and Spence, J. pro tem., concurred.
