The plaintiff and defendant were rival candidates for election to the office of mayor of the city of Larimore in Grank Forks county, at the city election held April 7, 1913. The official canvass gave defendant 116 votes and plaintiff 113 votes. The plaintiff contested the election of the defendant on the grounds: (1) That illegal votes were cast for defendant by persons not qualified to vote; (2) that de*364fendant violated the corrupt practice act by inducing and persuading one Hetherington to vote on election day.
A trial was had, and resulted in a judgment in favor of the defendant, holding him the duly elected mayor of the city of Larimore. The learned trial court also held that it was without jurisdiction to hear, try, and determine the contest proceeding.
1. The first question is whether the provisions of our statute relating to contested elections of county and other officers are applicable to a contest over the office of mayor of a city. If they have no application to that office, then the district court is without jurisdiction in the premises. The provisions for contests are found in §§ 688 et seq., Rev. Codes 1905.
The first reason alleged to sustain the decision of the trial court is that, because § 2660, Rev. Codes 1905, provides that “the city council shall be composed of the mayor and aldermen,” and § 2665, that “the' city council shall be judge of the election and qualifications of its own members,” the mayor is a member of the city council, and that therefore that body is the exclusive judge of his election and qualifications. In this we are satisfied that counsel errs. The mayor is the chief executive officer of the city, § 2644. A vacancy in the office of mayor, if for more than a year, is filled by an election, if less than that period, by the city council, §§ 2645 and 2646. He presides at all meetings of the city council but has no vote except in case of a tie, when he gives the casting vote, § 2648. Tie has power to remove any officer appointed by him (§ 2649); is a peace officer, and has the same power within the city limits conferred upon sheriffs, to suppress disorder aúd keep the peace, § 2650. He performs such duties as are from time to time prescribed by law and by the city ordinances, and it is made his duty to take care that the laws and ordinances are faithfully executed, § 2652. He inspects records, gives information to the council relative to the affairs of the city, and makes, recommendations.for its consideration; may call upon each male inhabitant over eighteen years of age to aid in enforcing the laws and ordinances, and call out the Militia; is liable to prosecution criminally in any court of competent jurisdiction for omission of duty, or corruption or oppression, and for other derelictions, and is given the power to sign or veto any ordinance or resolution passed by the council, §§ 2653 — 2658.
*365These are among the general duties imposed upon him as the city’s chief executive. His only duties in acting with the city council are to preside at its meetings and to have the easting vote in case of a tie. We are of the opinion that he is elected primarily as the executive officer of the city; that his membership in the city council, notwithstanding the statute, is only nominal; that under the provisions of the Code, his duties are defined, and are not enlarged by the statement of § 2660, that the city council is composed of the mayor and aldermen. It ■does not appear to us that he is a member of the city council in the sense meant by the provision of § 2665, making that body the judge of the election and qualifications of its own members. It is apparent to us that that only refers to the aldermen who are members of the city council.
Numerous authorities are cited by both appellant and respondent on these questions, but the great weight of authority seems to sustain our conclusions, and they are fortified by one decision at least of the supreme court of Illinois, from which state the provisions of our Code to which we have made reference, as well as many others relating to the government of cities, are copied, many sections verbatim, others with only verbal changes, while of course there are sections in the Illinois statute on the subject which are applicable to conditions existing in large cities, which were unnecessary to include in our Code, but which in no manner affect the proposition that our statute was taken from Illinois. It will be presumed that provisions so adopted were intended to carry with them the construction theretofore placed upon them by the courts of the state whence they came.
In Winter v. Thistlewood, decided in January, 1882, reported in 101 Ill. 450, the supreme court of Illinois had under consideration the question herein presented, and on the subject we are now considering it says: “The right conferred upon the council is only to judge of the election and qualification of its own members, — simply to determine who shall be a part of it and participate in its deliberations. No judicial powers are conferred upon it, and when it has denied one claiming to be a member the privilege of participating in its proceedings, it has done all that there is the slightest pretense it has any authority for doing. But the mayor is the chief executive officer of the city, and, independently of the council, in that capacity may exercise within the *366city limits;” and here follows a list of many of the powers conferred upon mayors, when the court continues: “In none of these respects, does the city council have any control over him, and in all of them he acts entirely independently of the common council and without the slightest reference to the question of his membership in that board. Indeed, except in case of a tie in the votes of the aldermen, when he is required to give the casting vote, his duties as a member of the council are more formal than substantial, being limited to merely presiding. It is to be borne in mind authority is not conferred upon the common council to be the judge of the election and qualification of the mayor, as it is to be presumed would have been, if such had been intended, but simply of its own members. We are clearly of opinion whatever power the common council may exercise in regard to the election and qualification of a mayor as affecting his membership of the council, it has no power to go beyond the letter of the statute and determine a contest between two rival candidates for the office of mayor. Even if it be conceded, which we do not, that the council may lawfully decline to allow the mayor to preside over its deliberations and give the casting vote in case of a tie on the ground that he is not elected and qualified, its power extends no further. In such case the power is given, to the body to enable it to protect and purify itself, but neither principle nor analogy extends it any further.”
Sections of the Illinois statute were under consideration in that, case identical with §§ 2660 and 2665, supra, of our own Code. That, case has not been overruled, and as to the power of the city council to> determine a contest over the office of mayor, we think is controlling. Supporting this view, see also: Cate v. Martin, 70 N. H. 135, 48 L.R.A. 613, 46 Atl. 54; Tiedeman, Mun. Corp. § 96; Martindale v. Palmer, 52 Ind. 411; Jacobs v. San Francisco, 100 Cal. 121, 135,, 34 Pac. 630; Garside v. Cohoes, 34 N. Y. S. R. 234, 12 N. Y. Supp. 192.
The New Hampshire court in Cate v. Martin, supra, remarks: “Applying the principles of these authorities, . . . the result is indubitably to established the proposition that, while the mayor is a constituent part of the aldermanic board .for some special purposes, he sits and acts in the board, not in the capacity of an alderman, but in the capacity of ex officio presiding officer, and exercises those powers *367only which have been specially committed to him as the chief executive of the city.”
The authority given by § 2665 to the council, “to judge of the election and qualification of its members,” corresponds to similar provisions in the Constitutions of nearly every state regarding membership in their legislative bodies, and also to a provision in the Federal Constitution; but we do not understand that it has ever been held or contended that such provision gave jurisdiction to those legislative bodies to determine contests over the election of a lieutenant govern- or or a Vice President, yet, to all intents and purposes, they are as much members of the respective bodies over which they preside as is the mayor of a city in this state, even though no provision making a lieutenant governor or Vice President a member of the Senate may be found.
Our conclusion that the mayor is not a member of the city council in the sense meant by § 2665, supra, renders it unnecessary to determine the question discussed at considerable length in the briefs as to that provision being the sole method provided for contesting the election. On this subject, however, see the exhaustive note in 26 L.R.A.(N.S.) at page 207.
2. The next question involving the jurisdiction of the court requires us to determine whether any provision has been made by the legislature for a contest of the office of mayor of a city, that is to say, whether the general law relating to the contest of county officials applies to the office of mayor. We do not understand it to be questioned that a proceeding in the nature of quo warranto would be applicable, but that question is not before us, because it was not the method adopted by the appellant. An answer to this question necessitates a reference to our statute providing for election contests. Section 602, Rev. Codes 1905, provides that all elections for state, district, county, city, and ward, and other officers provided by law, shall hereafter be held and conducted in the manner prescribed in this chapter, except as otherwise specially provided by law. This section is followed by provisions regarding the holding and conduct of elections. Section 688 and the remaining sections of art. 13 of chap. 8 of the Political Code provided a method for contesting elections, and § 688 reads in part: “Any person claiming the right to hold an office, or any elector of the proper *368county desiring to contest the validity of an election, or the right of any person declared duly elected to any office in such county, shall give notice. ... 55 Article 14 of chap. 30 of the Political Code provides for the-holding of elections in cities, and § 2746 found in that article reads in part: “The manner of conducting voting at elections to be held under this chapter and contesting the same, the keeping of poll lists and canvassing the votes, shall be the same, as nearly as may be, as in the case of the election of county officers under the general laws. . . .”
It is contended that this furnishes no provision by which a contest over the office of mayor of a city may be instituted and conducted in the courts. The respondent urges that the words, “the manner of contesting the same/’ only apply to the method of procedure, and do not relate to the jurisdiction. We understand him to insist that the same methods of notice and statement of the grounds of contest, etc., must be employed, and that the contest is then heard by the city council, rather than by the district court. We are satisfied that this interpretation of the language employed is too narrow, that the manner referred to relates not only to the method of procedure, but to the body or court which shall hear and determine the contest. That such was the intent of the legislative assembly in enacting this question can hardly be open to doubt, in view of the provisions which we have heretofore in this opinion construed. It can hardly be possible that, if the legislature intended to provide a speedy method for determining a contest over any county' office, it should have employed the language found, and still have meant to subject a contest over a mayoralty to the delays and difficulties incident to methods which a contest was intended to obviate. When § 2746 is read in connection with the provisions regarding contests in general, it is in perfect harmony therewith ; and if the mayor is not a member of the city council in such sense as to make that body the judge of his election, § 2746 clearly does not give it jurisdiction to try a contest over that office, and, inasmuch as the only jurisdiction given by the contest statute is to the courts, it must include contests for mayor, otherwise its reference to that subject is without meaning.
Again, our conclusion is fortified by reference to the Illinois Statute and the case of Winter v. Thistlewood, 101 Ill. 450. We have *369heretofore indicated that the provisions regarding city officials were largely taken from Illinois, and we find by inspection that § 2746 supra is also a copy of the corresponding provision in the Illinois statute.
Paragraph 58 of chap. 24, Starr & Curtis, Annotated Illinois Statutes, as far as material reads: “The manner of conducing and voting at elections to be held under this act, and contesting the same, the keeping of poll lists and canvassing the votes, shall be the same as nearly as may be, as in the case of the election of county officers under the general laws of this state.”
Section 691, Rev. Codes 1905, gives the district court jurisdiction to try contests, and if the reference to contests found in § 2746 has any meaning whatever, it must be meant to apply to contests for mayor. While in Illinois there are some provisions regarding the filing of the notice and reply with the clerk of court, which are not specifically made by our legislature, we think they do not change the effect of the statute. It was held in the case cited that it seemed beyond controversy that the election of mayor being held under the general law relating to cities, etc., the manner “of contesting the same shall be the same as nearly as may be as in the case of county officers under the general laws of this state.” This and the provision of the statute of Illinois giving the county court authority to hear and determine contests on county officers, corresponding to § 691, supra, rendered a contest over the mayoralty in county court proper.
We hold that the district court has jurisdiction to hear and determine such contests. See also Treat v. Morris, 25 S. D. 615, 127 N. W. 554; Kadlec v. Pavik, 9 N. D. 278, 83 N. W. 5.
3. Appellant next urges that the respondent was guilty of such violation of § 16 of chap. 129, Laws of 1911, known as the corrupt practices act, as to deprive him of the office of mayor under the provisions of § 19 of the same act. As far as material § 16, supra, reads: “It shall be unlawful for any person at any place on the day of any election to ask, solicit, or in any manner try to induce or persuade any voter on such election day to vote or refrain from voting for any candidate, or the candidates or ticket' of any political party or organization, or any measure submitted to the people. ...”
The record discloses that one Hetherington, claiming to be a qualified voter, went to the polls, and on being told that he was not entitled *370to vote, he sought advice of an attorney; and then, in his own language, “I stopped in to see Mr. Gass, and told him that I had to swear my vote in; that I wanted him to go up and sign it up for me.” Whereupon Gass went to the polling place and signed the statutory affidavit required of a voter who is challenged. He testified that he did not remember of Gass saying anything in the polling place while he was there. Gass testified that Mr. Bennett (one of the officials) asked a few questions of Mr. Iietherington about his residence, etc., about his household goods, and instructed the clerk to make out an affidavit, and after that was done he signed it.
Some of the officials testified that Gass gave instructions to Hetherington before he voted, by telling him to go and vote, that he ivas a legal voter, or something of that kind. Witnesses for the respondent testified that there was no conversation of this kind, but that after Hetherington had voted, different parties, including the respondent, got into a discussion over the qualifications of the voter. The trial court found that the defendant did not ask, solicit, or in any way try to induce or persuade any voter on said election day to vote or refrain from voting for any candidate or candidates, or ticket of any political party or organization, or any measure submitted to the people thereat. While there is a conflict as to exactly what took place and was said at the polls, there is sufficient evidence to sustain the finding of the trial court in defendant’s favor, unless the mere fact that, after being requested to do so by Hetherington, Gass went to the polls with him to swear in his vote, constitutes a violation of the corrupt practices act, as, equivalent to asking Hetherington to vote for defendant.
While we agree with. the suggestion of counsel for appellant, that that act should be liberally construed with a view to its enforcement in the public interest and the purity of elections, and that the principle involved in the law is salutary, yet we cannot agree with him that the act of the defendant was a violation of the statute. It would be SO' harsh a construction of the law as to render any person who assists a voter in casting his ballot, liable to prosecution under the terms of the act, and this certainly could not have been contemplated by the legislature. No solicitation by Gass is shown; on the contrary, Hetherington was the one who solicited him, and he exercised his prerogative, as a citizen, to aid another citizen in casting his ballot; and we think *371this act, at least as testified to by him, and which, in view of the finding of the trial court, must govern, does not come within either the spirit or the letter of the statute.
4. The next and serious question in this case is as to the legality of the votes cast by R. L. Rowe, George R. Hetherington, John McIntyre, and A. Hooks.
The trial court found that one J. O. Murphy did not vote in the precinct of his residence. This reduced the vote of the contestee to 115, leaving him two majority over the contestant.
Hetherington voted in the first ward, where he swore in his vote. The affidavit on which he voted was verified by the contestee, and stated his residence to be with J. E. Hetherington, in the first ward. On the trial he testified that his residence was at the Salvation Army barracks, also in the first ward. It seems that the residence referred to was that of his son. The record shows that Hetherington worked most of the time from the spring of 1912 out of town on the Hersey farm, and both boarded and roomed them, except at times when he came to town. He testified that he may have been to town once a month, and that the winter before the election he was absent from town three months at one time; that part of his personal effects were at his son’s and part at the barracks; that when he came to town he slept at the barracks, where he-had the use of a room in which he had a stove and cooking utensils, bed and clothing; that he had a lock and key to the room and that he paid nothing for its use; that he was not at the barracks between November and the election; that originally there was a partition between his room and the Salvation Army hall, but that that partition had been torn down and removed, so that he had no longer any private room; that the year before he had been sick and then stayed at his son’s. He testified that he had lived in Larimore since the fall of 1892, and during all that time voted in the city and in the first ward since the spring of 1893, and that he claimed the barracks as his home, and returned there when not engaged on some temporary employment elsewhere, and had no other home.
The question of the residence of farm laborers, who have no family and who work from place to place, for the purpose of voting, is often a difficult question, and each case must be determined upon its own facts. Much depends upon the intent of the party, but the intent must *372be accompanied by an act or acts, to establish or retain a residence. While it is possible that Hetherington might have voted at the Hersey precinct, had he declared that to be his home, and that he considered it as such and intended to continue to make it his home, yet the record does not show that he attempted to vote there at any time, or that he considered it as his home, or that, if he was out of employment, he would remain there. Notwithstanding the fact that he gives no explanation of how he happened to make affidavit that he resided at his son’s, and that, when he first approached the polls, he informed the election officers that he had not resided in Larimore since the preceding November, we think his testimony, taken in toto, warrants the inference that his meaning, in making such statement, was that he had not been there or stayed there since the preceding November. We grant that there is much force in the argument made by counsel for appellant to show that the trial court erred, but we think there is sufficient evidence to sustain the finding.
5. The next vote challenged is that of one McIntyre, a single man, who voted for Gass. He had lived around Larimore about four or five years, but, commencing in the fall of 1912, he had worked for one Purcell, about 12 miles out of Larimore, and continued to do so until the 29th of March, 1913, and about the 8th or 9th of April he engaged to work in the country for Mr. Steadman, where he still remains. He testified that when he went to town, he usually stayed at the place of one Prevost, but that from the time he commenced to work for Purcell he had neither room nor board at Prevost’s place, and was not there, although he stayed in Larimore a few days; that he was not related to Prevost. He had lived in Grand Porks county since coming to the state about ten years, except one winter, and had lived in Logan township southwest of Larimore, and left that township and went to Larimore about the 1st of November, 1912. He testified, however, that his only home had been at Prevost’s for three years; that he had been there three weeks when he went to Purcell’s; that he came in just before Christmas and went to Prevost’s place one day; that a portion of his clothes remained at Prevost’s; that he went to Prevost’s when he finished any job of work; that he paid Prevost for his board and lodging when there; that, if he remembered right, he had left his good clothes at Prevost’s to save bother carrying them around; that, at the time of the *373trial, he had an overcoat at Prevost’s. Purcell testified that McIntyre worked for him from the middle of November until the last of March; was only away part of one day. Prevost testified that, while McIntyre worked for Purcell, he had most of his stuff with him, and that any that was left was as an accommodation, and no charge was made for storing it; that McIntyre did not keep a room there when absent, and had no trunk there. McIntyre testified that he did not vote in the 1910 general election, but the poll book of Logan township for that election was offered in evidence, showing that John A. McIntyre voted.
He was a farm laborer, and we think it apparent that he did not have a permanent residence in Larimore, and that he carried his residence with him. So far as the intent covers, it is, of course, easy for this class of men to testify as to their intent, and make it apply to any place where they stop for either a short or a long period. There is a marked distinction between McIntyre’s case and Hetherington’s. Hetherington had for many years made Larimore his home, and had a room and furniture in the city. But there is nothing in McIntyre’s case to show that he intended making it his home, further than to enable him to vote on this occasion. He left nothing of sufficient importance to call for his return to Larimore, had it been more convenient for him to have taken his departure from another place. His vote in Logan township negatives the fact that he had considered Larimore as home during the three years, and the fact of the very brief stays made by this man in Larimore and his leaving no trunk at Prevost’s and no belongings of sufficient importance to call him back there if inconvenient to go, the extent of his stay at Purcell’s place, and his voting in Logan township, are quite persuasive that he, in fact, had no residence except where he was employed. On the record his residence was at Prevost’s while he lived there, and no longer. If his vote is legal, then any farm laborer who, in seeking employment, stops at a city for a few days until he finds employment in the country, and on holidays or other convenient occasions goes into town for business or pleasure, may claim the city as his residence for voting purposes. It was not the intention of the Constitution makers who prescribed the qualifications of an elector to permit transients and floaters to vote in a place where they make an occasional stop but where there is no tangible evidence *374of a permanent residence. Authorities holding that one domicil is retained until another is established are not applicable to the question of residence of a party claiming to be entitled to vote. For voting purposes a man may be a resident of the state, yet, by reason of having changed his residence from one county to another, lose his right to vote, and the same is true with reference to a change of precincts.
6. The next vote challenged is that of one A. Hooks. He was a single man and a farm laborer by occupation. He testified that he had no particular headquarters in Larimore except that it was the place where he worked, which had been for Pat McMahon and Ole Kalness; that he voted in the third ward, in which McMahon lived; said that he had claimed that place as his home for the past two years. During the summer of 1912 he worked for one Heine in the country, and had his effects with him. In September, 1912, he came into town and worked and slept on McMahon’s farm adjoining the city, where he kept his trunk and things, but took his meals in town. He had no room in the house in town. After quitting work for McMahon about the 1st of February, 1913, less than ninety days before this election, he went to work in the country for McLain, and worked for him until the 28th of March, when he went into town for three days and stayed at' a hotel in the second ward. He hired out to one Kalness on quitting McLain, and worked for him one day, when he again hired to McMahon. He had not lived in the ward where he voted for ninety days next preceding the election, and had had no room there or any of the indicia of a home.
It is clear from the testimony of Hooks that he had no home except where he worked. The facts show that he did not regard McMahon’s city place as his home, except when he was working for him, and then he in fact lived and slept outside the limits of Larimore. It is not pretended that he went to McMahon’s when he came into town for a day or two. On such occasions he stayed at a hotel in another ward. This is wholly inconsistent with the claim of residence at McMahon’s. He voted for Gass.
7. The next vote challenged is that of one Howe. There is a clear distinction between his case and those of Hooks and McIntyre. He had worked for Pifer since June, 1912, and went wherever Pifer sent his gang of men, but, between trips or completing one job and com*375mencing another, always returned to Pifer’s place, in Larimore, except on one or two occasions when Pifer’s bunk house was not in condition for lodgers, and Pifer sent him to a hotel and paid his bill until the bunk house was ready for occupancy. He was a resident of Larimore for the same reason that McIntyre and Hooks were not residents of that city.
8. Testimony was taken regarding the qualifications of several other persons who voted, but as there is no reference made to them in the brief of appellant, it must be held that he has abandoned any claims of illegality as to their votes. Certain other errors are assigned, but we find them unimportant in view of our conclusions.
9. In general, regarding the residence of voters, we may call attention to the provisions of the Constitution requiring one to have resided in the State one year, in the county six months, and in the precinct ninety days, next preceding an election, to qualify him to vote. § 121 and § 2744, Rev. Codes 1905, as amended by chap. 66, Laws of 1911. This latter section provides that “every legal voter of the county, in which such city is situated, who shall have been a resident of the city ninety days next preceding a city election, is declared a citizen of said city, and shall be entitled to vote at all city elections,” but only in the ward or precinct where he resides. A good-faith intent of a voter to make a place his home for all purposes is one essential element entering into the determination of the question of residence; and a domicil once gained does not continue until a new one is acquired, for voting purposes; nor does a right to vote'at a particular poll or district continue until the right to vote elsewhere is shown, but the shortest absence coincident with an intention to change the residence defeats the right to vote at the former domicil. Kreitz v. Behrensmeyer, 125 Ill. 141, 8 Am. St. Rep. 349, 17 N. E. 232.
The place of one’s residence for the purpose of voting is where he has his established home, the place where he is habitually present, and to which, when he departs, he intends to return. Berry v. Wilcox, 44 Neb. 82, 62 N. W. 249, and note in 48 Am. St. Rep. 712. The question of residence must be determined from all the facts and circumstances surrounding the person, as related to his residence, and the intention must be accompanied by acts in harmony with the declared intention; and notwithstanding one may testify that his intention was to *376make his home in a certain place, if his acts are of a character to negative his declaration or inconsistent with it, it is clear that the court cannot be governed by his testimony as to intention.
In harmony with our views we quote briefly from State v. Savre, 129 Iowa, 122, 3 L.R.A.(N.S.) 455, 113 Am. St. Rep. 452, 105 N. W. 387: “A person cannot live in one place, and by force of imagination constitute some other his place of abode. The intent and the fact, as already stated, must concur. . . . The home of an unmarried man is where he has his rooms, in which he keeps such personal effects as he has, where he rests when not at work, and spends his evenings and Sundays.” In that case, a party testified that he intended to make his home at a place where he took his meals, but, as he slept in another place, the court held that his testimony as to intention was disproved by the fact that his actual place of residence was controlling, and that he could not improvise one by merely forming an intention to claim it elsewhere. This especially applies to McIntyre.
See also People v. Moir, 207 Ill. 180, 99 Am. St. Rep. 205, 69 N. E. 905; Gardner v. Board of Education, 5 Dak. 259, 38 N. W. 433; People v. Ellenbogen, 114 App. Div. 182, 99 N. Y. Supp. 897; Frost v. Brisbin, 19 Wend. 11, 32 Am. Dec. 423; White v. Slama, 89 Neb. 65, 130 N. W. 978, Ann. Cas. 1912C, 518. In Widmayer v. Davis, 231 Ill. 42, 83 N. E. 88, it was held that a man who lived for a year or more in a ward, but prior to an election moved away, and left clothing and kept the key of the house in which he had lived, so he might be entitled to vote, was not a qualified voter.
Our conclusion is that each candidate received 113 votes, and that therefore there was no election of mayor. The judgment of the trial court is vacated, and it will enter a judgment in accordance herewith, and directing the parties to proceed in accordance with the provisions of § 2747, Rev. Codes 1905, for the determination by lot of who shall hold the office of mayor in case of a tie. Howser v. Pepper, 8 N. D. 484. Appellants will recover costs.