The opinion of the court was delivered by
Burch, J.:At its session of 1901 the legislature passed an act enabling cities of the first class to provide by ordinance for the prohibition of the sale of intoxicating liquors contrary to law and for the suppression of liquor nuisances. The method whereby such ordinances may be enforced was definitely prescribed, as follows:
“Such ordinances may be enforced by imposing as a penalty for the violation of the same a fine of not less than one hundred dollars nor more than five hundred dollars, and imprisonment for not less than thirty days nor more than six months for each offense, and payment of the costs, and shall provide for commitment until fine and costs are paid.” (Gen. Stat. 1901, §2499.)
This law took effect March 1, 1901. Afterward an ordinance was passed by the council of the city of Topeka, and duly approved and published, which undertook, within the limits of the city, to prohibit the sale of intoxicating liquors and to suppress places where intoxicating liquors are used and sold, except for lawful purposes. Section 14 of such ordinance prescribes the penalty to be inflicted for a violation of its provisions (except those contained in section 5, which are not material to this controversy), and reads as follows:
“Sec. 14. Any person violating any of the provisions of this ordinance, except section 5, shall upon conviction be punished by a fine of not less than one hundred dollars nor more than five hundred dollars and by imprisonment in the city jail not less than thirty days nor more than ninety days for each offense.”
In March, 1905, the petitioner was convicted of an offense against this ordinance, and adjudged to pay *661a fine of $100, to be imprisoned in the city jail for a period of thirty days, and to remain committed until he should fully comply with the judgment. Under this judgment he was confined in the prison of the city of Topeka, and is still detained there for want of compliance with its terms. The time in which an appeal might have been taken having elapsed, the petitioner asks for his discharge upon a writ of habeas corpus, claiming that the ordinance referred to is void on account of its disobedience of the statute authorizing its enactment.
There is no dispute in the law that municipal corporations are creatures of the legislature, and must look to it as the fountain of all their authority. Without a grant of power, either express or arising by necessary implication, they cannot enact ordinances at all, and the right to punish criminally conduct already made an offense against the state law must be given in clear and unmistakable terms or it cannot be recognized.
“It is, therefore, acknowledged by text-writers, supported by abundant authorities, that a municipal corporation has no right to enforce obedience to the ordinances which it has the power to pass, by fine or imprisonment, or other penalty, unless that right has been _ unquestionably conferred by the lawgiver; for this is inflicting a punishment for the commission or omission of an act declared an offense, a prerogative which, as a rule, appertains to the sovereign only.” (State v. Bright, 38 La. Ann. 1, 4, 58 Am. Rep. 155. See, also, Anderson v. City of Wellington, 40 Kan. 173, 19 Pac. 719, 2 L. R. A. 110, 10 Am. St. Rep. 175.)
It is likewise universally conceded that if power be given to enforce ordinances by fine or by imprisonment, or by the imposition of any other penalty, the method prescribed must be followed literally.
“Since all the powers of a corporation are derived from the law and its charter, it is evident that no ordinance or by-law of a corporation can enlarge, diminish, or vary its powers.
*662“Where the charter or organic act prescribes the manner in which by-laws are to be enforced, or the sanctions or punishments to be annexed to their violation, this constructively operates to negative the right of the corporation to proceed in any other manner or to inflict any other punishment.” (Dill. Mun. Corp., 4th ed., §§317, 339.)
The ordinance in question violates the statutory grant in respect to the term of imprisonment, the assessment of costs, and commitment until fine and costs are paid. Therefore it is void.
It is urged that the statute allows to the governing bodies of cities a discretion to graduate punishments as they see fit within the limits prescribed. Ordinarily such a rule of interpretation may be applied. Discretion to determine the character and quantity of punishment is quite analogous to the discretion to decide whether or not breaches of municipal order shall be punishable at all; but there is no reason why selling intoxicating liquor or maintaining a liquor nuisance is not as heinous in one city as in another. The evils to be remedied are precisely the same in all cases, and the offense itself is necessarily of the same grade wherever it may be committed. The deserts of different offenders may be widely different. Mitigating circumstances may exist in any case which would render a sentence above the minimum unjust, when an old malefactor would merit the limit; but, as between cities, there.is no ground to consider comparative degrees of enormity in respect to this offense, and in practical application discretion in the city to fix penalties results in a pandering to the supposed peculiar sentiments of particular localities, makes punishment lightest where violations are most numerous and flagrant, creates confused notions concerning the character of liquor-selling as a municipal offense, and tends to obstruct general enforcement of the prohibitory law.
Under these circumstances the legislature, through *663the Hurrel law, undertook to place liquor prosecutions under both state and municipal regulations upon the same basis, not only with respect to punishments but also with regard to many other matters, and to secure uniformity it dictated with definiteness and precision every detail of the penalty part of liquor ordinances for every city in the state, leaving nothing whatever to the discretion of the local governing bodies so far as that subject is concerned. This being true, nothing short of exact compliance with the statute will suffice.
In the case of the City of Assaria v. Wells, 68 Kan. 787, 75 Pac. 1026, the only matter decided was that an ordinance which imposes as a penalty for its violation less than the minimum punishment required by the statute is void.
The omission from the ordinance under consideration of provisions relating to costs, and to imprisonment until fine and costs are paid, is not less fatal. The statute is a special one. General provisions of law relating to organization, government and powers of cities are passed by. Explicit direction is given concerning what the penalty part of any ordinance upon the subject of intoxicating liquors shall contain, and proceedings under an ordinance must be conducted according to the directions given in the statute, in all matters enumerated. Whenever both general and special delegations of authority are made to municipal corporations the special grants must be followed in everything to which they relate. (State v. Ferguson, 33 N. H. 424.) The prohibition to pass any other kind of ordinance is as clear as if the law expressly so stated (Huesing v. City of Rock Island et al., 128 Ill. 465, 21 N. E. 558, 15 Am. St. Rep. 129); and any judgment rendered must find the field of its operation, and the basis of its validity, in the ordinance itself.
Since the section of the ordinance fixing the penalty to be assessed for its infraction is void the entire ordi*664nance is void. (Smith v. Gouldy, 58 N. J. Law, 562, 34 Atl. 748.) The ordinance being void in 1901, the city charter act of 1903 could not aid it. (Bostock v. Sams, 95 Md. 400, 52 Atl. 665, 59 L. R. A. 282, 93 Am. St. Rep. 394.)
That the petitioner is entitled to relief by means of a writ of habeas corpus cannot be questioned. (In re Jarvis, 66 Kan. 329, 71 Pac. 576.)
The judgment of the court is that the petitioner be discharged.
All the Justices concurring.