delivered the opinion of the Court:
This controversy is in fact, although not in form, one between rival claimants of the same tract of land. The relator *263claims it tmder a selection made in pursuance of the act of Congress of June 4, 1897. The parties who filed protests against it claim under locations and entry made by them in pursuance of the act of Congress of February 11, 1897 (29 Stat. 526), entitled “An act to authorize the entry and patenting of lands containing petroleum and other mineral oils under the placer mining laws of the United States,” and which provided:
“ That any person authorized to enter lands under the mining laws of the United States may enter and obtain patent to lands containing petroleum or other mineral oils, and chiefly valuable therefor, under the provisions of the laws relating to placer mineral claims. Provided, that lands containing such petroleum or other mineral oils which have heretofore been filed upon, claimed, or improved as mineral, but not yet patented, may be held and patented under the provisions of this act the same as if such filing, claim, or improvements were subsequent to the date of the passage hereof.”
The location and entry made by these latter parties are alleged to have been made on Juné 11, 1899, which antedated the relator’s selection by upward of sis months; and they claim to have sunk wells and found petroleum deposits within a short time thereafter. The action of these locators is claimed by the relator to have been fraudulent, and their assertion of right in the present case to be vague and insufficient.
But here was evidently a question for the land department of the Government to settle. We deem it wholly unnecessary for us to follow counsel in their elaborate arguments upon the merits of it, for if the nature and character of the controversy were, as we think they were, such as are remitted by law to the arbitrament and determination of the land office, the courts of this District have no authority to review the decision, or to control it, by means of the writ of mandamus, whether it was right or wrong. The writ of mandamus, it is well settled, cannot be used to serve the purpose of an appeal or writ of error; nor can it be used to *264control the exercise of judicial discretion. It has been used in recent eases to control the action of executive officers of the Government, when, having exhausted their judicial discretion, they have denied, without legal cause, the just legal rights of private persons. But in our opinion no such case is presented here.
The case which is presented is this:
In his undoubted legal right under the statute Clarke selected the lands in question, in lieu of those which he had surrendered as “ vacant land open to settlement,” having first ascertained from the register of the local land office that they were carried on his books of record as such; and he made application for a patent for them. In the view which we take of this case, it is probably of no consequence that the selector was required without warrant of law to accompany his application with an affidavit to the effect that the land was unoccupied and nonmineral in character, when tbe law required nothing of the kind from him. Whitney v. Taylor, 158 U. S. 85. It became the right, and probably it was tbe duty, of the land office to investigate the condition of the land and to ascertain whether such condition remained in fact what it purported to be on the records of the office, for these records are not conclusive either upon the relator or upon the United States. There might be matters in pais, mining claims, or other claims not necessarily matters of record, and yet which might suffice to show that the land had been taken by individuals and was no longer open to settlement. Especially did it become the right and the duty of the land office, when notice of previous entry by other parties under another and equally effective statute was given to it by the protests filed by such parties.
It is of no consequence here whether those protests were sufficient as a basis for a formal contest between the parties. They may have been vague, irregular, fraudulent, wholly without valid foundation in law, but they were presented to the office, and they tended to show that the land in question was not “ vacant land open to settlement;” for it *265could not have been open to settlement if it had already been settled on under form of law by other parties.
What was said by the Supreme Court of the United States, by Mr. Justice Field, in the case of Barden v. Northern Pacific Ry. Co., 154 U. S. 288, 326, is entirely appropriate here. There it was said:
“ The law places under the supervision of the Interior Department and its subordinate officers, acting under its direction, the control of all matters affecting the disposition of public lands of the United States, and the adjustment of private claims to them under the legislation of Congress. It can hear contestants and decide upon the respective merits of their claims. It can investigate and settle the contentions of all persons with respect to such claims. It can hear evidence upon and determine the character of lands to which different parties assert a right; and when the controversy before it is fully considered and ended, it can issue to the rightful claimant the patent provided by law, specifying that the lands are of the character for which a patent is authorized. It can thus determine whether the lands called for are swamp lands, timber lands, agricultural lands, or mineral lands, and so designate them in the patent which it issues. * * * It is the established doctrine, expressed in numerous decisions of this court, that whenever Congress has provided for the disposition of any portion of the public lands of a particular character, and authorizes the officers of the land office to issue a patent for such land upon ascertainment of certain facts, that department, has jurisdiction to inquire into and determine as to the existence of those facts, and in the absence of fraud, imposition, or mistake, its determination is conclusive against collateral attack.”
Appropriate also is what was said by the same court in the case of Steel v. Smelling Co., 106 U. S. 441, 450, where the jurisdiction of the land office is thus stated:
“ The land department, as we have repeatedly said, was established to supervise various proceedings whereby a conveyance of the title from the United States to portions of the public domain is obtained, and to see that the requirements of different acts of Congress are fully complied with. *266Necessarily, therefore, it must consider and pass upon the qualification of the applicant, the acts he has performed to secure the title, the nature of the land, and whether it is of the class which is open to sale. Its judgment upon these matters is that of a special tribunal, and is unassailable except by direct proceedings for its annulment or limitation.”
Upon these authorities, it is very clear that, if there was here a contest between different claimants of the land, the land office had jurisdiction to adjudicate and determine the contest; and that, if there was no formal contest between rival claimants, yet it was still within the jurisdiction of the land office, in view of the protests that had been filed and of the proof that was taken, to determine whether the land selected by Clarke was “ vacant land open to settlement.” If it decided the controversy erroneously, if it made a mistake in its definition of what constituted “ vacant land open to settlement,” if it attached undue value to the protests, if it failed to inform itself fully in regard to all the circumstances, yet, as the case was within its jurisdiction, such considerations cannot be inquired into or reviewed in a collateral proceeding, least of all in a proceeding for the writ of mandamus, the use of which is limited to the enforcement of a merely ministerial duty and to the protection of a plain admitted and unquestioned legal right that has been arbitrarily or without due warrant of law denied.
We express no opinion as to the merits of this case, or as to the correctness of the decision reached in it by the Secretary of the Interior. It would be improper for us to do' so in the view which we take of it. It appearing very clearly to us that, it is of the class of cases remitted to the judicial discretion of the land office and Secretary of the Interior, we do not think that it is one proper for the issue of the writ of mandamus; and we are of opinion that the court below rightly so decided.
The order appealed from will be affirmed with costs. And it is so ordered.
A petition by the appellants for a writ of error to the Supreme Court of the United States was prayed February 12, and allowed February 11, 1903.