
1 Cal.2d 486 (1934)
JAMES S. BLAINE, Petitioner,
v.
THE BOARD OF SUPERVISORS OF ALAMEDA COUNTY et al., Respondents.
S. F. No. 15258. 
Supreme Court of California. In Bank.  
September 14, 1934.
 J. E. Hood for Petitioner.
 No appearance for Respondents.
 THE COURT.
 Petition for writ of mandate to compel the respondent Board of Supervisors of Alameda County to refuse to certify the election of Chris B. Fox to the office of justice of the peace of the city of Oakland (police judge), designated as office "No. One", and to compel the county clerk of said county to refuse to issue to Chris B. Fox a certificate of his election to said office, and commanding the clerk to print on the ballot to be used at the ensuing general election the name of petitioner and the name of Chris B. Fox as candidates for said office.
 [1] Prior to the recent primary election, Howard L. Bacon, then the incumbent in said office, Chris B. Fox, and petitioner were candidates to be voted on at the primary election for said office. After the three persons named had qualified as candidates for the office, and after notice thereof was given and published, and the name of each had been printed on the sample and official ballots, as such candidates, as by law required, and thirteen days before the primary election, Judge Howard L. Bacon died from the effect of gunshot wounds inflicted by a disgruntled former client. *488 The circumstances of the shooting and the death of Judge Bacon were given much publicity by and through the press. The fact of his death, therefore, was generally known throughout the city of Oakland.
 At the primary election held in the city of Oakland, a total number of 69,152 votes was cast for the candidates for the office of justice of the peace of the city of Oakland (police judge) "No. One", of which total vote Judge Bacon, though dead, received 9,759, James S. Blaine, petitioner herein, 25,956, and Chris B. Fox 33,437. From these figures the petitioner contends that there was no election at the primary, in that Chris B. Fox did not receive a majority of the votes cast for all the candidates at the primary, and that he is, therefore, entitled to be placed on the November ballot as a candidate for the office opposed to said Chris B. Fox. The Board of Supervisors of Alameda County, unless compelled otherwise, is about to and will declare said Chris B. Fox elected to said office of justice of the peace, and would certify such fact to the respondent county clerk, who, it is alleged, will issue to Chris B. Fox a certificate of his election to the office, and will not print the names of any candidates for said office on the ballot for the general election in November.
 The Direct Primary Law (Stats. 1913, p. 1379, sec. 23), in so far as relevant here, provides that "in case there is but one person to be elected at the November election to a judicial ... office, any candidate who receives at the August primary election a majority of the total number of votes cast for all the candidates for such office shall be the only candidate for such office" at the ensuing election. Section 2 3/4 of article II of the Constitution, so far as is here pertinent, reads as follows: "Any candidate for a judicial ... office who at the primary election shall receive votes on a majority of all the ballots cast for candidates for the office for which such candidate seeks nomination, shall be elected to such office." The decision in this case, therefore, depends upon who may be considered a candidate and what ballots cast at the primary election may be counted.
 [2] It seems to be thoroughly settled that votes invalid for any reason are not to be considered in determining the number of votes cast. To this general effect see Murdoch v. Strange, 99 Md. 89 [57 Atl. 628, 629, 3 Ann. Cas. 66]; *489 Catlett v. Knoxville etc. Ry. Co., 120 Tenn. 699 [113 S.W. 559, 562, 563]; State v. Clausen, 72 Wash. 409 [130 P. 479, 45 L.R.A. (N. S.) 714]. In the first case cited, it was held that if the ballot contains the name of one who is known to be ineligible, the ballot cannot be counted, because the object of the ballot then would be not to elect but to prevent the election. A case which seems to be squarely in point is Madden v. Board of Election Commrs., 251 Mass. 95 [146 N.E. 280, 281]. It was held in that case that "one who has died before election cannot be a candidate for an office or elected to an office. Valid votes for election to an office cannot be cast for one who is no longer alive. It is equivalent to throwing away a vote knowingly" to cast it for one who has died. "It is of no more effect than to deposit a blank ballot or one marked with a fictitious or historic name. This is not a doubtful question." This same thought is expressed in State v. Frear, 144 Wis. 79 [128 N.W. 1068, 1072, 140 Am.St.Rep. 992], where it is said that in those cases in which "votes were cast for a candidate known to be dead or disqualified or for a fictitious person", the great current of authority is "to the effect that such ballots are ineffectual for any person, and cannot be counted in determining the result of the election"; and, further, that "votes knowingly cast for a candidate who cannot possibly exercise the functions of the office if elected are thrown away, and it seems to us that this should be so".
 For the foregoing reasons, the petition for the writ is denied.
