The return to the writ issued herein shows that the petitioner was, at the date of its service, in the custody of the chief of police of the city and county of San Francisco, under arrest upon a charge of violating an ordinance of that city which prohibits selling pools on horse-races, or holding money or other *590thing as a stake upon any wager as to the result of such race, “ except within the inclosure of a race-track where such trial or contest is to take place.”
The preamble to this ordinance, which gives the reason for its enactment, is as follows: “ Whereas, it has become apparent that the practice of gambling on horse-races has become alarmingly prevalent, and is the cause of debauching many of our boys and young men, rendering them unfit for the honorable occupations of life; and whereas, this discreditable occupation, with all its vicious results, is allowed in all its alluring features to occupy places in the business portion of our city, enticing our youths into habits which ultimately effect their ruin and degradation; and whereas, it is asserted that there is no legislation prohibitory of this nefarious and demoralizing pursuit being conducted and carried on, the present legislature having failed to pass any of the bills introduced for that purpose; now, therefore, the people of the city and county of San Francisco do ordain,” etc.
It is claimed by the petitioner that the ordinance is void' for the reason that it, in effect, gives to the proprietor of the race-course the right to determine who shall enjoy the privilege of indulging in this species of betting, as he has the power to admit and exclude whom he pleases, and only those admitted to the track are permitted to wager upon the result of the race; and further, that a monopoly is created in favor of such proprietor, as those who desire to engage in the business of pool-selling will necessarily be compelled to pay him for the privilege.
We do not think these objections have sufficient force to render the ordinance invalid.
Under sections 7 and 11 of article XI. of the constitution of this state, the city and county of San Francisco is authorized to make and enforce within its limits such police regulations as are not in conflict with general laws, and the ordinance in question is clearly a police regulation. Any practice or business the ten*591dency of which, as shown by experience, is to weaken or corrupt the morals of those who follow it, or to encourage idleness instead of habits of industry, is a legitimate subject for regulation or prohibition by the state; and that gambling, in the various modes in which it is practiced, is thus demoralizing in its tendencies, and therefore an evil which the law may rightfully suppress without interfering with any of those inherent rights of citizenship which it is the object of government to protect and secure, is no longer an open question.
The measures needful or appropriate to be taken in the exercise of this police power are determined by legislative policy, and for this purpose a wide discretion is committed to the law-making body. Whether it shall entirely prohibit or only regulate by confining such practices within prescribed limits, — whether the law shall apply to every kind of gambling, or only to those games or wagers in which evil effects appear with greatest prominence, — must be determined primarily by the legislative department of the state, or of the municipality authorized to exercise this great power, which is conferred for the purpose of securing the public safety and welfare; and unless it clearly appears that a statute or ordinance ostensibly enacted for this purpose has no real or substantial relation to these objects, and that the fundamental rights of the citizen are assailed under the guise of a police regulation, the action of that department is conclusive. (Mugler v. Kansas, 123 U. S. 661; Matter of Jacobs, 98 N. Y. 98; 50 Am. Rep. 636; Watertown v. Mayo, 109 Mass. 315; 12 Am. Rep. 694; Ex parte Keating, 38 Cal. 702.) It is manifest, we think, under this rule, that the ordinance in question cannot be declared invalid. Whatever may be its incidental effect, it is apparent that it is not the object or purpose of the ordinance to confer any special privilege or benefit upon those who own or control race-courses, by giving them the exclusive right to carry on the business, or of selling to others the privilege of pool-selling on horse-races; and therefore we need not stop to consider whether a *592law or ordinance having only such an effect, or plainly intended to accomplish such an object, under the mere pretense of establishing a police regulation, could be upheld. As already stated, a large discretion is vested in the legislative branch of the municipal government in dealing with questions of this character, in determining not only what games or wagers should be made the subject of legislation, but, if permitted at all, under what regulations they should be allowed to exist.
It seems to have been the judgment of that department that the existing evils consequent upon selling pools on horse-races, as declared in the preamble to the ordinance under review, would be sufficiently restrained by confining the business to the inclosure where the race is to be run; and as the object sought to be accomplished is,lawful, and the mode of regulation not clearly inappropriate to effect it, the ordinance is valid.
Writ discharged, and prisoner remanded.
Garohtte, J., Sharpstein, J., Harrison, J., Paterson, J., and Beatty, C. J., concurred.