delivered the opinion of the court.
The relator, Joseph it. Crnkovich, who had been elected and declared a trustee of the Village of McCook, filed a petition for a writ of mandamus wherein he sought to prevent the other trustees of the village, its president and clerk, from entertaining a petition to contest his election which was filed more than thirty days after relator had been declared elected. A motion to dismiss the petition was sustained, and an order entered accordingly, from which relator appeals. No evidence was heard in the proceedings.
It appears from the pleadings that relator was elected trustee of the village on April 21, 1953, was declared elected on April 27,1953, and forthwith entered upon the performance of his official duties. The petition alleges that the applicable Illinois statutes and McCook ordinances provide that a contest of the election of a member of the board of trustees shall be heard by the board, and that any petition to contest such election must be filed with the clerk of the village within thirty days after the official has been declared elected; that on June 24, 1953, more than thirty days after relator was declared elected, a petition was filed with respondents to contest relator’s election; that although respondents had no jurisdiction to receive and consider the petition more than thirty days after relator had been declared elected, they had nevertheless received the petition and were proceeding to entertain it. An amendment to the petition alleged that objections had been made to respondents’ proceeding, and that any further demand on them to desist would be futile. Attached to the petition was a copy of the election contest statement received by respondents and a copy of the respondents’ resolution that the election contest be entertained. The petition further alleged that there is no statutory review from the decision of the board of trustees of the Village of McCook in an election contest; that the proper interests of the relator and of the public require that tbe court determine whether the thirty-day limitation period applies to petitions to contest election of a village trustee; and it asked that a writ of mandamus issue compelling respondents to expunge from the records of the village any action taken in the election contest before or after the filing of the petition for the writ of mandamus and, further, that the writ compel respondents to recognize the relator as a duly elected trustee of the Village of McCook.
Joseph Uljanich, in his sworn statement for contest of election filed with respondents, charged that the canvass showed that Crnkovich, petitioner here, had received 125 votes, whereas Uljanich received 124 votes; that the canvassing board, in arriving at those totals, had erroneously and unlawfully counted as valid four ballots which had not been initialed by the election judge, as required by statute; and that if such ballots had not been counted Uljanich would have been lawfully elected.
To the petition for mandamus as amended, respondents filed a motion to dismiss. At the hearing and in support thereof they challenged the right of the court to control the action of the village board of trustees in its determination to receive and consider the election contest, and contended that the law imposes no thirty-day limitation period upon the filing of an election contest for the office of village trustee with the village board.
Relator relies on the theory that an election contest is purely a matter of statute; that the statute requires that a contest of the election of a village trustee be filed within thirty days; that respondents had no jurisdiction to receive a petition for an election contest more than thirty days after relator had been declared elected; that respondents’ function in hearing an election contest is not judicial but purely ministerial; that respondents had no discretion in the matter; and that the writ of mandamus is a proper remedy where municipal officials attempt to act without jurisdiction.
McCook is a village of fewer than 5,000 population organized and existing under the general Cities and Villages Act of Illinois. The applicable portion of the Act providing for the contest of an election of a village trustee reads as follows: “If not otherwise provided in this section, the manner of conducting, voting at, and contesting municipal elections shall be the same, as nearly as may be, [as] in the election of county officers.” (Ill. Rev. Stats. 1953, ch. 24, see. 9 — 2 [Jones Ill. Stats. Ann. 21.1249].)
“The person desiring to contest such election shall, within thirty (30) days after the person whose election is contested is declared elected, file with the clerk of the proper court a statement, in writing, setting forth the points on which he will contest the election, which statement shall be verified by affidavit in the same manner as complaints in other civil cases may be verified.” (Ill. Rev. Stats. 1953, ch. 46, sec. 23 — 20 [Jones Ill. Stats. Ann. 43.1015].)
The ordinances of the Village of McCook contain the following regarding election contests: “The election of any person declared to be elected to a municipal office may be contested by any registered elector of the village.
“The person desiring to contest such election shall, within thirty (30) days after the person whose election is contested is declared elected, file with the clerk of the proper court a statement, in writing, setting forth the points on which he will contest the election, which statement shall be verified by affidavit in the same manner as complaints in other civil cases may be verified.” (Village of McCook, Revised Municipal Code, 1950, secs. 3.13 and 3.14.)
It is conceded that no statement to contest the election of a village trustee was filed with the village clerk within thirty days after the trustee here in question had been declared elected on April 21, 1953. However, almost two months later, on June 24, 1953, Joseph Uljanich, who had also been a candidate for the office of village trustee of McCook at the same election, presented a petition to the village clerk and board of trustees contesting relator’s election. Thereupon the board of trustees passed a resolution directing that the petition of Uljanich be filed, and that the village attorney take steps to permit the recount of votes. It also appears that four of the respondents, comprising a majority of the board of trustees, had actively opposed the candidacy of relator.
Upon the pleadings and facts admitted by the motion to dismiss the petition the question presented is whether the board of trustees had jurisdiction to entertain the petition of Uljanich to contest relator’s election, which was admittedly filed more than thirty days after relator had been declared elected. This necessitates the inquiry whether the language employed in chapter 24, section 9 — 2 [Ill. Rev. Stats. 1953, ch. 24, § 9 — 2; Jones Ill. Stats. Ann. 21.1249] providing that “the manner of . . . contesting municipal elections shall be the same, as nearly as may be, [as] in the election of county officers,” includes the element of time; in other words, since the statute does not specifically limit to thirty days after declaration of election the time within which a contest of election of a village trustee may be filed, does the word “manner” include the thirty-day limitation within which a contest may be filed, as provided in chapter 24, section 9 — 2. Respondents contend that chapter 24, section 9 — 2, governing the contest of municipal elections, properly construed, does not limit the time for filing an election contest with the board of trustees, but that they may act in their discretion at any time within the term of the office without any limitation.
This contention is related to the proposition that the board is the sole judge of the election and qualification of its own members, with exclusive jurisdiction to hear and decide the election contest, and that courts are without jurisdiction of the subject matter in contests of this kind. It is argued and may be conceded that governmental policy, both federal and state, as evidenced by constitutional and statutory provisions, as well as judicial construction, has always been to vest such exclusive jurisdiction in legislative bodies, and that the village board of trustees, being a legislative body, is the sole judge of the election and qualification of its own members and has exclusive jurisdiction to hear and decide the election contest in question; however, timely filing of an election contest is an important limitation on the right of contestants (Harding v. Albert, 373 Ill. 94). Part of the basis for the jurisdiction of a village board of trustees over contests of the election of members of that board is the statute making the board the judge of the election of its members. Its power to act in that respect exists because the statute making it the judge of the election of its members has been construed to designate it as the body to hear an election contest; but such right is not an unfettered right to act without regard to procedures established to regulate election contests. The trustees of McCook were elected for a term of two years. If the statute were not interpreted to include the time limitation, it would be possible for the trustees to wait fifteen or eighteen months after a trustee had been declared elected to entertain a contest. In the meantime, another election of one-half of the board of trustees, who are elected in alternate years, may have been consummated, and it is conceivable that the board would then be so constituted that it could act arbitrarily with respect to the contested trustee and declare his office vacated without any justification. As was said in the Harding opinion: “In construing the applicable sections of various acts involved, the court must, if possible, ascertain and give effect to the intent of the legislature. Where the spirit and intention of the legislature in adopting the acts are clearly expressed and their objects and purposes are clearly set forth, the courts are not confined to the literal meaning of the words used, when to do so will defeat the obvious intention of the legislature and result in absurd consequences not contemplated by it.”
The precise question whether the word “manner” includes the time element has not been decided in this state, but there are two Illinois decisions which are pertinent to the inquiry. In the early case of Linegar v. Rittenhouse, 94 Ill. 208, it was held that county courts had no jurisdiction to hear and determine the contest of an election with respect to the election of aldermen in the City of Cairo, Illinois, organized under the Cities and Villages Act. The court held that jurisdiction to determine such contest was conferred by the Act upon the city council of Cairo, where the election was held under the provision making the council the judge of the election and the qualification of its own members; but the court referred to that portion of the Act which provided that the manner of conducting and voting at elections and the contest of such elections shall be, “ ‘as nearly as may be, as in the case of the election of county officers, under the general laws of this State’ ” and then referred to the manner prescribed by section 113 of the statute which provided that the person desiring to contest shall, “within thirty days after the person is declared elected, file with the clerk of the proper court, a statement in writing setting forth the points on which he will contest the election.” In commenting on these provisions of the Act, the court said: “These sections point out the mode, and we can see no great inconvenience, by a few slight changes, in rendering it entirely practicable for the city council to try such a contest. The petition can be filed with the city clerk, the notice can be given to appear before the city council, and depositions taken and returned to the council under these sections, and a trial had by that body. . . . Hence we have a provision that the city council shall determine such cases, and the manner prescribed.” The conclusions reached in the Linegar case have never been reversed or modified, and were followed in 1930 in Nesladeck v. Kanka, 341 Ill. 180, in which it was again held that under the Cities and Villages Act the city council, in cities organized under the Act, has the sole authority to hear contests of the election of its members, whether the contest is instituted by a defeated candidate or by an elector, and that the county court has no jurisdiction of the petitions to contest the election of trustees. Here once more the court observed that “all election contests are governed by statute, and the contest must be in the forum, at the time and in the manner provided by statute. [Citing cases.]” The court went on to point out by analogy that section 113 of the Act provided that “the person desiring to contest such election shall, within thirty days after the person whose election is contested is declared elected, file with the clerk of the proper court a statement in writing,” cited Linegar v. Kitten-house as holding that sections 113, 114 and 115 of the Act specify the mode of contest, and quoted with approval from that opinion as follows: “ 1 . . . we can see no great inconvenience, by a few slight changes, in rendering it entirely practicable for the city council to try such a contest. The petition can be filed with the city clerk, the notice can be given to appear before the city council, and depositions taken and returned to the council under these sections and a trial had by that body.’ ”
To sanction any other interpretation would enable the members of a legislative body to act arbitrarily and exclude duly elected officials from holding public office, contrary to the public interest and in derogation of the right of citizens to hold public office.
The remaining contention to be considered is whether relator properly invoked the remedy of mandamus. The writ sought by this petition is not one to require. respondents to decide an election contest one way or the other. If the petition to contest the election had been filed in time so as to give respondents jurisdiction to hear it, the questions heretofore discussed would not have arisen. The question presented by the petition was whether respondents were without jurisdiction to entertain the petition. We have reached the conclusion that it was their clear legal duty to refuse to receive it and entertain it, and that they arbitrarily disregarded that duty. Under the circumstances it must be held that the relator showed a clear and undoubted legal right to the relief prayed, and a corresponding duty on the part of respondents to do the acts sought to be compelled. In Linegar v. Ritténhouse, which established the exclusive right of the city council to hear contests of the election of its own members, the court noted that “the power conferred on the city council to judge of the election and qualification of its own members, however, may not be a bar to a quo warranto or mandamus proceeding.” See also People v. Dreher, 302 Ill. 50, where an application for an original writ of mandamus filed in the Supreme Court sought to direct the city council to “permit the relator [who had been elected mayor] to perform the duties of mayor of the city of Atlanta,” the court holding that “as a general rule, title to a public office cannot be adjudicated on an application for mandamus. [Citing cases.]” However, the court added that mandamus is “a proper remedy to restore a party to the possession of an office from which he has been illegally removed,” and concluded: “So it has been held that mandamus will issue in a proper case to compel a city council to desist and refrain from interfering with a public officer, such as mayor, in the discharge of his duties.”
Because of the time element we think respondents in this case had a duty to decline to entertain the petition; since they failed to perform it, the court should protect relator’s right and the public interest by the issuance of a writ. Accordingly, the order of the superior court is reversed, and the cause remanded for further proceedings in consonance with the views expressed herein.
Order reversed and cause remanded with directions.
BURKE, P. J. and NUEMEYER, J., concur.