after stating the facts as above, delivered the opinion of the court.
On December 21, 1881, under section 2259. of the Eevised Statutes, the United States sold the land in dispute to one who had then declared his intention to become a citizen, received the purchase price, and issued to him the usual final receipt or patent certificate. Upon the statements contained in that receipt the mortgage company loaned its money, and by the foreclosure of its mortgage acquired all the rights of the purchaser. Had the commissioner of the general land office the right to declare a forfeiture of the rights of the mortgagor and of .the lien of the mortgage 10 months later, because the purchaser, Irwin, had not declared his intention to become a citizen J anuary 6, 1881, before he filed his application for a homestead? Where the register and receiver hear the application of a party to enter land, as a pre-emptor, or otherwise, decide in favor of his right, receive his money, and give him a certificate that he is entitled to a patent, he thereby acquires a vested right to the land that can only be divested according to law. Johnson v. Towsley, 13 Wall. 72, 85. There is no doubt that the commissioner of the general laud office may review' and set aside the action of the register and receiver before the patent issues, where their decision is induced by fraud, perjury, or mistake, or results from an erroneous view, of the law7. Swigart v. Walker (Kan.) 30 Pac. 162; Jones v. Meyers (Idaho) 26 Pac. 215; U. S. v. Steenerson, 1 C. C. A. 552, 50 Fed. 504; Fernald v. Winch (Kan.) 31 Pac. 665; Mortgage Co. v. Hopper, 56 Fed. 67. But the supervisory or reviewing power of the commissioner of the land office or of the secretary of the interior is not an arbitrary, unlimited, or discretionary power, but a power that must be exercised according to the law, and not in violation or in disregard of it. Where it is so exercised, and its exercise is not induced byfraud or mistake, the results it produces are sustained by the courts. Where its exercise has been induced by fraudulent misrepresentations or by material mistake of fact, or where the power has been exercised in violation or in disregard of the law, the results produced are uniformly so modified by the decrees of the courts that those who are entitled in equity to the titles to the lands ultimately "obtain them. Eo principle is more firmly established in American *195jurisprudence than that, after the title has passed from the United States to a private party, it is tin; province of the courts to correct the errors of the officers of the land department, which have resulted from fraud, mistake, or erroneous views of the law, to declare the legal title to the lands involved to be held in trust for those who have the better right to them, and to compel their conveyance accordingly. Cunningham v. Ashley, 14 How. 377; Barnard’s Heirs v. Ashley’s Heirs, 18 How. 43; Garland v. Wynn, 20 How. 6; Lytle v. Htate of Arkansas, 22 How. 193; Lindsay v. Hawes, 2 Black, 554, 562; Johnson v. Towsley, 13 Wall. 72, 85; Moore v. Robbins, 96 U. S. 538; Bernier v. Bernier, 147 U. K. 242, 13 Sup. Ct. 244. Thus in Johnson v. Towsley, supra, the register and receiver held that Towsley was entitled to the patent to the land in question, and issued the final receipt to Mm under the pre-emption law, notwithstanding the fact that he had previously filed his declaratory statement on some unsurveyed land that he subsequently abandoned. The secretary of the interior held that filing fatal to Ms right, and issued the patent to Johnson. Towsley then brought his suit in equity, and the supreme court held Unit he had the better right, and that Johnson held the title in trust for Ms benefit. In the opinion that court declares that in every case where the register and receiver, by their decision, sale, and patent certificate, vest the right to the land in the entryman, and the land office afterwards sets aside this certificate, and grants the land thus sold to another person, it is of the very essence of judicial authority to inquire whether this has been done in violation of law, and, if it has, to give appropriate remedy. So in Silver v. Ladd, 7 Wall. 219, the register and receiver held that Elizabeth Thomas, an unmarried woman, was entitled to the benefits of the act of June 25, 3862, which in terms confers its benefits on single men and heads of families only, and issued a donation certificate to her. The commissioner held otherwise, and issued the patent to another. The supreme court sustained the ruling of the register and receiver, and declared the title under the patent to be held for the benefit of Miss Thomas and her- grantees. From these authorities it clearly appears that it was the province and duty of the court below to consider and determine the question presented in this case. Here there was no question of fact, no fraud, no mistake,—nothing but a. question of law.
Was the action of the commissioner, forfeiting the rights of the entryman and of Ms mortgagee to this land, 10 months after the register and receiver had vested them by their sale and certificate, on the sole ground that the entryman had not declared Ms intention to become a citizen until just before he made his purchase, in accordance with or in violation of the law? Section 2259 of the Revised Statutes, whch grants pre-emption rights, provides:
"ifivery person, being tlie bead oí a family, or widow, or single person, over the age of twenty-one years, and a citizen of the United States, or having- filed a declaration of intention to become such, as required by the naturalization laws, who has made, or hereafter mak<M, a settlement in person on the public lands subject to pre-emption, and who inhabits and improves the same, and who has erected or shall erect a dwelling- thereon, is authorized to enter with the register of the land office for the district in which such land lies, by *196legal subdivisions, any number of acres not exceeding one hundred and sixty, or a quarter-section of land, to include tlie residence of such claimant, upon paying to the United States the minimum price of such laud.”
Section 2289 of the Revised Statutes, granting homestead rights, provides, among other things, that:
“Every person who is the head of a family or who has arrived at the age of twenty-one years, and is a citizen of the United States, or who has filed his declaration of intention to become such, as required by the naturalization, laws, shall be entitled to enter one quarter-section or a less quantity of unappropriated public lands, upon which such person may have filed a pre-emption claim, or which may, at the time the application is made, be subject to preemption at one dollar and twenty-five cents per acre.”
Section 2301 of the same chapter provides that:
“Nothing in this chapter shall be so construed as to prevent any person who has availed himself of the benefits of section twenty-two hundred and eighty-nine, from paying the minimum price for the quantity of land so entered, at any time before the expiration of the five years, and obtaining a patent therefor from the government, as in other cases directed by law, on making proof of settlement and cultivation as provided by law, granting pre-emption rights.”
If the entryman, Irwin, had never made any application for a homestead under section 2289, he would have been a qualified preemptor, entitled as such to enter this land and purchase it when lie did purchase it, on December 21,1881, under section 2259. He had made his settlement in person upon it. He was then inhabiting and improving it. He had erected a dwelling thereon, and he had declared his intention to become a citizen. Section 2259 does not require that the pre-emptor shall have been qualified to enter the land for 10 months, or for any length of time, before his purchase. It is sufficient if he has filed his declaration to become a citizen an instant before be enters and pays for the land. But it is said that he deprived himself of this right because he availed himself of the benefit of the homestead act (section 2289) for 11 months while he was an alien. This position-is in the very teeth of section 2301, which expressly provides that nothing in the chapter relative to homesteads shall be construed to prevent any person who has availed himself of the benefits of section 2289 from paying the minimum price of the land so entered, and obtaining a patent therefor, on making proof of settlement and cultivation as provided by the law granting pre-emption rights. If Irwin had been qualified when he made his application for a homestead, that claim would nave been valid, but it would not have deprived him of the right to enter the land as a pre-emptor under section 2259. The utmost effect of his lack of qualification was that his homestead claim Avas invalid, and that he had no claim on the land until he made his entry and purchase of it, December 21, 1881. But he was entitled to enter and purchase this land, under section 2259, at that time, without any prior claim to it. It cannot be that because he had asserted an invalid claim he was deprived of his right to malee a lawful purchase.
Our conclusion is that, in the absence of an adverse claim, a qualified pre-emptor is not deprived of his right to enter and purchase land as such by the fact that he made an application for and occupied the land as a homestead before he declared Ms intention to *197become a citizen. It follows that the commissioner’s action in attempting to forfeit the rights rested in Irwin and his mortgagee 10 months after the purchase was in violation of the law, and cannot be sustained.
Moreover, if the claim of counsel for the appellant, which we have shown to be unfounded,—that the register and reeeiver had the right under the law to refuse to sell this land to Irwin until he proved that he liad declared his intention to become a citizen, before he made his homestead application,—were conceded, the result must be the same. Under iliat concession the question is not whether, as against an adverse claimant to the land who had interposed his claim before Irwin had bought, paid for, and received his final receipt for it, he could have maintained his right to purchase it. That was the question presented in all the cases cited by the appellant Lee Doon v. Tesh, 68 Cal. 43, 6 Pac. 97, and 8 Pac. 621; Golden Fleece, etc., Co. v. Cable Con. etc., Co., 12 Nev. 312; Anthony v. Jillson (Cal.) 23 Pac. 419; Wulff v. Manuel, Id. 723; Ross v. Poole, 4 Dec. Dep. Int, 116; Railroad Co. v. Saunders (Mont.) 6 Dec. Dep. Int 98; Railroad Co. v. Painter, Id. 485; Titamore v. Railroad Co., 10 Dec. Dep. Int. 463.
If it be conceded that an adverse claimant, whose right to purchase the land has seasonably intervened, may compel strict proof that the applicant was a citizen, or had filed his intention to become a citizen, at the inception of his claim, before he can be permitted to purchase (and that is as far as any of these authorities go), the question before us is still unanswered. Yo one claimed the land here in question before Irwin declared his intention tti become a citizen, nor before he bought and paid the purchase price for the land, nor before the commissioner undertook to forfeit the right that purchase vested in him. During all this time he was either an applicant to purchase or a purchaser of this land from the United States. Until the day that he made his purchase he was an alien. Before he paid the purchase price and obtained his patent certificate he declared Ms intention to become a citizen. The United States, with full knowledge of these facts, accepted him as a purchaser, received his money, and certified to the sale. A third party parted with its money in reliance upon this certificate. What right had the commissioner of the land office to declare a forfeiture of this title, on his own motion, 10 months later?
In Cross v. De Valle, 1 Wall. 1, 13, the supreme court said:
“That an alien may take by cleed or devise, and hold against any one but the sovereign until office found, is a familiar principle of law, which it requires no citation of authorities to establish.”
In Governeur’s Heirs v. Robertson, 11 Wheat. 332, it was held that:
“An alien may take veal property by grant, whether from the state or a private citizen, and may hold the same until his title is devested hy an inquest of office, or some equivalent proceeding.”
In Osterman v. Baldwin, 6 Wall. 116, Baldwin, who was a citizen of Yew York, had purchased and paid for three lots in the Ihen republic of Texas and transferred the certificates to a Texan to hold in trust for himself, because the constitution of Texas prohibited *198aliens from holding land there. In 1815 Texas was admitted into the Union. In a contest over the title to the lots the defendants pleaded Baldwin’s alienage and incapacity to hold. The supreme court said :
“Even if the defendants could have made this objection while the Republic of Texas existed, they cannot malee it now, because when Texas was admitted into the Union the alienage of Baldwin was determined. His present status is that of a person naturalized, and that naturalization has a retroactive effect, so as to be deemed a waiver of all liability to forfeit, and a confirmation of bis former title.”
See, also, Jackson v. Beach, 1 Johns. Cas. 399; Jackson v. Green, 7 Wend. 333; Baker v. Westcott (Tex. Sup.) 11 S. W. 157, 159; Harley v. State, 40 Ala. 689,
In Lawless v. Anderson (decided in 1877) 1 Copp, Pub. Land Laws, 532,—a case in which the claimant Lawless was an alien when he made his filing, but filed his declaration of intention to become a citizen before he made his final proof,—Assistant Secretary Chandler cited the cases of Cross v. De Valle and Osterman v. Baldwin and said :
“I am of opinion that this doctrine is applicable to the case of Mr. Lawless, and that his claim is as valid as though he had been naturalized before he made his filing.”
Prom 1877 to the present time that ruling has been uniformly followed by the secretaries of the interior in all cases in which no adverse claim intervened before the original entryman filed his declaration of his intention to become a citizen. Dougherty v. Railroad Co., 2 Copp, Pub. Land Laws, 929; Stanley v. Fairchild, 1 Copp,, Pub. Land Laws, 575; Kelly v. Quast, 2 Dec. Dep. Int. 627; Mann v. Huk, 3 Dec. Dep. Int. 452.; Ole O. Krogstad, 4 Dec. Dep. Int. 564; Railroad Co. v. Painter, 6 Dec. Dep. Int. 485; Jacob H. Edens, 7 Dec. Dep. Int. 229; Paul O. Brewster, Id. 471; Railroad Co. v. Booth, 11 Dec. Dep. Int. 89; Lyman v. Elling, 10 Dec. Dep. Int. 474; Leary v. Manuel, 12 Dec. Dep. Int. 345. In the reports of these cases will be found opinions by Secretaries Delano, Teller, Vilas, Lamar, and Noble in support of this view of the law, and no opinions of any of the secretaries to the contrary have been called to our attention. The opinions of these eminent lawyers, one of whom subsequently became one of the justices of the supreme court, are very persuasive. They are in accord with the decisions of the supreme court to which we have referred, and the case at bar falls far within the rule they establish. When Irwin bought this land that rule had been established at least four years. The only objection to his purchase was that he was not properly qualified to apply for .the land as a homestead 11 months before. At the time he made the purchase he was so qualified. No one claimed the land adversely, and there was no one to raise this objection but the United States. They had decided that they would waive that objection in every such' case, and that decision was the settled rule of the interior department, repeatedly announced by its chief officers. It was the law'of the land until it was changed bv legislative or judicial action. The register and receiver, in accordance with this law, accepted the purchaser, *199sold the huid, and received the purchase price. This was a complete waiver by the United States of all objection on account of his alienage, and vested in the purchaser a right to the patent, which it was not in the power of the commissioner to forfeit. It would be peculiarly inequitable to permit the United States to retract, through its commissioner, such a waiver, after a third party, such as the mortgage company in this case, had invested its money on the faith of it.
Our conclusion is that in the absence of any adverse claim the sale of land, under section 2301 of the Revised Statutes, to one who has declared his intention to become a citizen, is a waiver of any objection on the part of the United States that the purchaser was an alien when he made his application under section 2289, and the commissioner of the general land office cannot subsequently retract that waiver, and forfeit the right to the land on account of that objection.
Nor can the appellant maintain his title on the ground that he was a bona fide purchaser without notice of the claim of the appellee. He was one of Irwin’s witnesses when he proved up his claim to this land. The patent certificate and mortgage were on record in the office of the register of deeds in the county in which the land was situated. He took the land with both actual aud constructive notice of the material facts on which the equitable rights of the appellee rest.
The doctrine of laches has no just application to this case. It is applied, by analogy to the statute of limitations, to promote, not to defeat, justice. It was not until November 37, 3890, that the patent to this land was issued, and this suit could not have been maintained before that date. It was brought April 8, 1893. This ought not to be held to be a fatal delay, especially in view of the fact that the time limited by the statutes of North Dakota for the recovery of real property is 20 years. Comp. Laws Dak. 1887, § 4837.
But this is a suit in equity. All the evidence is before us, a,nd it is the province of this court, in such a case, to consider the rights and equities of both the parties to the controversy, and to affirm, reverse, or modify the decree below as in our opinion will best sub-serve the ends of justice. This record discloses the fact that the land in question is the homestead of the appellant, that he has occupied and cultivated it for many years, and that it is worth §3,000. The amount due to the appellee on its note and mortgage, including interest, costs, expenses of sale, and attorney’s fees, as provided in the mortgage, was $803.89, March 30, 1892. In our opinion a more equitable result than that attained by the present; decree may be reached by a decree to the effect that in case the appellant pays to the mortgage company the sum of $803.89, aud interest at 7 per cent, per annum from March 30, 3892, and the costs of the mortgage company in this court and in the court below, within three months from the rendition of such a decree, then that the title to the land’be quieted in the appellant, bat: that in case he fails to make such payments within that time the title he decreed to be held in trust for and to be conveyed to the mortgage company, substantially as in *200the decree already rendered. The decree will accordingly be reversed, with costs against the appellant, and the cause remanded, with instructions to enter a decree not inconsistent with the views expressed in this opinion. It is so ordered.