OPINION OP THE COURT.
PARKER, 0. J.One Mayo E. Hickey under date of February 28, 1913, filed application for the purchase of a large tract of state land at $3 per acre, and deposited with the commissioner of public lands the sum of $2,500 to defray the expenses of appraise ment and advertising the said land for sale. Such application contained the following provision:
“I further state that the land applied for here is essentially nonmineral land, and this application is not made for the purpose of obtaining- title to mineral, coal, oil or gas lands fraudulently, but that the sole object of obtaining title to the land applied for is for grazing and agricultural purposes.”
In pursuance of said application, the commissioner of public lands advertised the said lands for sale by a notice dated March 7, 1913. On June 9, 1913, a sale at public auction of the said lands was bad by the commissioner at Alamogordo, and the said M. E. Hickey became the purchaser thereof at the total price of $142,882.26, and paid down one-tenth of the purchase price amounting to $14,288.23. On June 14, 1913, the said Hickey and the said commissioner entered into a written contract for the purchase of the said lands, which contract contains the following provision :
“That this land is being purchased for the purpose of grazing and agriculture only; that while this land herein contracted for is believed to be essentially nonmineral land, should mineral be discovered thereon, it is expressly understood and agreed that this contract is based upon the express condition that the minerals therein shall be and are reserved to the fund or institution to which the land belongs, together with the right of way to the commissioner, or any one acting under his authority, to at any and all times enter upon said land and mine and remove the minerals therefrom without let or hindrance.”
On January 1, 1918, a contract concerning the purchase of these lands was entered into by and between the commissioner and tbe appellant, tbe American Trust & Savings Bank of Albuquerque, as trustee, and as successor in interest of the said Hickey, whereby the time for payment of the purchase price was extended for an additional period of time, but the contract is otherwise in the same form as the former contract and contains the same condition in regard to reserving' the minerals from the sale.
On August 20, 1919, appellant filed a bill in the district court of Otero county to' quiet its title in and to the said lands as against the appellees, to whom the commissioner bad in the meantime made oil and gas leases covering portions of the same. The bill is filed upon the theory that the action of the commissioner in inserting the condition or reservation in the contract of the oil, gas, and mineral rights in the said lands, and his action in leasing for oil and gas the said lands to third persons, was in excess of bis authority and void, and that the said oil and gas leases constituted a cloud upon the appellant’s title, which it sought to have removed and its title quieted.. Appellees severally filed demurrers to the complaint, which were sustained by the court in most particulars, and the appellant electing not to plead further, a judgment of dismissal was entered, from which judgment the cause is here upon appeal.
1. Appellees demurred to tbe complaint upon the ground that it failed to state a cause of action, and that there was a defect of parties defendant. Tbe demur,rer was based upon the proposition that tbe state was a necessary party under tbe circumstances pleaded, and, as it had not been made a party, appellant could not maintain tbe action. Counsel for appellant in opposition to this proposition cites and relies upon Tindal v. Wesley, 167 U. S. 204, 17 Sup. Ct. 770, 42 L. Ed. 137.
In order to prevail in this case, the appellant would be required to establish two things. It must first establish that it has an equitable title in fee to tbe lands in question, and that consequently tbe oil and gas leases issued by tbe state to the appellees are invalid and void. In order to establish that it has an equitable title in fee to the lands, it must show that its contract with the state is another and a different contract than what is shown by its terms. It must show that the state, through its commissioner of public lands, has inserted conditions and reservations in the contract which it had no right to insert. It must go further and show that the oil and gas leases issued to the ap-pellees, in which the state has a direct pecuniary interest, are void and of no effect. How it can be said under such circumstances that the state is not a necessary part to a proceeding in which its rights are diricely called in question is hard for us to understand. It is true that a person having title to real estate or personal property may maintain an action against any person claiming to have rights therein under the authority of the state, and may maintain an action against such person notwithstanding the rights of the state may be indirectly involved. Of this class of cases, Tindal v. Wesley, 167 U. S. 204, 17 Sup. Ct. 770, 42 L. Ed. 137, and U. S. v. Lee, 106 U. S. 196, 1 Sup. Ct. 240, 27 L. Ed. 171, are examples. In these cases actions in ejectment were brought against persons in possession of real estate under authority of the state of South Carolina in the former case, and of the United States in the latter. In each of these cases the plaintiff showed good title to the property, and, notwithstanding the claims made by the defendant, the Supreme Court of the United States held that in the one case the action was not against the state, and in the other that it was not against the United States. Bui in the case at bar the plaintiff cannot show a good equitable title in fee to this land without setting aside and annulling an important reservation inserted by the state in its contract, thereby making the contract read materially different from what its terms import, and thereby taking from the state a valuable property right, It is true that no state officer is made a formal party to the proceeding, nor is the state as such named as a defendant, which, indeed, it could hot be. But this is of no consequence, if, in fact, the state’s rights are directly involved. Herein lies the fundamental infirmity of the proceeding. the state, before its contract can be canceled or reformed, must be before the court and in these circumstances the state bas not given its co-sent to sucb action. A good case somewhat similar to this is the case of Sanders v. Saxton, 182 N. Y. 477, 75 N. E. 529, 1 L. R. A. (N. S.) 727, 108 Am. St. Rep. 826. In that case an action was brought by the plaintiff, as owner in fee of certain lands, against the defendants, as commissioners of the land office of the state of New York, and as controller, to have certain deeds which bad been executed by the controller to the state on tax sales adjudged illegal and void. the point was made in that case, as in this, that this was a suit in effect against the state:
“Thé action is both in effect and in form to cancel and remove the deeds to the people of the state of New York as clouds upon the plaintiff’s title. The grantee in such a deed is plainly a necessary party to such an action, as it is the title of that grantee that is to be passed upon, and it cannot be adjudged void unless he is brought in court. No one would ordinarily think of disputing this proposition. The only reason for omitting to make the state a party in this case is that it cannot be made a party, and for that reason it is sought to avoid the immunity that the state possesses by making its officers parties in its stead. * * * Now, as the only object and purpose of a suit in equity to remove a cloud on the title to property is to have any adverse title that may be asserted under such cloud passed on and adjudged void so that the plaintiff in possession may be forever afterwards free from any danger of the hostile claim, it would seem plain that where the judgment in an action cannot conclude or bind a party claiming under the adverse title the action must fail.”
Attached to tbis case is an extensive note citing many of tbe cases.
We recently examined this question in State v. Field, 27 N. M. 384, 201 Pac. 1059. That was a mandamus case against tbe commissioner to compel bim to issue a deed free from tbe reservation of minerals. We he'd the proceeding could not be maintained because it was a suit against tbe state. In that case, however, we quite thoroughly discussed the principles governing tbe question as to when, and when not, a suit is against the state.
2. There is another consideration which is prohibitive of the maintenance of this action. The state is the owner of the fee of this land, and is the landlord or lessor of the appellees.
If the oil leases of appellees are to be canceled and set aside, the state will be a direct sufferer by such result. It will lose its rentals and royalties reserved in the leases. It is a matter of common knowledge that the state has received rentals under 'these same kind of oil leases running into hundreds of thousands of dollars, and is vitally and directly interested that no part of such income shall be cut off. It is likewise interested in the royalties to be received under these leases when development shall have proceeded to the point of commercial production. If its lessees are to be driven off from their leases, the state is remediless, there being no personal liability on the part of the lessees to continue to pay the rentals, or to develop the production.
There is a general rule that all persons whose interests will necessarily be affected by any decree is a given case, are necessary and indispensable parties, and the court will not proceed to a decree without them. Where such necessary parties cannot for any reason be brought before the court, there is nothing to be done except to dismiss the bill, for the suit is inherently defective. See 21 C. J., “Equity,” § 276, where all of the cases except those from New Mexico seem to be collected. See, also, Walrath v. County Commissioners, 18 N. M. 101, 134 Pac. 204; Miller v. Klasner, 19 N. M. 21, 140 Pac. 1107; Page v. Town of Gallup, 26 N. M. 239, 191 Pac. 460, where this principle is noticed and applied. Specific application of this doctrine is made to oil and gas leases in Pyle v. Henderson, 65 W. Va. 122, 46 S. E. 791; Moore v. Jennings, 47 W. Va. 181, 34 S. E. 793; Steelsmith v. Fisher Oil Co., 47 W. Va. 391, 36 S. E. 15; Vincent Oil Co. v. Gulf Refining Co., 195 Fed. 434, 115 C. C. A. 336; South Penn. Oil Co. v. Miller, 175 Fed. 729, 99 C. C. A. 305.
This being the situation, it is clear that the district court was correct in sustaining the demurrers for want of necessary parties defendant, and, the state not being subject to suit in these circumstances, there was nothing to do but to dismiss the bill.
In State v. Field, 27 N. M. 384, 201 Pac. 1059, we said:
“Whether the commissioner of public lands has power and authority to make the reservation, which he has made in this case, it is unnecessary for us to determine. If he has not the power, when the purchaser takes a deed with the reservation contained therein, there may arise a question as to the effect of the reservation in some controversy which may arise when the commissioner or some one under him begins to explore for minerals; but mandamus is not a proper remedy to try such a question in a case of this kind where the state itself is involved.”
Counsel for, appellants cite and rely upon tbis statement. In regard to the statement, we will say that it was dictum, there having been no argument upon the question, and there being on such question in that case. It will be sufficient, however, to say in this connection that appellant has not brought itself within the terms specified in the statement.
3. It is unfortunate that no decision can be made defining the power of the commissioner in these circumstances, but such is the case, and anything we might say would be dictum, and not authorized or binding. In this connection, however, it has occurred to us to suggest the query whether sections 5247-5253, Code 1915, might not afford a remedy whereby the question of the commissioner’s power may be determined. The applicability of this statute in some circumstances was recognized in Dallas v. Swigart, 24 N. M. 1, 172 Pac. 416. In that' case the question was when title to school sections passed from the federal government to the state, and when, consequently, the commissioner had power to make leases of the same. An examination of the terms of the statute discloses that the scope of the inquiry therein authorized is very broad, and would seem to cover almost any kind of an injuiry as to respective rights of claimants under contracts or leases emanating from the office of the commissioner. We make this statement merely by way of suggestion, not desiring to express any opinion thereon.
From all of the foregoing, it appears that the judgment of the district court in sustaining the demurrers and dismissing the complaint was correct, and should be affirmed; and it is so ordered.
BRATTON and BOTTS, JJ., concur.