The petitioner was convicted in the police court of the city and county of San Francisco of a misdemeanor, for visiting a house of ill-fame, and on the seventh day of March, 1890, was sentenced to “pay a fine of four hundred dollars, and in default of payment thereof, that he be imprisoned in the county jail of said city apd county at the rate of one day for each one dollar of fine until said fine is satisfied.” Under a commitment issued upon this judgment he was immediately taken into the custody of the sheriff, and has since that day been confined in the county jail of San Francisco.,
Section 33, order No. 1587, as amended by order No. 1955, of the board of supervisors of the city and county of San Francisco, under which his conviction was had, is as follows: “It shall be unlawful for any person in the city and county of San Francisco to keep or maintain, or become an inmate of, or a visitor to, or in any manner to contribute to the support of, any disorderly house, or house of ill-fame, or place for the practice of gambling, or knowingly let or underlet or transfer the possession of any premises for use by any person for any of said purposes. Every person who shall violate any of the provisions of this section shall be deemed guilty of a misdemeanor, and punished by a fine of not less than twenty dollars, or imprisonment not less than ten days.”
The maximum amount of the punishment for this offense is not defined, but is left to the discretion of the court, except as it, is qualified by the provisions of section 1 of order 1587, which reads as follows: “Any person violating any of the provisions of this order shall be deemed guilty of a misdemeanor, and be punished by a fine not exceeding one thousand dollars, or imprisonment not exceeding six months, or by both such fine and imprisonment.”
Construing these two sections together as defining the extent of the punishment by fine for the offense, it results that the ordinance provides that the penalty for *101visiting a house of ill-fame shall be not less than twenty dollars, nor more than one thousand dollars.
Municipal ordinances must be reasonable, and the penalties prescribed for their violation must also be reasonable as well as definite. It is not essential, however, that the precise amount of the penalty for each offense shall be designated in the ordinance. It is sufficient if it be left to the discretion of the court, within fixed, reasonable limits. The maximum limit must, however, be reasonable. (Dillon on Municipal Corporations, secs. 338, 341.)
The legislature (Stats. 1861, p. 552) has given to the city and county of San Francisco power “ to determine the fines, forfeitures, and penalties that shall be incurred for the breach of regulations established by its board of supervisors,” with the maximum limit of one thousand dollars, or six months’ imprisonment, or- both. But it does not follow that the city is authorized to affix this maximum penalty for the violation of every regulation that it may establish under its general power to define offenses, and prescribe penalties therefor. It is not justified in prescribing the same penalty for each offense which it may define. Penalties should be prescribed with reference to the offenses which are committed, rather than to the power under which they may be prescribed. This power to “ determine ” the penalties which shall be incurred for the breach of its regulations has been conferred upon the city, and must be exercised by its board of supervisors, and not left to the discretion of the judge before whom the offense is tried. (Matter of Frazee, 63 Mich. 408.) The board of supervisors must itself fix, within limits which are reasonable, the penalty to be incurred for the violation of each offense. If, however, the board of supervisors does not determine the penalty in any other terms than that it shall not be less than twenty dollars, but leaves to the judge the power to affix the maximum *102amount of punishment which the legislature has authorized to be affixed for the violation of any offense, instead of fixing the penalty within reasonable limits, it gives to the judge the discretion of determining what the penalty shall be for each offense. This has the same effect as if it had itself fixed the maximum limit of the penalty at one thousand dollars. But a municipal ordinance which should prescribe a fine of one thousand dollars, or even four hundred dollars, as the penalty for visiting a house of ill-fame, would be not only unreasonable, as imposing a punishment greatly disproportionate to the offense, but would also be inconsistent with the general principles of the Penal Code upon kindred topics.
In the exercise of the power conferred upon it to “ regulate all practices which are contrary to public order and decency,” by virtue of which this ordinance was adopted (Stats. 1863, p. 540), it was incumbent upon the city to frame the ordinance, so far as practicable, in harmony with the general laws of the state. (Ex parte Kearny, 55 Cal. 225; Dillon on Municipal Corporations, sec. 319.)
The act of which the petitioner was convicted is not enumerated among the crimes which are defined in the Penal Code, but is made an offense solely by virtue of the ordinance. The legislature has not deemed it necessary to prescribe any punishment therefor, ánd from the statutes which it has adopted upon kindred topics, the penalty allowed by the ordinance in question must be held to be not in harmony with its general policy. By the provisions of section 647 of the Penal Code, a person “ who lives in and about houses of ill-fame” is punishable only by imprisonment in the county jail not exceeding ninety days; and by section 315 of that code the extent of punishment to be inflicted upon the person who “ keeps ” a house of ill-fame is limited to imprisonment in a county jail not exceeding six months, or a fine not exceeding five hundred dollar's, of both.
• We are of the opinion that so much of the ordinance *103in question as permits a fine of one thousand dollars to be imposed as the penalty for visiting a house of ill-fame is unreasonable, and not in harmony with the laws of the state, and therefore void. The petitioner must therefore be discharged from custody.
It is so ordered.
De Haven, J., Sharpstein, J., Paterson, J., Garoutte, J., and Beatty, C. J., concurred.