
545 P.2d 530 (1976)
Vivian ALLGOOD, Plaintiff and Respondent,
v.
Delmar LARSON, Sheriff of Salt Lake County, Utah, and Salt Lake City, Utah, Defendants and Appellants.
No. 14094.
Supreme Court of Utah.
January 12, 1976.
Roger F. Cutler, Salt Lake City Atty., Paul G. Maughan, Deputy Salt Lake City Atty., Salt Lake City, for defendants and appellant.
Stephen R. McCaughey of Salt Lake Legal Defenders Assn., Salt Lake City, for plaintiff and respondent.
MAUGHAN, Justice:
Plaintiff was arrested, charged, and convicted of trespassing; under a Salt Lake City ordinance. She was sentenced to six months in jail. Petition was made to the district court for a writ of habeas corpus, the writ was granted; and plaintiff was released from custody. It is from the district court's order that defendant city appeals.
The district court ruled "that since the state law provides no jail sentence for trespass, which is classified as `an infraction,' that the city cannot impose a greater sentence than that provided by state law, and it is for that reason that the court grants the petition for a writ of habeas corpus." With this we agree and affirm the trial court.
The city ordinance, Section 32-3-3, provides that it shall be unlawful for any person to walk upon the premises of another without permission of the owner or occupant. *531 There is no penalty provision in that section. Plaintiff was sentenced to jail under an omnibus clause, Section 26-1-8, of the Revised Ordinances of Salt Lake City. That section provides when there is no other penalty prescribed, the person shall be punished by a fine not exceeding $299, or imprisonment in the city jail for a period not longer than six months, or by both such fine and imprisonment.
On July 1, 1973, an entirely new criminal code became effective for the state of Utah. The statutory references which follow are to U.C.A. 1953, as amended.
76-1-103(1) specifies: "The provisions of this code shall govern the construction of, the punishment for, ... any offense defined in this code ... any offense defined outside this code..."
76-1-104 provides that the code shall be construed in accordance with these general purposes; and Subsection (3), dealing with penalties, states: "Prescribe penalties which are proportionate to the seriousness of offenses ..."
Under the new criminal code, Section 76-3-102, offenses are designated as felonies, misdemeanors, or infractions. The legislature has created a new class of offenses known as infractions, and 76-3-205 states: "(1) A person convicted of an infraction may not be imprisoned but may be subject to a fine, forfeiture, and disqualification, or any combination. (2) Whenever a person is convicted of an infraction and no punishment is specified, the person may be fined as for a class C misdemeanor."
The trespass for which plaintiff was convicted is designated as an infraction under 76-6-206(3). Thus it falls within the new criminal code, is one of a new class of offenses, and carries with it the legislative policy prescribing penalties which are proportionate to the seriousness of the offense.
Defendant city advances the provisions of 10-8-50 and 10-8-84 as grants of power to the city to provide for punishment of trespass, to pass ordinances necessary for carrying into effect powers and duties conferred upon the city, and to enforce such ordinances by fines of less than $300, and imprisonment not to exceed six months. The powers granted in the foregoing statutes were correlated with the penalties provided in 76-1-16 of the old penal code for misdemeanors. In that code, 76-1-12, only two types of crimes were provided for, viz: felonies and misdemeanors.
The subsequent enactment of the new criminal code controls any general provisions of 10-8-84. It is to be noted that 10-8-84, by its express terms, limits the grant of power to municipalities to pass ordinances, to those "not repugnant to law."
Article XI, Section 5, Constitution of Utah, has been interpreted by this court as not only a delegation of power by the people to a municipality, but also as a limitation.[1] That constitutional provision, in conferring police power upon municipalities, limits the grant to an area "not in conflict with the general law."
Although this court has dealt with the contest between cities and the State on several occasions, this is the initial case of that nature involving the provisions of the new criminal code. In Lark v. Whitehead[2] we said:
In Nasfell v. Ogden City,[3] this court stated that it was committed to the principle that cities have none of the elements of sovereignty and that any fair, reasonable, substantial doubt concerning the existence of the power is resolved by the courts against the corporation (city) and the power denied; grants of power to cities are strictly construed to the exclusion of implied powers which are not reasonably necessary in carrying out the purposes of the express powers granted.
*532 In the matter of Smith v. Hyde[4] this court had before it, as in the instant matter, a writ of habeas corpus, which brought to its attention Section 7 of the Tremonton City Ordinances. Section 7 provided for incarceration at the rate of one day for each one dollar of the fine remaining unpaid. This was found to be in conflict with 15-8-85, R.S., Utah, 1933, which required two dollars for each day of the confinement. The court held:
The part of Section 7 of the Tremonton Ordinances which is in conflict with the section of the statute quoted must fall. The result is that the part of the sentence imposing incarceration must fall for lack of power in the City Justice of the Peace to impose it.
Defendant city brings to our attention Salt Lake City v. Allred,[5]Salt Lake City v. Kusse[6] and 5 McQuillin, Municipal Corporations.[7] To find Allred applicable here we would have to hold that a city legislating within the purview of a state statute could impose a punishment exceeding that provided for the same offense proscribed by the State. As has been shown, this the city cannot do. Kusse is cited for the proposition that "where the legislature prohibits the citizens from doing some act, there is no basis to imply that the legislature intended that cities and counties should not add additional prohibitions." This is a correct statement of the law, in certain limited instances,[8] but here we are not dealing with prohibitions. Salt Lake City seeks to exceed the public policy declared by the legislature relating to a new class of offense. It does not have that power of amendment. A cogent statement of the law, as it is applicable to the instant matter, is stated by Mr. Justice Larson, in his dissent to Kusse:[9]
But the state may always invade the field of regulation delegated to the cities and supercede, annul, or enlarge the regulation which the municipality has attempted. It may modify or recall the police power of the city as it may abolish the city itself.
As for McQuillin, the law of Utah is correctly stated in Section 17.15, at page 326:
... If the ordinance penalty conflicts with that of the general law of the state covering the same subject, the ordinance penalty is void. The charter or ordinance penalty cannot exceed that of the state law.
TUCKETT, J., concurs.
HENRIOD, C.J., concurs in the result.
CROCKETT, Justice (dissenting).
The power of the city to regulate the peace and good order of its citizenry is not dependent only on statute. It is constitutional, being derived from Sec. 5., Art. XI, which states in part:
Each city forming its charter under this section shall have, and is hereby granted, the authority to exercise all powers relating to municipal affairs, and to adopt and enforce within its limits, local police, sanitary and similar regulations not in conflict with the general law, and no enumeration of powers in this Constitution or any law shall be deemed to limit or restrict the general grant of authority hereby conferred; ...
The Legislature has specifically granted authority to the City to prohibit criminal trespass by Section 10-8-50, Utah Code Annotated 1953, wherein it states that cities have the power to:
... provide for the punishment of trespass and such other petty offenses as the board of commissioners or city council may deem proper.
*533 It is further important to note that Section 10-8-84, U.C.A. 1953, confers specific authority on cities to pass such an ordinance.
Ordinances  Punishment.  They may pass all ordinances and rules, and make all regulations, not repugnant to law, necessary for carrying into effect or discharging all powers and duties conferred by this chapter, and such as are necessary and proper to provide for the safety and preserve the health, and promote the prosperity, improve the morals, peace and good order, comfort and convenience of the city and the inhabitants thereof, and for the protection of property therein; and may enforce obedience to such ordinances with such fines or penalties as they may deem proper; provided, that the punishment of any offense shall be by fine in any sum less than $300 or by imprisonment not to exceed six months, or by both such fine and imprisonment.
The doctrine is so well established as to be beyond question that when a city is acting within authority thus expressly granted, it has the power to legislate on the same subject as a state statute. See Salt Lake City v. Kusse, 97 Utah 113, 93 P.2d 671; American Fork City v. Charlier, 43 Utah 231, 134 P. 739 (1913); Tooele City v. Hoffman, 42 Utah 596, 134 P. 558 (1913); Salt Lake City v. Howe, 37 Utah 170, 106 P. 705 (1912).
It will be noted that the statement from McQuillin in the main opinion is a generality excerpted from various statements concerning this general area of law. It cites cases decided under particular circumstances which do not necessarily have application to constitutional and statutory provisions such as ours. That same authority, in a context more specifically applicable to the situation here, also states:
Where the unlawful act may be an offense against both the state and the municipal corporation, decisions exist to the effect that the penalty of the ordinance, where it is not otherwise limited to such extent, may be greater than that provided in the state statute... . Clearly, of course, a statutory penalty may be exceeded or increased by the penalty of an ordinance where power to impose such penalty by ordinance has been expressly given. [McQuillin, Municipal Corporations, Section 17.15, pp. 328, 329 (3rd Ed.)]
The test whether an ordinance is repugnant to or in conflict with state law is not whether it deals with the same subject matter in a different manner by providing a different penalty, but it is whether the ordinance permits or licenses something which the state statute forbids or prohibits, or vice versa. See Salt Lake City v. Kusse, supra; and see, e.g. City of Columbus v. Molt, 36 Ohio St.2d 94, 304 N.E.2d 245, and authorities therein cited.
The ordinance here in question does not authorize what the state law has forbidden, nor does it forbid what the state law has authorized. It is therefore my opinion: that the ordinance is within the authority granted to the city and the responsibilities it is enjoined to carry out; that it is neither repugnant to nor inconsistent with other existing law, but is supplementary thereto; and that therefore it should not be declared void.
Further, without conceding, or intimating, any view on my part that the ordinance should be declared unconstitutional, I also observe that I can see no justification whatever for declaring the whole ordinance invalid. Nothing about it could possibly be invalid except only the jail sentence part, which can be regarded as severable. (All emphasis added.)
ELLETT, J., concurs in the views expressed in the dissenting opinion of CROCKETT, J.
NOTES
[1]  State v. Salt Lake City, 21 Utah 2d 318, 322, 445 P.2d 691 (1968).
[2]  28 Utah 2d 343, 502 P.2d 557 (1972).
[3]  122 Utah 344, 346, 249 P.2d 507 (1952).
[4]  97 Utah 280, 92 P.2d 1098 (1939).
[5]  20 Utah 2d 298, 437 P.2d 434 (1968).
[6]  97 Utah 113, 93 P.2d 671 (1939).
[7]  Sec. 17.15, pp. 328, 329 (3d Ed.).
[8]  See Salt Lake City v. Howe, 37 Utah 170, 106 P. 705 (1910).
[9]  97 Utah 97, 108, 85 P.2d 802.
