Mr. Justice Harlan,
after making the foregoing statement, delivered the opinion of the court.
' . This case depends upon the construction to be given to § 452, Rev. Stat. If Prosseris original entry was forbidden by the above statute,-then nothing stood in the way of that entry béing canceled by order of the Secretary of the Interior in a .proceeding that directly involved its validity. On the other hand, if he acquired any right by virtue of his entry, the judgment to the contrary by the Land' Department was an error of law which could be corrected by a decree declaring that the title was held in trust for him by the defendant. The principle . is well settled that "where one party has acquired the legal ' title to property to which another has the better right, a court of equity will convert him into a trustee of the true owner and Compel him to convey the legal title." Stark v. Starrs, 6 Wall. 402, 419; Silver v. Ladd, 7 Wall. 219; Cornelius v. Kessels, 128 U. S. 456, 461; Bernier v. Bernier, 147 U. S. 242; In re Emblem, 161 U.S.52.
• The difficulty in the way of any relief being granted to the plaintiff arises from the statute prohibiting any officer, clerk or employé iii the General Land Office, directly or indirectly, from purchasing or becoming interested in the purchase of any of the public land. That a special agent of the General Land Office is an'employé in that office is, we think, too clear to admit of serious doubt.. Referring to the timber-culture statute, Secretary Smith well said: "When the object of the act -is considered, it will be seen that it applied with special force to such parties as the defendant in the cause at issue. As a special agent of the Commissioner of the General Land Office, he was in a position peculiarly adapted to secure such knowledge/the use of which it was the intention of the act to prevent. It follows from what has herein been set out that the decision of this Department of date July 7, 1893, was in error, and the same is hereby set aside, and the decision of your office is affirmed."
It is not clear from any document or decision to which our attention has been called, what is the scope of the "duties of a special agent of the Land Office, but the existence- of that office or position has long been recognized. Suffice it to say that they have official connection with the General Land Office and are under its supervision and control with respect to the administration off the public lands. Wells v. Nickles, 104 U. S. 444; S. C., 1 L. D. 608, 620, 696; Instructions to Special Timber Agents, 2 L. D. 814, 819, 820, 821, 822, 827, 828, 832; Circular of Instruction's, 12 L. D. 499. They are in every substantial sense employés in the General Land. Office. They are' none the less so, even if it be true, as suggested by the learned counsel for the plaintiff,-that they-have nothing to da with the survey and sale of the public lands or with the-investigation of applications for patents or with hearings before registers ' and receivers. Being employés iñ the General Land' Office, it is not for the court, in defiance of the explicit words of the statute, to exempt them from its prohibition. Congress'has said, without qualification, that employés in. the General Land Office shall not, while in the service .of that office, purchase or become interested in the purchase, directly or indirectly, of public lands. The provision in question had its origin in the acts of April 25, 1812, c. 68, 2 Stat. 716, and of July 4, 1836, c. 352, 5 Stat.'ld7. The first of those acts established a General Lan Office, while the last one reorganized that office. Each of those acts made provision 'for' the appointment of certain officers, and each limited the prohibition against the purchasing or becoming interested in the purchasing of public lands to the officers or employés named in them, respectively. But the prohibition in the existing statute is not restricted to any particular officers or particular employés of the Land Office, but embraces " employés in the General Land Office," without excepting any of them.
In the eye of the law his case, is not advanced by the fact that he acted in conformity with the opinion of the Commissioner of the General Land Office, who stated, in a letter, that § 452, Rev. Stat., did not apply to special agents.' That view, so far from being approved, was reversed, upon formal hearing, by the Secretary of the Interior. Besides, an erroneous interpretation of the statute by the Commissioner would not change the,-statute or confer any legal right upon Prosser in opposition "to the express prohibition against his purchasing or becoming interested in the purchasing of public lands while he was an employé in the General Land Office. The law, as we now recognize it to be, was the law when the plaintiff entered the lands in question, and, being at the time an employé in the Land Office, he could not acquire an interest in the lands that would prevent the Government, by its proper officer or department, from canceling his entry and treating the- lands as public lands which could be patented. to others. It may be well to add that the plaintiff's continuing in -possession after he ceased' to be special agent was not equivalent to a new entry. His rights must be determined by the validity of the original entry at the .time it was made.
These views dispose of the case adverse^ to the plaintiff, and require an affirmance of the judgment without reference to other questions discussed -by counsel.
Affirmed.'