The petitioner claims to be a member of the board of election commissioners of the city and county of San Francisco under a certain act of the legislature approved March 28, 1895. (Stats. 1895, p. 341.) He presented his demand for a month’s salary as such commissioner to the respondent, auditor of said city and count)7, and requested him to draw his warrant for the amount of such salary upon the treasurer of said city and county. The respondent refused to draw such warrant on the ground that said act is unconstitutional; whereupon the petitioner presented his petition to this court for a writ of mandamus to compel said respondent to draw such warrant.
The act in question is entitled an act to add a new .article, to be designated as article IV, to chapter I of title II of part III of the Political Code, and also to add six new sections, “ relative to county, city, and city and county boards of election commissioners.” The part of the act necessary to be considered is a new section designated as 1075, and is as follows:
*100“ Sec. 1075. The board of supervisors of each county is ex officio the board of election commissioners in and for the county, and the common council, or other governing body of a city, is ex officio the board of election commissioners in and for such city; provided, that in cities and cities and counties of this state having one hundred and fifty thousand or more inhabitants the board of election commissioners shall consist of four persons, citizens and electors of such city, or city and county, each of whom must be a freeholder, and have-been an actual resident of said city and county at least five years preceding his appointment, who shall be appointed by the mayor; provided, that the respective executive committees of the state committees of either of the political parties who may be entitled under the-provisions of this act to have members of their party appointed as members of said board of election commissioners shall have the right, within ten days after such appointment, to file with the mayor a written protest against the appointment of a member of said board of election commissioners, as having been appointed as one of affiliation with said party, on the grounds that said appointee is not a person of well-known affiliation and standing with said party from which he has been appointed; and the mayor thereupon shall make another appointment in the place of the party against whom the protest has been filed. The members of said commission shall be ineligible to any other office of public employment, elective or appointive, during the term for which they have been appointed and for one year thereafter. Two of the persons so appointed shall be selected from the body of citizens and electors of such city, or city and county, of known affiliation with and belonging to the political party or organization which at the last presidential election held in such city, or city and county, polled within said city, or city and county, the highest number of votes cast for the candidates of the political party for presidential electors at such election; and the two remaining members of said board shall be-*101selected from the body of electors of such city, or city and county, of known affiliation with and belonging to the political party which, at the last presidential election held at such city, or city and county, polled within such city, or city and county, the next highest number of votes cast for the candidates for presidential electors of a political party. The members of said commission shall,' every two years, choose one of their number as chairman; in the event of their failure to select a chairman in five ballots, the oldest of said members in point of years shall be chairman. The persons first appointed as such board of election commissioners shall be appointed on the first Monday of July, 1895, and shall each hold their office for the term of four years from and after the date of their appointment, except that, of those first appointed, two (one belonging to each political party or organization, as aforesaid), to be designated by the mayor, shall retire at the end of two years, when their successors shall be appointed by the mayor. Whenever any vacancy shall occur in the said board, such vacancy shall be filled by appointment as herein prescribed, and the person so appointed, to fill such vacancy shall be selected in the same manner and from the same political party or organization with which his predecessor in office affiliated and belonged at the time of,his appointment thereto, and shall hold office for the balance of the unexpired term for which he was appointed. The salary of each member of tbe board of election commissioners in and for said city, or city and county, having one hundred thousand or more inhabitants, shall be seven hundred and fifty dollars per annum, payable in equal monthly installments out of the treasury of such city, or city and county, in the same manner as the salaries of other officers of such city, or city and county, are paid.”
' The constitutionality of this section is attacked upon several grounds; and it is apparent that at many points it at least closely approaches the line which limits legislative power. Under our views of the case, however, there *102are many standpoints from which respondent assails the law which it is not necessary for us to explore. While it may be true, as counsel for petitioner sa)rs, that the law was intended for an excellent and worthy purpose, it was evidently drafted in ignorance of the constitution of the state, or with reckless disregard of its provisions.
It is matter of history that when the present constitution was adopted there was a great appreciation of the supposed evils which had arisen out of special and local legislation, and there was a strong purpose to prevent such evils in the future. Perhaps some other inconveniences and evils which arise from too great limitation of the legislative power in this respect were not fully anticipated or considered. At all events, the constitution is exceedingly prohibitory of the power to pass local and special laws; and this feature of the constitution should be kept in view by legislators, for a law passed in plain contravention of it—whether good or bad—cannot be upheld by the judiciary.
Section 25 of article IV of the constitution expressly provides that “ the legislature shall not pass local or special laws in any of the following enumerated cases, that is to say”; and then follow thirty-two enumerated cases, which include nearly all subjects of legislation that can be suggested. In addition there is a thirty-third clause which reads: “In all other cases where a general law can be made applicable.” Among these enumerated cases are the following: “9. Regulating county and township business, or the election of county and township officers. ..... 11. Providing for conducting elections, or designating the places of voting, except on the organization of new counties. .... 28. Creating officers, or prescribing the powers and duties of officers in counties, city and counties, townships, election or school districts.” As the statute here under review deals with subjects enumerated in said section 25, it follows that it. is unconstitutional if it be local or special. But, as it relates only to a part of the territory and people of the state, it is clearly local and special *103(Earle v. Board of Education, 55 Cal. 489), unless there are some other provisions of the constitution and some principle of law applicable thereto which take it out of that category.
There are two provisions of the constitution which somewhat relieve the pressure against local and special legislation. One is section 5, article XI—not particularly applicable here, which provides that the legislature, for the purpose of regulating the compensation of county officers, may “ classify the counties by population"; and section 6 of the same article, which provides that “ corporations for municipal purposes shall not be created by special laws, but the legislature, by general laws, shall provide for the incorporation, and classification, in proportion to population, of cities and towns; which laws may be altered, amended, or repealed.” Now, this court has held that when there has been a classification, authorized by the constitution, of counties or municipal corporations, a law which applies to all of any one class is not invalid upon the ground that it is local or special. The construction of the constitution on this subject has been quite liberal—it being held that if the classification be in other respects such as the constitution warrants, the fact that only one or two counties or municipalities are put in a class will not invalidate it. (Cody v. Murphey, 89 Cal. 522.) But there must be a classification; it must be by a general law (which, of course, may be amended); and the classification must include all the counties or municipalities. Before 1883 the legislature neglected the duty imposed on it by the constitution to make such classification; and its attempts before that time to legislate specially for certain municipalities were held invalid. (Desmond v. Dunn, 55 Cal. 242; Earle v. Board of Education, supra.) In Desmond v. Dunn, supra, the court held that “ sections 6 and 7 of article VI of the constitution evidently contemplated the enactment of general laws, providing for all corporations for municipal purposes, and not for some only; and such laws must be as general as the sub*104ject to which they relate.” In 1883 the legislature made a classification of municipal corporations as follows: “All municipal corporations within the state are hereby classified as follows: those having a population of more than one hundred thousand shall constitute the first class; those having a population of more than thirty thousand, and not exceeding one hundred thousand, shall constitute the second class”—and so on to the sixth class; and this classification has never been repealed or amended. (Stats. 1883, p. 24.) Since then this court, by Temple, C., said: “ On the third day of March, 1883, the legislature did, by a general law, as the constitution requires, classify all the cities of the state. The class mentioned by the law in question is not one of those classes. It is a class created by the act itself. I am of the opinion that this cannot be done. Section 5 of article XI was evidently intended to limit, and not to enlarge, the power of the legislature; and I think that it was intended that the classification there authorized was to be by a general law, in the same sense and in the same way in which it was necessary to provide for the incorporation and organization of cities and towns. Legislation in regard to such corporations would thereafter be made by reference to the classes thus made. .... I think a law in conformity with this special permission in the constitution must be a law classifying all cities in the state, or a law amendatory of such a law. It must leave all the municipal corporations classified.” (Darcy v. Mayor etc. of San Jose, 104 Cal. 642.) We see no distinction in principle between that case and the case at bar. In that case, for the purpose, no doubt, of affecting the city of San Jose alone, an act was passed by which a certain provision was made applicable only to “ all cities containing a population of not less than ten thousand nor more than twenty-five thousand”; but there was no such classification under the general law. San Jose was in the third class, which is constituted of cities with a population of more than fifteen thousand, and not exceeding thirty thousand; *105and therefore the act in question in that case did not affect all the cities of the third class, and was invalid. With respect to the case at bar, there is no classification -of cities, or cities and counties, “ having one hundred and fifty thousand or more inhabitants.” Cities, or cities and counties, having that number of inhabitants are in the first class, which includes “ all municipal -corporations .... having a population of more than one hundred thousand” (Stats. 1883, p. 24); and the act here in question, therefore, does not affect all the corporations of the first class. Moreover, there is an attempt by the act itself to create a class for a special purpose without reference to the existing classification by general law, which was held to be unauthorized in Darcy v. Mayor of San Jose, supra. It is therefore local and special, and for that reason unconstitutional and void.
We see no force in the point that the respondent has no interest in the question here involved. The act under which petitioner claims being unconstitutional and void, there is no law authorizing respondent to draw the warrant; and to do the act demanded of him would be to violate his official duty and oath, and subject him. self to liabilities and penalties. Neither is there any room here for the play of the principle that separable parts of a statute may be valid while other parts maybe unconstitutional. All of the parts of said section 1075, under which alone petitioner claims his salary, are alike involved in the vice of unconstitutionality. Neither is there any distinction, with respect to the point here involved, between cities, and consolidated cities and counties. They are both “municipal corporations”; and with respect to the constitutional provisions herein discussed they are in the same category. (Desmond v. Dunn, supra.)
The views above expressed relieve us from the necessity of determining the many other important and serious objections made by respondent to the validity of the statute here in question. We hold that it is unconstitutional and void for the reasons heretofore given.
*106The prayer of the petition is denied, and the proceeding dismissed.
Garoutte, J., Harrison, J., Van Fleet, J., Henshaw, J., Beatty, O. J., and Temple, J., concurred.