Opinion of the court by
In this case, we are called upon to determine whether or not the trial court had jurisdiction of the subject of the action. The defendant in error insists that it had not, and for that reason this court should dismiss the appeal.
The question of jurisdiction has been frequently discussed by the different courts of the country, including the supreme court of the United States, which has been several times called to pass upon this question. Before entering upon a discussion of this matter, perhaps we had better ascertain the meaning of this word, as used by our law writers. The word is defined in Rapalje & Lawrence’s dictionary, thus:
“Jurisdiction is the power of a court or judge to entertain an action, petition or other proceedings. When a proceeding in respect to a certain matter can only be *647tried in one court, that court i's said to have exclusive jurisdiction.”
Rouvier says, that: “Jurisdiction is the authority by which judicial officers take cognizance oí, and decide cases. Power to hear and determine a cause. The right of a judge to pronounce a sentence of the law on a case or issue before him, acquired through due process of law. It includes the power to enforce the execution of what is decreed.”
Webster defines jurisdiction to be: “The legal power, right or authority of a particular court to hear and determine causes; to try criminals or to execute justice. Judicial authority over a cause or class of causes, as certain suits or actions, or the cognizance of certain crimes, are within the jurisdiction of a particular court; that i», within the limit of its authority or commission.”
In the case of The State of Rhode Island v. The State of Massachusetts, 12 Pet. 655, Justice Baldwin, speaking for the court said: “However late this objection may be, (meaning the jurisdiction of the court,) or may be made in any cause, in an inferior or appellate court of the United States, it must be considered and decided before any court can move one further step in the case, as any movement is necessarily an exercise of jurisdiction.” Then the learned justice proceeded to define its meaning thus: “Jurisdiction is the power to hear and determine the subject matter in controversy between parties to a suit; to adjudicate or exercise any judicial power over them; the question is, whether on the case before a court, their action is judicial or extra-judicial, with or without the authority of law, to render a judgment or decree upon the rights of the litigant parties. If the law confers the power to render a judgment or decree, then the court has *648jurisdiction; what shall be adjudged or decreed between the parties, and with which is the right of the case, is judicial action, bj hearing and determining it.” Citing authorities.
The American and English Encyclopaedia of Law, vol. 12, bottom page, 244:
“Jurisdiction is authority by which judicial officers take cognizance of and decide causes; or, as it has been most frequently defined, the power to hear and determine a cause. The definition thus limited, implies that if a court having the power to hear and determine a cause, enters a judgment therein, the validity of such judgment is not affected by the power of the court to enter the judgment in question. To escape this difficulty, there is a tendency in the latest decisions in the United States, to hold that jurisdiction is not only the power to hear and determine, but also the power to render the particular judgment entered in the particular case.”
The supreme Court of Massachusetts, in the case of Hopkins v. the Commonwealth, 3 Met. 462, says: “The word jurisdiction is a term of large and comprehensive import, and embraces every kind of judicial action upon the subject matter, from the finding of the indictment to pronouncing sentence.” Jones v. Brown, 54 Iowa, 74-79: “Jurisdiction is defined to be the authority of law to act officially in the matter then in hand.” Mills v. Commonwealth, 13 Penn. State, 627-630: “Jurisdiction in courts is the power and authority to declare the law.”
The subject of the action in the present case is the equitable title to the land in controversy. The plaintiff commenced his action in the district court, alleging a certain state of facts, and praying for certain relief. Now, if the district court did not have juristdiction of the cause of action, what court had? Or were ¿here no courts to *649wbicb be could apply for relief? Tbe court had juris>-diction of the parties because summons was duly issued aud served; and the district court alone can try this class of cases. The suit involves the question of chancery jurisdiction, and the Organic Act of this Territory has vested that power in the supreme court and in the district courts. An examination of the authorities will show, beyond any question, that the district courts have jurisdiction in all actions to declare a resulting trust, when land has been by fraud or mistake of law, deeded by the officers of the government to one not entitled thereto; provided, the plaintiff in addition to showing such fraud or mistake as to the law governing such case, also .pleads and proves such facts as will show that he has some interest in the land which, if the law had been properly applied, would have given it to him.
The case of Moore v. Robbins, 96 U. S. 503, is squarely in point, and supports the rule just stated. Justice Miller, speaking for the court said:
“That the decision of the officers of the land department, made within the scope of their authority on questions of this kind, is, in general, conclusive everywhere, except when reconsidered by way of appeal within that department; and that as to the facts on which their decision is based, in the absence of fraud and mistake, that decision is conclusive, even in courts of justice, when the title afterwards comes in question. But that in this class of cases, as in all others, there exists in the courts of equity, the jurisdiction to correct mistakes, to relieve against frauds and impositions, and in cases, where it is clear that those officers have, by a mistake of the law, given to one man the land which, on the undisputed facts belonged to another, to give appropriate relief.”
This same doctrine was reiterated in the case of St. Louis Smelting and Refining Company v. Thomas Kemp et *650 al., 104 U. S. 636, and in Quinby v. Conlan, 104 U. S. 420.
The question of jurisdiction can be raised by demurrer, under our statute. Section 89 of Procedure Civil of the 1893 Statutes provides:
“The defen dant may demur to the petition only when it appears on its face, either: First, that the court has no jurisdiction of the person of the defendant, or the subject of the action.”
The expression, “subject of the action,” as used in the Statutes, is synonymous with, “subject-matter.”
Bouvier defines “subject-matter” to be, “the cause; the object; the thing in dispute. It is a fatal abjection ta the jurisdiction of the court when it has not cognizance of the subject-matter of the action, as, if a cause exclusively of chancery jurisdiction, were brought in a court of common law, or a criminal proceeding in a court having jurisdiction in civil cases only.”
The definition given by Bouvier, ought to settle the question of jurisdiction in this case, and would, were it not for the fact that we are confronted with a decision of our own court, in which the question of jurisdiction is discussed and determined. Defendants in error cite this decision, viz: Meyers v. Berry, 3 Okla. 612, in support of their demurrers to the jurisdiction of the court in this case.
The case of Meyers v. Berry, supra, was an action commenced in the district court of Payne county, by one Wesley Meyers against William E. Berry, to charge Berry as trustee of certain town lots in the town of Stillwater. A trial was had between the parties before the townsite board, and a townsite deed issued to Berry. Meyers then brought his suit to declare a resulting trust. In the su*651preme court, the defendant raised the question of jurisdiction; and the court in defining jurisdiction, said:
“Jurisdiction is the power to hear and determine the subject matter in controversy between parties to the suit, to adjudicate or exercise any judicial power over them, and when this power is absent, the court is without jurisdiction. When it is apparent from the complaint that the court has no power to determine the matter complained of in the petition, or where the petition fails to state such a case as will give the court jurisdiction, then .he objection may be made at any time, and whenever the matter is brought to the attention of the court, in any manner, it should refuse to proceed further and dismiss the proceeding.”
The court then discussed the petition, a copy of which is included in the opinion, and observed that the petition contained no allegation of fraud on the part of the town-site board; that the findings of those officers on questions of fact, where there in a conflict, is conclusive, and that in order to present the question as to- whether or not the trustees misapplied the law, it would be necesary to accompany the petition with the findings of fact upon which they made their ruling, in order that the court might determine, as a matter of law, -whether their application of the law was correct. And finally in conclusion said:
“The court has no power or authority to review the facts or weigh the evidence taken before the board, in order to determine whether they -arrived at proper conclusions of fact.
“The petition is drawn-upon the theory that the court has original jurisdiction to try and determine the same questions of fact that were passed upon by the to-wnsite trustees-. This is an erroneous theory.
“The complaint does not state such a case as will author*652ize a court of equity to hear and determine any question thereby presented, and does not confer jurisdiction on such a court to interfere with the findings of the officers whose duties it was to determine the rights of the parties. Hence, the district court was without jurisdiction to hear and determine the mattérs complained of, and was without authority to pass upon the questions of fact presented by the complaint, and it was error to render any judgment thereon.”
This case, from a casual reading, would seem to support the contention of defendant; but we hardly think that the court intended to lay down the rule that the district courts have no jurisdiction in that class of cases. The petition in that case did not state facts sufficient to constitute a cause of action, and the court could not render the kind of a judgment prayed for, because the facts pleaded would not support it. It is also quite probable that the justice who wrote the opinion in that case, had in mind the rule laid down by the supreme court of the United States, relative to jurisdiction, but failed to distinguish between the cases in which the rule was announced in that court and the case then under consideration.
Justice Field, speaking for the supreme court of the United States, said:
“The doctrine that when a court has once acquired jurisdiction, it has the right to decide every question which arises in the cause, and its judgment, however erroneous, cannot be collaterally assailed, is undoubtedly correct as a general proposition; but, like all general proposi-ti ons, is subject to many qualifications in its application. * * The doctrine is only correct when the court proceeds after acquiring jurisdiction of the cause according to the established mode governing the class to which the case belongs, and does not transcend, in the extent, *653or character oí -its judgment, the law which 'is applicable to it.” (See Amer. S Eng. Enc. of Law vol 12, p. 248.)
This is as far as the rule laid down in the case of Meyers v. Berry, supra, can be extended. The court had jurisdiction of the subject matter, or of the subject of the action, but it did not have jurisdiction on the facts pleaded to declare Berry to be a trustee for the benefit of Meyers; and had the court rendered such a judgment, it would have exceeded its jurisdiction, under the rule laid down by Justice Field, but not because it had no jurisdiction of the subject of the action. It would have been because the court, under the facts pleaded, had no power to render that kind of a judgment. If a court has jurisdiction of the persons to the action, and the cause is the kind of a cause triable in such court, it has jurisdiction of the subject of the action, and has power to render any rightful judgment therein.
The case of Hunt v. Hunt, 72 N. Y. p. 217, is squarely in point. Folger, J., speaking for the court, said, speaking of jurisdiction:
“Power given by law to a court, to adjudge divorces from the ties of matrimony, does give jurisdiction of the subject matter of divorce. Though the proceedings before that court, from first to last o*f the testimony, in an application for divorce, should show that a state of facts does not exist which makes a legal cause for divorce, yet it cannot be said that the court has not jurisdiction of the subject matter; that it has not power to entertain the proceedings, to hear the proofs and allegations, and to determine upon their sufficiency and legal effect. Then, jurisdiction of the subject matter does not depend upon the ultimate existence of a good cause of action in the plaintiff, in the particular case. * * Jurisdiction of the subject matter, is power to adjudge concerning the general question involved, and is not dependent upon the *654state of facts which may appear in a particular case, arising, or which is claimed to have arisen, under that general question. * * So that there is a more general meaning to the phrase, ‘subject-matter,’ in this connection, than power to act upon a particular state of facts. It is the power to act upon the general, and so to speak, the abstract question, and to determine and adjudge whether the particular facts presented call for the exercise of the abstract power. A suiter for a judgment of divorce may come into any court of the state in which he is domiciled, which is empowered to entertain a suit therefor, and to give judgment between husband and wife, of a dissolution of their marriage state. If he does not establish a cause for divorce, jurisdiction to pronounce judgment does not leave the court. It has power to give judgment that he has not made out a case. That judgment would be so valid and effectual as to bind him thereafter, and to be res adjudieata as to him, in another like attempt by him. If that court, however, should err, and give' judgment that he had made out his case, jurisdiction remains in it so to do. The error is to be corrected in that very action. It may not be shown collaterally to avoid the judgment, while it stands unreversed, whether the judgment be availed of in the state of its rendition, or in a sister state; granted always that there has been jurisdiction of the parties to it * * The plaintiff, however, makes the point against the validity of the judgment, that it was void- in Louisiana, as wholly unauthorized by, and in conflict with, the constitution of the state. And here it is, that it is of import to know what is meant by the term, ‘jurisdiction of the subject-matter.’ If it means no more than power to1 act when, and not till when, a state of facts is proven which exactly squares with the grounds for divorce prescribed and established by consti-titional and valid statutes, then we must inquire what the constitution of the state permits in the way Ox a statutory regulation, and whether the proofs in any case show that the court which in that case adjudged a divorce, had *655sufficient evidence before it to enable it to give judgment. In effect, we must review the judgment upon the law and the facts. If the term means what we have above pointed out that it does mean, then we are to give credit to the judgment of a court which, having power to act upon the general subject of divorce, has heard the cause and has proceeded to judgment.”
When'a petition does not state facts sufficient to constitute a cause of action, the plaintiff can amend under such terms as may be imposed by the trial court; but if the court has no jurisdiction of the subject, as in the case at bar, to declare a resulting trust, it has no power to grant such leave, and any order made by the court, except an order dismissing the suit and for costs against plaintiff, would be absolutely void. The judgment, where the court has no jurisdiction of the subject of the action, would be that the defendant go hence without day, and he could not be brought back for trial in that suit, by an amendment of the petition. It will be ready seen that if the court has no jurisdiction of the subject, simply because the petition does not state facts sufficient to constitute a cause of action, all such suits would have to be dismissed. This cannot be done. Our statute says such plaintiffs shall have the right to plead over, on such terms as may be imposed by the court.
The subject of this suit was such a cause as could be heard and decided by the district court, and the fact th$t the right may be with the defendants, and that the facts pleaded will not compel, even if proven, the judgment prayed for, does not go to the jurisdiction of the court over the subject of the action, but to the kind of a judgment that should be rendered. The court in the case at bar had jurisdiction over the subject of the action, and *656we so hold. The rule, as stated in the case of Meyers v. Berry, supra, relative to the question of jurisdiction, is hereby modified to conform herewith.
II. The only other point that it is necessary for us to consider is, Does the petition in this case state facts sufficient to constitute a cause of action? In determining this question, it becomes necessary to decide another question, viz: does one by offering to file a contest against a homestead or townsite entry, acquire any interest in the land? and, if so, is it such an interest that equity will protect by decreeing a resulting trust, after the patent has issued to the entryman against whom the contest was offered?
In deciding these question, it perhaps would be well for us to take into consideration the powers and duties of the honorable secretary of the interior, and of the subordinate officers of the interior department, relative to the primary disposition of the public land, under the provisions of the homestead laws of the United States.
The homestead laws were passed for the purpose of enabling persons, who were homeless, and unable to buy lands in the older states, to acquire homes for themselves and families, and for the further purpose of inducing people to settle in the then new and sparsely settled states of the west. The law gave to all persons over twenty-one years of age, and to all heads of families, the right to enter, not to exceed one hundred and sixty acres of land; provided, however, that such persons were native born, or naturalized citizens, or had declared their intentions to become citizens of the United States.
Recognizing the fact that it could not foresee all of the contingencies and difficulties that would necessarily arise in putting these laws into force, congress gave to *657the interior department power to adopt rules and regulations governing the proceedings in public land matters. These rules, when within the scope of the power granted by congress, have the same force and effect as laws,regularly passed and put into operation. They have the same force and effect as rules and regulations adopted by a court of law or' equity. The honorable secretary of the interior has several times held, and correctly, too, that these rules have such effect. It must not be forgotten, though, that the right to contest an entry, is a rght that is given by congress; yet, this right must be exercised under such rules and regulations as are prescribed therefor.
When a party files a homestead entry on a piece of government land, he, by such act, impliedly agrees to fulfill the laws regarding residence, improvement and cultivation. Should he violate their provisions by failing to comply with their demands in those respects, he is subject to contest; and one who files a contest against an entryman, stands in the same position as one who informs the state of the violation of one of its penal laws. The government, under the present law, gives to one who secures the cancellation of a homestead entry by contest, a preference right for a certain number of days to enter the land embraced therein. This preference right of entry is in the nature of a reward, for informing the government of the violation of the law. By the laws of- several of the states, persons are allowed a certain per cent, of the fines which may be collected from persons on conviction for the commission of certain offenses. Could it be said that such informant has any special right in law to have the prosecuting officer prosecute such a case, if, in his judgment, the evidence was insufficient to secure a *658conviction? Certainly not. Would, it not also be true that the land department has the right to deny any contest when in the judgment of its officers the allegations contained therein are insufficient?
Originally, a contestar t who secured the cancellation of an entry, had no more right to the land than anyone else. Later, he was given tne preference right of entry for a certain number of days, but this right was a personal right. Finally, congress passed -a law which made a contestant’s right the subject of inheritance by the contestant’s heirs; but conceding that to be the law at the present time, the contestant’s interest is a contingent one which may be defeated In the case at bar, the appellant has not a single equity in his favor. He was not a settler upon the land. He had made no improvements thereon. He never offered any filing of any kind in the land office until the appellee, Lynch, had submitted his final proof and changed his homestead entry to a townsite entry, and paid 'his money for the land. If an application to contest an entry and the tender of the land office fees gives one a vested right in the land embraced in the entry, we can look forward to crowded court dockets and to almost endless litigation over land titles in Oklahoma; and before a court should lay down such a rule, the law ought to be clear and specific.
The acts of congress relative to contests of entries, pre-emption, homestead, timber culture, townsite, etc., are numerous, and as it would take considerable space to quote them, we will content ourselves by commenting upon them generally.
It is well established that contests are authorized for any violation of the law as to residence, improvements, *659or disqualification to make the entry in the first instance. And here is a case where the department refused to entertain the contest offered, the ground being disqualification to enter the land. The facts on which Parker relies for a cancellation of the entry, were fully set out in affidavits filed in the department. Even Lynch, and his alleged agent, Pryor, filed affidavits in which they state the manner in which Lynch’s application was filed. These affidavits, as well as the affidavits filed by Parker, were all considered by the department, and involved the question as to whether or not Lynch was disqualified. The land department, on the showing made by both parties, found and held that Lynch was a qualified entry-man. That being true, should this court disturb such findings? Not unless the ruling of the department was clearly erroneous when applied to the facts in the case, or unless fraud was- practiced by the prevailing party or by the officers of the department.
How far the court ought to follow the rulings of the interior department, as to the qualifications of entry-men, who have been in the country prior to the opening of lands to settlement, during the prohibited period, and who have been permitted to make entry of land, is a question not easily answered; and while that issue is presented in this case, it is not necessary to discuss it because it should be decided on other grounds. The real question is, what right has Parker in this land? In order to win, he must have a better equity than Lynch. He must have had an interest in the land that would have ripened into a title if the law had been properly administered. It is not sufficient for him to allege that Lynch was disqualified. If the government has given a patent to one who is a “sooner,” it alone can bring a suit to can*660cel the same. One who has no interest in the land cannol complain, because he could not be injured by the action of the government in issuing a patent for the land to another.
In the case of Bohall v. Dalla, 114, U. S. 47, Mr. Justice Field, speaking for the court, said:
“We do not think the claim of the defendant to the equitable relief he seeks, can be sustained on the ground stated in his answer or cross-complaint. To charge the holder of the legal title to the land under a patent of the United States, as a trustee of another, and to compel him to transfer the title,* the claimant must present such a case as will show that he himself was entitled to the patent from the government, and that in consequence of erroneous rulings of the officers of the land department, upon the law applicable to the facts found, it was refused to him. It is not sufficient to show that there may have been error in adjudging the title to the patentee. It must appear that by the law properly administered, the title should have been awarded to the claimant. * * It is therefore immaterial for the decision of this case what our judgment may be upon the conclusions of those officers as to the possession of the patentee.”
In the case of Sparks v. Pierce, 115, U. S. 408, the court said
“Mere occupancy of public lands and improvements thereon give no vested right therein ;as against the United States, and consequently, not against any purchaser from them. To entitle a party to relief against a patent of the government, he must show a better right to the land than the patentee, such as in law should have been respected by the officers of the land department, and being respected, would have given him the patent. It is not sufficient to show that the patentee ought not to have received the patent. It must affirmatively appear that the claimant was entitled to it, and that, in consequence of erroneous rulings of those officers on the facts existing, it was denied to him.”
*661Attention is also called to the case of Lee v. Johnson, 116, U. S. 49:
“The court does not interfere with the title of a pat-entee when the alleged mistake relates to a matter of facts concerning which those officers may have drawn wrong conclusions from the testimony. A judicial inquiry as to the correctness of such conclusions would encroach upon a jurisdiction which congress has de- > olved exclusively upon the department. It is only when fraud and imposition have prevented the unsuccessful party in a contest from fully presenting his case, or the officers from fully considering it, that a court will look into the evidence. It is not enough, however, that fraud and imposition have been practiced upon the department, or that false testimony or fraudulent documents have been presented; it must appear that they affected its determination, which, otherwise, would have been in favor of the plaintiff. He must in all cases show that but for the error or fraud, or imposition of which he complains, he would be entitled to the patent; it is not enough to show that it should not have been issued to the patentee. It is for the party whose rights are alleged to have been disregarded that relief is sought, not for the government, which can file its own bill when it desires the cancellation of a patent unadvisedly or wrongfully issued.”
In the case of Quinby v. Conlan, supra, it is said:
“And we may also add in this connection, that the misconstruction of the law by the officers of the department, which will authorize the interference of the court, must be clearly manifest, and not alleged upon a possible finding of the facts from the evidence different from that reached by them. And where fraud and misrepresentation are relied upon as grounds of interferance by the courts, they should be with such fullness any particularity as to show that they must necessarily have affected the action of the officers of the department. *662Mere general allegations of fraud and misrepresentation, will not suffice.”
One other case decided by the supreme court of the United States should be here mentioned. It is The St. Louis Smelting, etc., Co. v. Kemp, 104, U. S. 636. The court said:
“If in issuing a patent, its officers, (referring to the officers of - the interior department,) took mistaken views of the law, or drew erroneous conclusion from the evidence, or acted from imperfect views of their duty, or even from corrupt motives, a court of law can afford no remedy to a party alleging that he is thereby aggrieved. He must resort to a court of equity for relief, and even there his complaint cannot be heard unless he connect himself with the original source of title, so as to be able to aver that his rights are injuriously affected by the existence of the patent; and he must possess such equities as will control the legal title in the patentee’s hands. * * It does not lie in the mouth of a stranger to the title to complain of the acts of the government with respect to it. If the government is dissatisfied, it can, on its own account, authorize proceedings to vacate the patent or limit its operation.”
Under these decisions, if Parker had no interest in the land, he cannot maintain this suit. The only thing that Parker ever did, was to file a protest against Lynch’s final proof, and ask that he be allowed to contest the entry of Lynch, after Lynch had made final proof, and paid his money to the government for the land. This is not sufficient to authorize the court to declare Lynch a trustee for his benefit. The offering to file a contest against an entry gives a party no interest in the land. It gives him no vested right in any sense of the word. If the land department entertains a contest, and files it, the party filing the same has a right to have it heard, but he has no right in the land itself. He does not have *663to be a qualified entryman to initiate or prosecute a contest. He does not acquire any interest in tbe land, under any fair construction of tlie law, until after tbe homé-stead entry against which bis contest was directed, bad been cancelled as a result of bis contest. Tbe fact that congress passed a law authorizing tbe heirs of a contestant to prosecute a pending contest to final determination, and to enter tbe land in tbe event of a successful result of the same, did not give to a contestant or to bis heirs any interest in tbe land to- any greater extent than they bad prior to the passage of such act. This act was passed to carry out as fully as possible tbe spirit of tbe law that was then in force, but gave no greater rights,except such as were expressed in the law. Under the law, as it then existed, a contestant had to pay all tbe expenses of tbe contest, except in cases of prior settlement, in which tbe parties each paid bis own cost. Hundreds of contests were pending in tbe different lard offices of tbe United States. In many cases tbe contestant bad expended large sums of money in prosecuting tbe same. In the event of tbe contestant’s death, bis heirs got no benefit of the money thus expended, and if tbe entry was cancelled, tbe party first applying could enter tbe land. Congress recognized this fact, and passed tbe law just referred to; so that a contestant’s heirs could reap the fruits of bis contest; but tbe heirs were given no greater right than tbe contestant bad. If tbe heirs of a contestant fail to prosecute tbe contest to final determination, secure a cancellation of the entry and enter tbe land, their rights cease; and as to whether or not they do this is optional with them.
In the case of Savage v. Worshan, 72 Fed. Rep. 601, (Circuit Court, southern district, California,) tbe court said:
*664“Complainant derives his warrant for thus attacking defendant’s title from a preference right of entry claimed by him under section 2, of the act of May 14, 1880. * * This section reads as follows: ‘In all cases where any person has contested, paid the land office fees, and procured the cancellation of any pre-emption, homestead or timber culture entry, he shall be notified by the register of the land office of the district in which such land is situated, of such cancellation, and shall be allowed thirty days from the date of such notice, to enter said lands, provided, that said register shall be entitled to a fee of one dollar for the giving of such notice to be paid by the contestant, and not to be reported.’ The rule is well settled that the court will not interefere with the title of the patentee of the United States, unless the adverse claimant shows that, but for the error or fraud, or imposition of which he complains, he would be entitled to the patent. It is not enough to show that the patent should not have been issued to the patentee. * * Assuming, without deciding, however, that a preference light of entry under the aforesaid act of 1880, is such an entry as will authorize an attack upon a patent obtained adversely thereto through fraud or mistake, the question arises, does the bill show that complainant has, or ever had, the preference right of entry which he claims? To the acquisition by him of this right, three things are necessary: First, he must have been a contestant of the defendant’s homestead entry; second, he must hav’e paid the land office fees; and, third, he must have procured the cancellation of said entry. The bill fails to- show either the first or third of these pre-requisites. With reference to the first, it is to be observed that the secretary of the interior, on September IT, 1889, expressly held that the complainant was not a contestant, while, so far as concerns the third, the whole bill is framed on the theory and directly avers that the defendant’s homestead entry was never cancelled, but on the contrary, ripened into a patent.”
*665Lynch’s entry was never cancelled as a result of a contest filed by Parker, therefore, Parker could not claim any preference right of entry. Without deciding what the rights of a party, who lias secured the cancellation of an entry, are, we hold that the fact that one offers to contest an entry, even though his grounds were valid and the contest should have been entertained and the hearing granted, yet, if the department rejected his contest, he, by the offering of such contest, acquired no interest whatever in the land, and he cannot maintain an action to declare the patentee, who was the entryman at the time of the offering of his contest, a trustee for his use and benefit.
It is shown by the record and briefs in this case that on the very day that the plaintiff filed his protest against the final proof of Lynch, and asked to contest Lynch’s entry, there were improvements of the value of over $35,000 on the tract in controversy, and that the improvements thereon at the present time are worth five times that amount, and that a large number of persons' were then occupying the tract for trade and business. These facts were know to the department, and it had a legal right, even if Lynch were disqualified, to refuse a homestead application for the land and reserve it for townsite purposes.
The plaintiff comes into this court without a single equity in his favor; without any interest in the land and without any standing that entitles him to relief. The petition did not state facts sufficient to constitute a cause of action, therefore the defendant’s demurrers wor" properly sustained.
There are other phases of this question which might *666be discussed, but we deem it unnecessary, as the points heretofore considered and decided control the judgment that must be rendered.
For the reasons herein stated, the judgment of the lower court is hereby affirmed at the costs of the appellant.
McAtee, J., not sitting; all of the other Justices concurring.