The opinion of the court was delivered by
Smith, J. :
The defendant in error, J. M. Jones, filed a petition in the district court of Douglas county, alleging in substance that on the 6th day of April, 1897, there was held in the city of Lawrence an election of city officers, at which the plaintiff was a can*202didate for the office of councilman of the fifth ward on the populist or citizens’ ticket, he being a duly qualified elector of said ward and city, and the said defendant was a candidate for the same office, in opposition to the plaintiff; that the judges of the election determined that the plaintiff and the defendant had each received 151 votes, and thereupon proceeded to determine the election of a candidate by lot; that the lot fell to the plaintiff Jones, who was declared to be elected, and the returns were sent to the city clerk, as provided by law ; that the mayor and councilmen met as a canvassing board, canvassed the returns of the election in the manner provided by law, and thereupon determined and resolved that the plaintiff Jones was the duly elected councilman of said fifth ward, and ordered a certificate of election to be issued to him; that, notwithstanding the fact that said board of canvassers declared the plaintiff elected and ordered a certificate issued, the said Watt wrongfully and improperly usurped the said office and wrongfully holds and exercises the office of city councilman, to which the plaintiff was legally elected. The prayer was for a judgment of ouster, asking that-the defendant Watt be excluded from the said office, and that the plaintiff Jones be awarded the same, and for costs.
The defendant Watt answered in substance as follows : (1) A general denial of all the allegations of the petition not admitted in the answer; (2) admitting that there was an election on April 6, 1897, in the city of Lawrence, and that the plaintiff and defendant were both candidates for the office of councilman for the fifth ward; that the defendant was the regularly nominated candidate for said office on the republican ticket, and that the plaintiff was the regu*203larly nominated candidate on the citizens’ ticket; that the election board of said fifth ward made return to the city council that said plaintiff and defendant each had received 151 votes, and that said, judges of election had determined the result thereof by lot as alleged in the petition ; and admitting further that on the 12th day of April, 1897, the city council, sitting as a canvassing board, canvassed the returns of said election of said fifth ward, and upon such canvass of said returns declared the plaintiff Jones to be elected ; (3) the defendant Watt answered further that at said election H. J. Snyder and four others named constituted an election board; that after the ballots had been cast by the electors of said ward and the polls closed, and while said election board was counting the ballots, J. M. Cooper, while acting as clerk of said election board, manipulated the tally-sheets in such a way, by entering therein more tallies for the plaintiff Jones than he had received votes, as to cause said tally-sheets to show that the plaintiff and defendant had each received the same number of votes, and thereupon said election board proceeded to determine said election by lot; that said board wrote upon slips of paper the names of said plaintiff and defendant respectively, and placed them in a hat; it being agreed by said board that whichever candidate’s name was first drawn out should be returned as the successful candidate; that the name of the defendant Watt was first drawn out, and said defendant was then entitled to be returned as the successful candidate ; but said election board, disregarding the rights of the defendant in that respect, replaced said slips of paper in the hat a second time, and then drew out first the slip of paper containing the name of the plaintiff Jones, and thereon returned the name of said Jones as the *204successful candidate ; that upon such fraudulent and illegal returns the city council, while sitting as a canvassing board, declared the plaintiff Jones elected and ordered a certificate of election to issue to him as aforesaid; (4) defendant Watt, further answering, alleged that within ten days after said election was held, and on April 12, 1897, said defendant Watt, pursuant to the provisions of section 18, of ordinance No. 7, of the Revised Ordinances of the city of Lawrence, entitled “An ordinance relating to elections,” stated to said city council in writing his grounds of contest of said election and caused due legal and personal notice to be served upon said plaintiff Jones; that said city council thereupon fixed the time and place to hear and determine said contest, and thereafter, on the 19th day of April, 1897, in the council chamber of the city of Lawrence, at the time and place fixed for the hearing, said city council, acting as a contest board, proceeded to hear and determine said contest; that at said hearing both parties appeared by attorneys, and said city council, acting as. a contest board as aforesaid, having heard the allegations and evidence of the parties and argument of counsel, having recounted all the ballots cast in said fifth ward at said election, and being fully advised in the premises, did find and determine that said plaintiff Jones had received at said election 149 votes and said defendant Watt had received 152 votés, whereupon they adopted the following resolution :
“Whereas, the city council of the city of Lawrence, sitting as a contest'board, having recounted the ballots cast at the said election held April 6, 1897, for the election of councilman of the fifth ward in said city ; and
“ Whereas, on such recount J. M. G-. Watt received *205for councilman of the fifth ward in said city 152 votes and J. M. Jones 149 votes : therefore, be it
“Resolved, that J. M. G. Watt be and is hereby declared as councilman from the fifth ward in the city of Lawrence ; and be it further
“Resolved, that the mayor and clerk be-authorized and directed to issue to him a certificate of election as such councilman.”
The defendant alleged further, that thereupon said mayor and clerk made and issued to the defendant Watt a certificate of election, who duly qualified as councilman from said fifth ward, and entered upon the discharge of the duties of his office, and has ever since held and still holds said office, and enjoys all and singular the honors and emoluments thereof; that by reason thereof said contest is now fully settled and determined, and no cause of action accrues to said plaintiff to relitigate said contest in an independent action; (5) the defendant below further answered, that at said election he received a majority of all the votes cast in said fifth ward; that the total number of ballots cast was 333, of which the defendant Watt received 157 and the plaintiff Jones 149 ; that, of said number of votes cast for said plaintiff Jones, seven illegal ballots were cast and counted for him, containing identifying and distinguishing and other improper markings, and that the same could not be lawfully counted for said Jones ; ■ (6) that five persons who had no legal capacity to vote appeared at said voting place in the fifth ward, and voted for said plaintiff Jones ; (7) that a recount of the ballots cast at said election in said fifth ward would show that defendant Watts received a majority of all the votes cast for councilman in said fifth ward, and was legally entitled to hold said office.
*206To this answer the plaintiff below, Jones, filed a demurrer, stating as reasons that said answer did not state facts sufficient to constitute a cause of action or defense to or against the said petition. This demurrer to the answer was sustained by the district court, and ,the plaintiff in error, Watt, electing to stand thereon, judgment of ouster was rendered against him.
We are not informed as to Ihe precise point upon which the demurrer to the answer was sustained. The defendant in error made no appearance in this court, and no briefs have been filed in his behalf. The allegations contained in paragraph 4 of the a?rswer relate to contest proceedings commenced by the defendant below before the city council. That tribunal seems to have been authorized by ordinance to hear and decide contests between persons claiming to have been elected to any city office. In the answer it is referred to by title as “An ordinance relating to elections ” ; but its contents are not pleaded, and our only knowledge of it is derived from the brief of the plaintiff in error. All the proceedings of the council as a contest board, and its authority so to act, are based upon its provisions. The resolution ordering a certificate of election to issue to the defendant is but declaratory of the findings of the council so assembled by virtue of said ordinance. Unless the court below could have taken judicial notice of this ordinance, it could not have considered the proceedings had before said contest board, or the result. This was a civil action between individuals, and we think the rule is well established that, in such cases, an ordinance, which is a mere by-law of a municipal corporation, must be pleaded either by quoting its language or stating the substance of its provisions. A reference *207to the title is not sufficient. Ordinances stand on the same footing as private and special statutes, the laws of other states, and of foreign countries, and must be averred and proved like other facts. (17 A. & E. Encycl. of L. 262; City of Austin v. Walton, 68 Tex. 507, 5 S. W. 70.)
Upon this question this court has heretofore gone no further than to hold that in misdemeanor cases, where an appeal is taken from the police court of a city to the district court, the latter will take judicial notice of the ordinance under which the defendant is being prosecuted. In such cases the district court is pro hac vice the police court. (City of Solomon v. Hughes, 24 Kan. 211; Downing v. City of Miltonvale, 36 Kan. 740, 14 Pac. 281.) It follows then that paragraph or count 4 of the answer stated no defense to the allegations of the petition, nor did it set up any grounds of counter-claim which could be considered by the court.
The fifth and sixth counts of the answer state sufficient facts to constitute a defense to the plaintiff’s claim. They aver that the total number of ballots cast was 333, of which the defendant received 157 and the plaintiff Jones 149; that there were seven illegal ballots cast and counted for Jones, containing identifying and distinguishing marks; that five persons who had no legal capacity to vote appeared at the fifth ward polls and voted for the plaintiff Jones. The allegations of said counts or paragraphs, if proved, would have entitled the defendant Watt to the office. (Dorey v. Lynn, 31 Kan. 758, 3 Pac. 557.)
The facts set up in these paragraphs were sufficiently and definitely pleaded to stand good as against a demurrer.
The answer, however, nowhere alleges that Watt, *208the defendant below, was a qualified elector of the city of Lawrence. This qualification is a prerequisite to the holding of any city office under the law regulating cities of the second class. Section 35, chapter 37, General Statutes of 1897 (Gen. Stat. 1889, ¶772), reads : “All officers elected or appointed shall be qualified electors of said city.” The constitution fixes the qualifications of electors. (Const., art. 5, § 1.) Again, section 21, chapter 37, General Statutes of 1897 (Gen. Stat. 1889, ¶ 771), provides that “no person shall be eligible to the office of councilman who is not at the time of his election an actual resident of the ward for which he is elected” ; and section 20, “ that he shall be an owner of real estate within the city.” There is no averment in the answer which brings the defendant in error within the requirements of these sections of the statute. It might be asserted that a certificate of election having been issued by the council to the defendant in error, Watt, the same presupposes that all previous qualifications for the office existed. This certificate of election, however, as before stated, was ordered issued by a tribunal acting as a contest board, assembled under a city ordinance not pleaded, the provisions of which we cannot judicially know.
The answer of Watt is in the nature of a cross-petition, in which he asks affirmative relief against Jones and prays that he be adjudged to have been elected. His demand is based upon the fact that he received 157 votes and Jones 149 ; that illegal ballots were cast for Jones, which had distinguishing marks upon them and ought not to have been counted for Jones, and, further, that five persons who had no legal capacity so to do voted for Jones. This demand of the defendant below for affirmative relief should have *209contained an allegation that he was qualified to hold the office. (People v. Wallace, 91 Cal, 535, 27 Pac. 767; The State, ex rel. Ault, v. Long, 91 Ind. 351; Reynolds v. The State, ex rel. Titus, 61 id. 392.) The answer having failed to state this material allegation, the demurrer thereto was properly sustained. The judgof the court below will be affirmed.