This was an action of ejectment. The defendant demurred to the complaint on the grounds, (1) that the court had no jurisdiction of the subject of the action; (2) that the complaint did not state a cause of action. From an order overruling the demurrer, the defendant appealed.
The complaint is very voluminous, but all the facts that can be at *8all material under any view of the case may be briefly stated as follows:
July 2, 1864, congress passed what is known as the “Northern Pacific Land Grant Act,” covering what are known as the “granted limits” and the “first indemnity limits” of the road. May 31, 1870, congress, by joint resolution, provided further indemnity for losses of granted or “place” lands, by fixing the second indemnity limits. October 12, 1870, the Northern Pacific Railroad Company filed a map or plat showing the proposed general route of its railroad. The land here in controversy is an odd-numbered section, within 20 miles of this line. In November, 1871, the company definitely located its line, and caused to be accepted by the secretary of the interior, and filed in the office of the commissioner of the general land office, its map of definite location. The land in controversy is within 30 miles of said line, and hence within the company’s first indemnity limits.
In January, 1872, the commissioner of the general land office instructed the local land officers to withdraw from sale or homestead entry all lands within the granted or indemnity limits of the road, as determined by the map of definite location. In 1882 the defendant, a qualified homesteader, settled upon the land, and has ever since occupied and cultivated the same, but never filed upon or made application to enter it as a homestead until November, 1887. June 19, 1885, the company, complying in all respects with the instructions of the secretary of the interior, and under his directions, selected the land in question as indemnity land, and on the same day filed in the proper district land office a list showing its selections; but the officers of the land office wrongfully, and without authority of law, refused to approve the selection.
At the time of the definite location of the line of road, all the lands in the indemnity limits were insufficient to satisfy the losses in the place limits arising from previous appropriations and dispositions. In October, 1887, the secretary of the interior revoked the withdrawal order of January, 1872.
November 10, 1887, the defendant made application at the proper district land office to enter the land as a homestead, but his application was rejected, and thereupon he appealed to the commissioner *9of the general land office. March 9, 1889, the commissioner of the general land office affirmed the action of the district land office and thereupon the defendant appealed to the secretary of the interior. August 11, 1894, the secretary of the interior ordered a hearing before the district land office for the purpose of adducing evidence as to the condition of the land at the date of its selection by the railroad company. January 5, 1895, the district land officers rendered a decision recommending the cancellation of the selection of the company, and'the allowance of the entry of the land by the defendant as a homestead. Thereupon the company appealed. May 9, 1895, the commissioner of the general land office affirmed the decision of the district land officers. Thereupon the company appealed to the secretary of the interior. June 6, 1896, the secretary of the interior affirmed the decision of the commissioner, and ordered the cancellation of the company’s selection, and the allowance of the defendant’s entry as a homestead, which was thereupon done, and a final receiver’s certificate issued to him, reciting that he was entitled to a patent for the land. But no patent has yet been issued.
Inasmuch as the legal points involved present federal questions, of which the supreme court of the United States is the final arbiter, it would be useless for us to discuss them at length, or to do much more than state our conclusions upon such of them as are necessary to the decision of this appeal.
1. Defendant’s contention in support of his first ground of demurrer is, to use the language of his counsel, “that the question of the title of the land is still within the executive branch of the government, and has not yet reached the point where the judicial department may assume cognizance of it,”—in other words, that the matter is still in fieri, and under the control of the land department.
We are of opinion that this contention is not sound. It is, of course, familiar law that the courts—state or federal—have no right to invade the functions confided by law to other departments of the government, and interfere with the discharge of their duties in matters exclusively intrusted to their determination in the first instance, so long as these matters are still pending and undetermined. But after they have fully exercised their functions, and *10finally determined the matter, the question becomes one of private right, and in determining that right the correctness of the action of the department becomes a proper subject of judicial inquiry.
In the present case the rights of the parties have been fully and finally determined by the secretary of the interior, and nothing remains to be done, except the merely ministerial act of issuing a patent, which will be evidence of the right previously acquired, and will, when issued, relate back to the date of entry. Whichever party is entitled to the land, nothing now remains in the United States except the bare legal title. The equitable title is in either the plaintiffs or the defendant. There is now no question pending and undetermined before the land department. The mere fact that, by reason of the non-issuance of a patent, the department still has the power to reopen the case and reverse its decision, does not deprive the courts of jurisdiction to inquire into its correctness when determining a question of private right between conflicting claimants.
The action of the courts in awarding the possession of the land to one or other of them will not deprive the department of this power, or devest the United States of the legal title. There is no presumption that the land department will ever reopen the case, or reverse its decision. It may, and presumably will, never do so; and, so long as its decision stands, it is a final determination of the matter, and there is now nothing pending and undetermined before the department. Neither party can compel the secretary of the interior to issue a patent, and, if the courts have no jurisdiction until one is issued, the defendant is not likely to request its issuance. Hence, if his contention is correct, the defendant may remain quietly in possession to the end of time, and the plaintiffs will be utterly powerless to assert their claim to the land, or to test in the courts the correctness of the decision of the department.
Counsel for the defendant feel compelled to concede in their brief that the courts have in certain cases jurisdiction of the equitable title to lands while the legal title remains in the United States; but their contention is that, in a case like the present, if the department has decided erroneously as to which party is entitled to a patent the error cannot be corrected in an action at law, but is the *11basis only for equitable relief. It seems to us that by this concession counsel give away their whole case. The question here is not as to the form or nature of the judicial remedy, but whether the courts have any jurisdiction at all over the subject-matter. If the matter is still in fieri in the land department, the courts have no jurisdiction to grant any form of relief, either legal or equitable. In the federal courts, where the distinction between law and equity is still preserved, an action in ejectment could not be maintained upon an equitable title, but the rule is otherwise in this state. But on the question of jurisdiction the rule is the same in the state as in the federal courts. The only difference between the two is that, so far as the questions involved are federal ones, the final judgments of the state courts are reviewable, on a writ of error, by the supreme court of the United States. State v. Bachelder, 5 Minn. 178 (223).
The authorities upon the precise point under consideration are rather meager, inasmuch as, in most of the cases where the correctness of the decisions of the land department have been passed upon, patents had in fact been issued. Moore v. Bobbins, 96 U. S. 530, would seem to support the contention of the plaintiffs. Counsel for defendant cite Marquez v. Frisbie, 101 U. S. 473, as a decision in their favor. In that case the plaintiff himself was in possession, and the relief which he sought was that his right to the legal title, which was still in the United States, should be decreed paramount to that of the defendant, to whom the department had awarded the land; and the court seems to have viewed this as an attempt to transfer the legal title to the plaintiff, remarking that “it is impossible to transfer a title which is still in the United States.” The court also cites Moore v. Bobbins, supra, without any suggestion of disapproval.
Orchard v. Alexander, 157 U. S. 372,15 Sup. Ct. 635, and Pierce v. Frace, Id., when considered in connection with the same cases in 2 Wash. St. 81, 26 Pac. 192, 196, also seem to support the position of the plaintiffs. In those cases the question of jurisdiction had been squarely raised and passed upon in the state court. This being apparent on the face of the record, a consideration of the cases on the merits by the supreme court of the United States would seem *12to amount to an implied holding that the court had jurisdiction of the subject-matter.
2. Whether the provisions of section 6 of the act of 1864 amounted to a statutory withdrawal of indemnity land, whether the same section prohibits an executive withdrawal, and whether the indemnity lands were appropriated to the grant without any selection by the company, by .reason of the fact that there was not enough of lands in the indemnity limits to make up the losses in the place limits, are questions which it is not necessary to consider. We shall assume, without deciding, that the first and third of these questions should be answered in the negative, and the second in the affirmative; also, that this land remained subject to homestead entry until actually selected by the company for indemnity purposes.
Under the allegations of the complaint, admitted by the demurrer, this land was within the indemnity limits of the grant, and the railroad company had a right to select it for indemnity purposes,—at least, until some other right attached. While the defendant entered into the occupancy and cultivation of the land in 1882, yet he did nothing by way of compliance with the homestead law, and made no application to enter it as a homestead, until November, 1887. Mere occupation and cultivation, without compliance with the law in the matter of placing the claim on record in the land office, was insufficient to defeat the right of the railroad company, under its grant, to select the land for indemnity purposes. Northern v. Colburn, 164 U. S. 383, 17 Sup. Ct. 98.
Under the categorical allegations of the complaint, it must be taken as true that the railroad company duly, and in compliance with all the requirements of law, selected this land for indemnity, and duly filed a list of their selections in the land office in June, 1885, but that the land officers wrongfully and unlawfully refused to approve them. Although the selection of the lieu lands was to be made under the direction of the secretary of the interior, they were to be selected by the railroad company, and not by the secretary. If the company was entitled to select the land, and did so in conformity with all the requirements of law, the officers of the land department had no authority arbitrarily to refuse to recognize and ap*13prove the selection. The rights of the company under its selection became fixed and vested notwithstanding such rejection and refusal. Southern v. Wiggs, 43 Fed. 333; St. Paul v. Winona, 112 U. S. 720, 5 Sup. Ct. 334. This selection was made about two years and four months before defendant made any application to enter the land as a homestead. This disposes of the case.
We have assumed that a patent is necessary to transfer the legal title of indemnity lands from the United States to the railway company. The act of 1864 was a grant, as well as a law, and it has been repeatedly decided that in such cases a patent is not necessary to vest the railroad company with the legal title of place lands. St. Paul v. Northern, 139 U. S. 1, 11 Sup. Ct. 389; Deseret v. Tarpey, 142 U. S. 241, 12 Sup. Ct. 158; Northern v. Colburn, supra. Whether a patent is necessary to transfer the legal title of lieu lands, we are not prepared to say. We have not met with any case where the question has been passed upon.
Order affirmed.