In this action in the nature of quo warranto the People of the State of New York sue by the'Attorney-General without a relator. The purpose of the action two-fold. It is sought to obtain a judgment ousting the defendant from the office of mayor of the city of New York and declaring that William E. Hearst was duly elected to that office and now has. the legal' right to hold the .same. The complaint alleges that there was an election for mayor.of the .city of New York on November 7,.1905 ; that"at that election by the greatest number of legal votes William E. Hearst was legally . elected .'mayorthat in every election district in said city ballots lawfully marked and .cast for Hearst were counted and canvassed for the defendant, and ballots illegally or défeetively marked Were counted and canvassed for the’ defendant, and persons were permitted to vote and did vote for defendant who were not entitled to vote, and. votes were canvassed and entered on the returns as votes for the defendant which had not been cast at all; that the total number of votes canvassed and declared as having been cast for defendant was 228,397, and the total number canvassed and declared as having been.cast for Hearst was 224,923 ; that the total number *418of- votes miscounted in favor of McClellan and of those illegally counted in'kis favor, and the total number of votes omitted to be counted for Hearst greatly exceeded the difference between the' • votes canvassed and declared to have been cast for the defendant and those canvassed and declared to have been. cast for Hearst; that notwithstanding the election of Hearst by the greatest number of legal votes the defendant lias intruded into and now usurps the office of mayor and unlawfully claims and assumes to exercise the powers and functions of mayor. .Judgment is asked upon the right of- Hearst to the office and upon the pretended right of McClellan to.it, and that it be adjudged that McClellan, the defendant, has no right to the office, but that Hearst has and that defendant be ousted therefrom.
The defendant demurs, first, that there is. a defect of parties plaintiff or defendant in that ■ Hearst ■ should have been made a relator or a party plaintiff" or defendant.
Second. That the complaint does not state facts sufficient to constitute a cause of action; and .
Third. That -plaintiff has not legal capacity to sue because the action is .brought neither upon the information of the Attorney-General, nor upon the complaint of a private person. The only one of these grounds of demurrer which seems to call for consideration is that which sets up a supposed defect of parties. Under our present practice, which substitutes an action for-the ancient proceeding by writ, the complaint takes the place formerly taken by the paper then known as an. information, and while the Code of Civil Procedure still speaks ,of the Attorney-General acting upon his own information, that does not mean that before issuing a summons he must inform himself, by a formal document, that there is cause to commence an action. The word is now used in contrast to a “ complaint "of a private person,” and means no more than that, the Attorney-General may commence such au action upon his .own • motion, and upon knowledge or information possessed by himself, without waiting for-a complaint by any person. The question as to the necessity qf joining Hearst as a party is more serious, and no direct precedent is to be found for its solution. There have been cases in which defendants sued, in quo warranto have demurred.for misjoinder of parties, seeking to eliminate from the action the per*419sdn who claimed the office adversely, but none, so far as we have' been able to find wherein the demurrer has been for defect of parties. Indeed we have been referred to no case in which there was a contest between two persons over the right - to hold a public office in which the Attorney-General has not joined, the claimant either as a relator' or as a defendant. As was remarked by Judge Earl in People ex rel. Gilchrist v. Murray (13 N. Y. 535, 541), “the only interest the public have in any public offieé is that its duties are well discharged,” and- generally the litigation over the right to hold an office “is a mere private litigation between the several claimants * * * , in which the people are a mere nominal party.” Accordingly section 1986 of the Code of Civil Procedure provides that where an action is brought by the Attorney-General on the relation or information of a person having an interest in the question, the complaint must allege and the title of the action must show that the action is brought upon the relation of that person, and in such a case the Attorney-General must, as a condition of bringing the action, require the relator to give satisfactory security to indemnify the People against the costs and. expenses thereof. We, of course, are bound to assume that the Attorney-General has.not overlooked this plain provision of the statute, and has not committed the People to what must prove a protracted and expensive litigation without indemnity against the cost thereof, if he could have "exacted such indemnity. We must, therefore, assume that Hearst has laid' no complaint or information before the Attorney-General and makes no claim to the office which the defendant now holds, for otherwise Air. Hearst would have been joined as relator,, and would have been called upon to indemnify the State. We have, therefore, the unusual condition of an action by the People, upon the information of the Attorney-General, to oust the incumbent of an office, and to put in his place another who, so far as appears, makes no claim of title to the office, and has preferred no complaint that he is unlawfully kept out of it. The Attorney-General is authorized by section 1948 of the Code of Civil Procedure to maintain an action “ upon his own information ” against a person who usurps, intrudes into or unlawfully holds or exercises a public office, and it is by virtue of the power -tlms granted that he has brought the present action, and if no other question were *420involved thanthe defendant’s title to hold .the'office, he would have no concern to call iii question' the claim of any other person to the office. Such a case would be presented if the allegation was that the defendant was ineligible to hold the office, or had by some act forfeited it. (People ex rel. Cornell v. Knox, 38 Hun, 236.) In such an action it would not be necessary or relevant tó set out in. the complaint the alleged defect in the defendant’s title or to allege, that any other person had a better title to the office. All that would be necessary or proper to do would be to allege' the intrusion and usurpation, leaving the defendant to assume the burden of establishing his right-to the office (People v. Utica Ins. Co., 15 Johns. 358; People v. Bank of Niagara, 6 Cow. 196), and in the case of an elecf ive officer, such as the mayor of. the city of New York, the production of the certificate of election would be a sufficient answer, to the charge of usurpation (People ex rel. Watkins v. Perley, 80 N. Y. 624), and ho issue as to the validity of that certificate would . be presented unless raised by a replication. The Attorney-General has not,, however, merely called in question the defendant’s title to the office, but has affirmatively alleged that Hearst was legally elected and is entitled to hold the office, finding his authority for raising this question in section 1949 o,f the Code óf Civil Procedure, which provides that in such an action as this, besides stating a cause of action against the defendant, the complaint may set . forth- the name of the person rightfully entitled to the office- and the facts ■ showing his right thereto, whereupon “ judgment may be rendered upon the right of the defendant, and of the party so'alleged'to be entitled ; or only upon the right of the defendant, as justice requires. ’
The defect alleged respecting the defendant’s title is not that lie . is ineligible to hold the office, or that he has. forfeited it, but that Mr. Hearst received a greater number of legal votes for the office than McClellan did. It is evident that this issue call's in question not only the number of legal votes east for the defendant, but also the number of legal votes cast for Hearst, for-it makes no matter how many of the votes canvassed and counted as' having been cast for the defendant wea'e improperly received or counted, if after all. such have been eliminated it appears that he received more legal votes than were cast, counted and canvassed for Hearst. The action, therefore, necessarily involves-a judicial scrutiny not only of *421the votes counted and canvassed for McClellan, but of those counted and canvassed for Hearst, and upon the contention that Hearst received more legal votes than'McClellan, the People, by this form of action, have assumed the affirmative. (People ex rel. Watkins v. Perley, supra.) Hence it follows that in this action Hearst’s title to the office is necessarily involved in the same manner and to the same degree that McClellan’s title is involved, and the action resolves itself into a contest over the number of legal votes received by each respectively; so that a judgment declaring one to be entitled to the office of necessity must declare the other not entitled. Under these circumstances, Hearst would certainly be a proper party to the action, and we think that he is a' necessary party. (People ex rel. Crane v. Ryder, 12 N. Y. 433 ; People ex rel. Petry v. De Bevoise, 27 Hun, 596.) Uecessary parties are those whose rights must be ascertained and settled before the rig-hts of the parties to the suit can be settled (Chapman v. Forbes, 123 N. Y. 532); and as has been shown, the right of the People to a judgment of ouster against the defendant can follow only a determination that Hearst has a superior right to the office, and a judgment declaring that- McClellan was not' rightfully elected, without at the same time declaring that Hearst was, would not only produce great public confusion by creating a vacancy or interregnum in the office of mayor, but .would not be conclusive as to Hearst’s title to office, or as to that of any one claiming under him, or by his title. (People ex rel. Gilchrist v. Murray, 73 N. Y 535.) A complete and final determination of the controversy cannot, therefore, be had unless Hearst is a party to the action, so that the judgment shall determine his title to the office as well as that of the defendant. Section' 452 of the Code of Civil Procedure provides that “where a complete determination of the controversy cannot be had without the presence of other parties, the court must direct them to be brought in ; ” and where it is made to appear, at any stage of the action, before or after trial, that there are parties having an interest and who should be brought in the court is bound, even of its own motion, to direct that they be brought in, and to refuse to render judgment un til they are brought in (Cook v. Lake, 50 App. Div. 92; Osterhoudt v. Board of Supervisors, etc., 98 N. Y. 239 ; Steinbach v. Prudential Ins. Co., 172 id. 471; Moulton v. Cornish, 138 id. 133), and & demurrer, if the facts appear on the face of the *422complaint, is an appropriate means of bringing to the attention of-the court the absence of a necessary party. We are also-'of. the opinion that the sections of the Code of Civil Procedure relating'to actions of this character clearly contemplate that where the controversy is over the rival claims of two persons to hold the same office both should be made parties to the action. As already pointed out, section 1986 is mandatory in the requirement that when the action is brought on the relation or information of a claimant to the office he must be joined as a relator, and section 1954 provides that where two or more persons claim to be entitled to the same office, the Attorney-General may bring an action against all to determine their respective rights thereto. And section 1949, under which this action is brought, provides, for a judgment upon the right of the “party * * * alleged to be entitled.” The use of the word “ party” in this section seems to be indicative of an intention by the Legislature that the “ person ” alleged to be “ rightfully entitled to the office ” shall be a party to the action, for in legal terminology, especially in a practice act, the word “ party ” means a party to the action. (Seeley v. Clark, 78 N. Y. 220; Lane v. Bochlowitz, 77 App. Div. 172.)
We are, therefore, of the opinion that- William It. Hearst is a necessary party to the action, and that it should not proceed, further without his presence.
The judgment appealed from must, therefore, be reversed and • the demurrer sustained upon .the ground ■ that there is a- defect Of parties defendant, with costs in thig court and the court below, with leave to the plaintiff within twenty days and upon the payment of such costs, to take appropriate action to bring in said William K.
Hearst as a party .defendant, the .'defendant’s time to answer being meanwhile extended until twenty days after said Hearst shall have been made a party defendant, and notice thereof, shall have been given to the present defendant.
Patterson, P. j., Ingraham, Laüghlin and Clarke,- JJ., concurred.
Judgmeut reversed and demurrer sustained, with costs in this • court and in the court below, with leave to plaintiff to amend on payment, of costs, the defendant’s time to answer being meanwhile extended as stated in opinion. Settle order on notice.