This case comes to ns on appeal from the third district court. It appears by the findings of fact, that the plaintiff Uriah J. Wenner was in August, 1884, and had been for three years prior thereto, a citizen of the United States and a resident and taxpayer of the city and county *239of Salt Lake, in Utah Territory, It also appears that there was no election in the territory of Utah in August, 1882, as provided by the statute, for the reason that all the elective offices of the territory had been vacated by the act of Congress, approved March 22, 1882, entitled “An act to amend section 5352 of the revised statutes of the United States, in reference to bigamy, and for other purposes,” and the fact that the commissioners appointed under section 9 of the act did not arrive in Utah to fill the offices and provide for the election. In consequence, therefore, of the provisions of the act, there was no election of county officers held.in Utah in 1882.
No question is made but that in August, 1880, the defendant possessed all the qualifications required by the statutes of Utah territory for holding the office of probate judge of Salt Lake county, and at the general' election held in August, 1880, he was elected to that position, and on the twenty-fourth day of the same month he was commissioned by the governor of the territory as such officer, entered upon the discharge of the duties of the office, and held it continuously until March 1, 1884.
Some time prior to 1862 the defendant has been a member of the Mormon church, and has believed that polygamy was permissible to him. He was married to two women previous to 1862, and since then to the present time he has treated the women as wives. He has not entered into new or other marital relations since 1862.
September 16, 1882, the governor of the territory of Utah, Hon. Eli H. Murray, deeming that there was a vacancy in the office of probate judge of the county of Salt Lake, under the provisions of the act of Congress referred to, and a provision of a subsequent act of Congress, appróved August 7, 1882, the same being a provision contained in chapter 433 of the laws of the first session of the forty-seventh Congress, appointed the plaintiff to the office. The plaintiff thereupon, and on the eighteenth day of September, with two good and sufficient sureties, to-wit, William G. Green and Adam S. Patterson, executed an official bond conditioned for the faithful performance of his official duties as probate judge, in the penal sum *240of five thousand dollars. The sureties were residents of the county of Salt Lake, and each worth the sum of five thousand dollars over and above his debts and liabilities in property not exempt from execution. On the same day that the bond was executed the plaintiff took an oath to the effect that he would honestly and faithfully perform the duties of the office of judge of probate, which oath was then and there attached to the bond.
James Cummings was then the treasurer of Salt Lake county, and on the eighteenth day of September the plaintiff tendered him, at his office, the bond with the oath attached and requested the treasurer to file the same. Cummings then and there unqualifiedly refused to approve, or file, or accept the bond and oath, assigning as his only reason for such refusal that he did not recognize the appointment of the plaintiff to the office. Thereupon the plaintiff deposited the bond and oath with the secretary of the territory, for the use and benefit of whomsoever it might concern, as being the best substitute practicable for the filing-required with thé county treasurer. On the twenty-second day of September, 1882, the governor of the territory issued to the plaintiff a commission for the office of probate judge, in due form and under the seal of the territory, duly attested by the secretary. On the same day the plaintiff exhibited his commission to the defendant, informed defendant of his appointment and qualification 'to and for said office, and demanded of defendant that he relinquish to him the office of probate judge, and deliver to him the books and papers pertaining to the office — all and singular thereof, and the defendant refused.
The plaintiff, in accordance with the provisions of the statute, was appointed for the term of eight months. The fees and emoluments of the office of probate judge, received by the defendant during the term of eight months next ensuing September 22, 1882, amounted to the sum of one thousand four hundred dollars. For these fees and emoluments so received, the plaintiff made demand of the defendant before bringing suit, but payment was refused. The defendant held the office during the said term of eight months, believing that he had a right thereto, and *241tlie fees and compensation received by the defendant were not more than the reasonable worth of the official services performed.
Upon this state of facts, the learned judge who tried the case in the court below found as conclusions of law:
1. A vacancy existed in the office of probate judge of Salt Lake county oil the sixteenth day of September, 1882, which the governor of Utah territory was by act of Congress authorized to fill by appointment.
2. By the appointment of the governor, by the efforts made to qualify, and by the commission of the governor, plaintiff became' and was on the twenty-second day of September, 1882, entitled to enter into and hold said office of probate judge, and have and keep the fees and emoluments thereof for the term of eight months next ensuing.
3. Plaintiff is entitled to judgment against defendant for the sum of one thousand four hundred dollars and interest thereon, at ten per cent, per annum, from August 28, 1884, amounting, principal and interest, to one thousand five hundred and sixty-three dollars and thirty-three cents, and for costs of suit.
There are three questions raised by the record: 1. Was there a vacancy in the office of probate judge which the governor was authorized to fill? 2. Can the plaintiff'recover without first vindicating his title to the office in a direct proceeding? 3. What is the measure of damages if the plaintiff was entitled to judgment?
1. We think that the first question must be answered in the affirmative. We think that on the clay that the appointment was made a vacancy existed in the office, which the governor was authorized to fill, and that he performed his plain duty in the premises. It had been provided in substance by section 8, chapter 47, of the first session of the forty-seventh Congress, that no bigamist, polygamist, or person cohabiting with more than one woman, should be eligible to or entitled to hold any office. Congress also enacted, as will be seen by reference to page 313 of the laws of the same session, that “the governor of the territory of Utah is hereby, authorized to appoint .officers in said territory to fill vacancies which may be *242caused by a failure to elect oil tlie first Monday in August, 1882, in consequence of the provisions of an act entitled ‘An act to amend section 5352 of the revised statutes,’ ” etc.
This act was approved August 7,1882, the day appointed by law for the annual election in Utah, and it is conceded that the election failed in consequence of the provisions of the first-named act, commonly called the “Edmunds act.” '
The law authorizing the governor to fill vacancies caused by a failure to elect at the election of August, 1882, is commonly called the Hoar amendment. At the time of its passage the statutes of the territory provided “that on the first Monday in August, 1874, and every two years thereafter, there shall be elected by the qualified electors of the several counties of Utah territory one probate judge, whose term of office shall be two years, and until his successor is elected and qualified.” The first Monday in August was also the day for the general election: Comp. Laws 1876, sec. 18.
On the first Monday in August, 1880, the defendant was elected to the office of probate judge of Salt Lake county, and shortly after entered upon the duties of his office. By the law just quoted, the successor of the defendant would have been elected at the election on the first Monday in August, 1882, had that election been held. Had such a successor been elected, there is no question but that he would have been entitled to the office by filing the bond and oath of office. As we have seen that election was not held, because Congress, by section 9 of the Edmunds act, vacated all election offices in the territory, and those appointed by the president under the provisions of that section had not qualified and were not in a position to conduct the election on the day provided by the statutes of the territory. The condition of affairs was brought to the attention of Congress, and it passed the law authorizing the governor to make appointments: 13 Cong. Record, part 7, 6778, 6796, 6891, 6941, 6981, 6982.
Until the passage of this law the governor had no authority to appoint to office, except in certain particular cases. All the power, he had to make the appointment of the defendant was derived from this law,
*243It is our view tliat this law must Joe construed, to substitute tbe appointment by the governor for the election by the voters of the county. In this view we think there can be no question but that a vacancy existed at the time the plaintiff was appointed. The law certainly was ’ intended for some purpose, and should be construed so as to effect that purpose. Under the construction asked by the defendant, the law becomes a dead letter. There was not, if what he contends is correct, an office to which it could apply. Congress must be presumed to have known, when it passed the law in question, the provisions of the territorial laws regarding elections and the tenure of office, and that successors to most of the officials in the territory wotild have been elected on the first Monday in August, 1882. Knowing this, and that the election could not be held in consequence of the provisions of its earlier act, in order to prevent any confusion that might arise because of this failure to elect successors to the then incumbents, it passed the 'Hoar amendment, authorizing the governor to appoint in lieu of election.
"When, as in this case, the words of the statute are not explicit, the intention is to be collected from the context, from the occasion and necessity of the law, from the mischief felt, and the object and remedy in view, and the intention to be taken or performed according to what is consonant to reason and good discretion: Dwarris on Statutes, etc., 194, note 13. What was the occasion for the passage of the law in question? Plainly the failure of the August election. What was the mischief felt? The fear that confusion would arise from the failure of the election. What was the object and remedy in view? The object was to prevent confusion; the remedy, the appointment of officers to succeed the incumbents, in the same manner as though the election had been held.
The defendant was a polygamist at the time of the appointment of the plaintiff and had been such for a longtime prior thereto: Murphy v. Ramsey, 114 U. S. 41. This fact alone was sufficient to make the office held by him vacant, without reference to the Hoar amendment. The eighth section of the Edmunds act expressly pro*244vides that “no polygamist, bigamist, or any person cohabiting with more than one woman . . . shall be entitled to vote at any election, ... or be eligible for election or appointment, or be entitled to hold any office ... in or under any territory of the United States.” This law stands, in relation to the territories as a constitutional provision. Congress has supreme control of all the territories, and the laws enacted by Congress for their government are and must be supreme, any law of a territory to the contrary notwithstanding: National Bank v. County of Yankton,101 U. S. 129; Ferris v. Higley, 20 Wall. 375; Organic Act, sec. 6. There can be no doubt but that Congress, by the Edmunds act, intended to vacate all offices held by polygamists, and to disqualify all such persons from holding office, without reference to whether they had committed the crime of polygamy as described and defined in the first section of the act. Congress knew at the time of the passage of this law, and this court must take judicial notice of the fact, that polygamy had existed in this territory.
For years Congress had been endeavoring to suppress it, by denouncing it as a crime to be punished by severe penalties. Notwithstanding the laws the practice had continued. Our judicial annals show that up to the time of the passage of the Edmunds act there had been but one or two convictions. Taking into consideration the failure of the laws to effect the purpose for which they were passed, it seems to us that a very slight examination of the Edmunds act, and of the causes which led to its adoption, will satisfy every one that the intention of Congress was to provide a twofold remedy, the one criminal and the other civil. The act plainly said that polygamists shall no longer hold office and receive honors and emoluments from the hands of the government, whose laws they violate and defy.
We also think that when the governor appointed and commissioned the plaintiff that it gave him prima facie title to the office. It imposed upon any one contesting the burden of showing a better., title: People v. Head, 25 Ill. 325. In establishing a better title the qualifications, *245of tbe defendant would have been in issue — tbe question would have arisen whether he was or was not a polygamist.
The question as to whether a vacancy existed in the office, which we have just considered, was squarely before this court in the case of Kimball v. Richards, decided February 10, 1883. No opinion was filed, but the issue upon the pleadings and the judgment of the court show that the court then held that the question should be answered as we have answered it.
2. The action was properly brought. It has been held that the title to an office may be determined in an action by the claimant thereof for money had and received, to recover the fees from a wrongful intruder: Glascock v. Lyons, 20 Ind. 1; Allen v. McKean, 1 Sumn. 276; United States v. Addison, 22 How. 174; Dolan v. Mayor, 68 N. Y. 274. The defendant usurped the office. He was a wrong-doer from the moment he was notified that his successor had been appointed and had qualified. An action lies against a person who has usurped an office, and received its known and accustomed fees: 1 Ch. Pl. 400; 1 Selw. N. P. 81; Boyter v. Dodworth, 6 T. R. 681; Powell v. Milbank, 1 Id. 399; Sadler v. Evans, 4 Burr. 1984; Lightly v. Clouston, 1 Taunt. 113; Howard v. Wood, 2 Lev. 245; Allen v. McKean, 1 Sumn. 276; Dolan v. Mayor, 68 N. Y. 274. We do not think that in law the defendant held the office in good faith. He was promptly notified of the appointment of his successor, but he declined to yield up the office, He must bear the consequences of his own mistake. “When-one of two innocent men must suffer, he- through whom it occurred must bear the loss.” The defendant, in the eye of the law, was a wrong-doer.
The title of the plaintiff to the office in question was set forth in the complaint as well as his claim for the fees of the office. The defendant did not demur to the complaint, but answered and denied each allegation. If the defendant is right, then there is a misjoinder of actions, and he should have demurred.specially. Not having done so, we think he must be deemed to have waived the objection: Macondray v. Simmons, 1 Cal. 393; Marius *246v. Bicknell, 10 Id. 217; see Laws of Utah, 1884, secs. 292-295; Bliss on Code Pl., sec. 417; Boone on Code Pl. sec. 265.
3. We think the measure of damages was correctly determined by the court. It is true that there was no salary attached to the office and the incumbent was paid in fees. It is also true that the value of the services of the defendant was equal to all that he received. So, in a case of an officer who is paid by a salary, the value of his services is equal to the salary which he receives. The law aims at compensation. The defendant wrongfully prevented the plaintiff from holding the office to which he was entitled, and wrongfully received and appropriated the emoluments of the office. To say that the defendant can retain any part of the fees of the office would be to say that he can be allowed to reap a benefit from his own wrong. This he cannot do: State v. Steers, 44 Mo. 223.
There is no error in the record, and the judgment of the court below must be affirmed with costs.
Zane C. J., and Boreman, J., concurred.