
    COREY, Appellant, v. SUNBURST OIL & GAS CO., Respondent.
    (No. 5,589.)
    (Submitted January 7, 1925.
    Decided February 18, 1925.)
    [233 Pac. 909.]
    
      Quieting Title — Oil and Gas Leases — Homesteads—Execution af Lease Before Patent — Validity—Want of Equity on Face of Record — Dismissal of Appeal — Pleading cmd Practice.
    
    Motion for Judgment on Pleadings — Denial—Appeal Does not Lie.
    1. Under section 9165, Revised Codes of 1921, an appeal does not lie from an order denying a motion for judgment on the pleadings.
    Same — In Effect Demurrer to Answer.
    2. Plaintiff’s motion for judgment on the pleadings is in effect a demurrer to the answer.
    Same — Denial—Entry of Judgment of Dismissal at Request of Appellant— Right of Appeal.
    3. Where plaintiff, after his motion for judgment on the pleadings had been denied, asked the court to enter sueh a judgment as would allow of an appeal, and judgment of dismissal follows, the plaintiff himself causing its entry, his action in doing so was not sueh a consent to the judgment as to debar him of the right of appeal.
    Quieting Title — Oil and Gas Lease — -Want of Equity Appearing on Face of Record — Dismissal of Appeal.
    4. Plaintiff, a homesteader, executed an oil and gas lease to defendant’s predecessor before final proof. After patent was issued to him he brought suit to quiet title to the land, claiming that the lease was void. Suit was not brought until after large sums of money had' been expended in exploring the land and oil in paying quantities found. After judgment of dismissal and argument on appeal, defendant moved dismissal of the appeal on the ground that plaintiff had in the interim recognized the lease by demanding in writing payment of royalties due under the lease and advising defendant that he looked to it for compensation. Held, under the doctrine that one who comes into a court of equity must come with dean hands, that the plaintiff does not so come to the supreme court and that the appeal must be dismissed on the ground of want of equity appearing on the face of the record.
    
      Appeal from District Court, Toole County, in the Nineteenth Judicial District; Wm. E. Carroll, a Judge of the Second-District, presiding.
    
    (Suit by Byron- A. Corey against the Sunburst Oil & Gas Company. From judgment of dismissal plaintiff appeals.
    Appeal dismissed.
    
      Mr. Louis P. Donovan, for Appellant, submitted an original and a reply brief, and argued the cause orally.
    The lease in question is void because it is in contravention of the policy of Congress in disposing of the public land. It has been uniformly held that any conveyance of the homestead land or interest therein or contract to convey the same, or any part thereof, or interest therein, made before the right to patent became fully earned and perfected, contravened the public policy of the government and was absolutely null and void. (Anderson v. Carkins, 135 IT. S. 483, 34 L. Ed. 272, 10 Sup. Ct. Rep. 905; Bailey v. Sanders, 228 IT. S. 603, 57 L. Ed. 985, 33 Sup. Ct. Rep. 602; Hartmm v. Butterfield Dumber Co., 199 U. S. 335, 337, 50 L. Ed. 217, 26 Sup. Ct. Rep. 63 [see, also, Rose’s U. S. Notes]; K. C. Lumber Co. v. Moores (1914), 212 Fed. 153, 129 C. C. A. 1; Moffatt v. Bulson, 96 Cal. 106, 31 Am. St. Rep. 192, 30 Pac. 1022; Moore v. Moore, 130 Cal. 110, 80 Am. St. Rep. 78, 62 Pac. 294; Harris v. McCrary, 17 Idaho, 300, 105 Pac. 558; Mellison v. Allen, 30 Kan. 382, 2 Pac. 97; Weeks v. White, 41 Kan. 569, 21 Pae. 600; Carley v. Gitchell, 105 Mich. 38, 55 Am. St. Rep. 428, 62 N. W. 1003; Horseman v. Horseman, 43 Or. 83, 72 Pae. 698; Jackson v. Baker, 48 Or. 155, 85 Pac. 512.)
    The precise question involved in this case — the validity of an oil and gas lease given by 'the homestead entryman before final proof — has not been decided by the courts so far as the writer has found. It is clear, however, that an oil and gas lease is within the inhibition of the statute unless the court finds that it is neither an “alienation” of any part of the land, nor an “agreement or contract i:= ° * by which the title he or she might acquire from the government of the United States should inure in whole or in part to the benefit of any person except himself or herself.”
    "While the precise question here involved has not been decided, the following cases are closely analogous: E. C. Lumber Co. v. Moores, 212 Fed. 153, 129 C. C. A. 1; Millikin v. Carmichael <& Flint, 134 Ala. 623, 92 Am. St. Rep. 45, 33 South. 9; Nichols v. Council, 51 Ark. 26, 14 Am. St. Rep. 20, at 21, 9 S. W. 305; Weeks v. White, 41 Kan. 569, 21 Pac. 600; The Yosemite Valley Case, 15 Wall. (U. S.) 77, 21 L. Ed. 82; Shiver v. United States, 159 U. S. 491, 40 L. Ed. 231, 16 Sup. Ct„ Rep. 54 [see, also, Rose’s U. S. Notes].
    Appellant admits that the lease here under consideration is an “alienation of a part of the land.” It is for a term of twenty years and an indefinite period thereafter, and contemplates the removal of the oil, gas and other minerals from the land. According to some of the authorities it conveys an incorporeal hereditament. (Rich v. Doneghey, 71 Okl. 204, 177 Pac. 86.) According to others it vests the lessee with a corporeal interest and estate in the land. (Chandler v. Hart, 161 Cal. 405, Ann. Cas. 1913B, 1094, 119 Pac. 516; Smith v. United Crude Oil Co., 179 Cal. 570, 178 Pac. 141.) In Illinois it is held to vest a freehold interest. (Bruner v. Hicks, 230 111. 536, 120 Am. St. Rep. 332, 82 N. E. 888; Daughetee v. Ohio Oil Co., 263 111.. 518, 105 N. E. 308; Smith v. Guffey, 237 U. S. 101, 59 L. Ed. 856, 35 Sup. Ct. Rep. 526 [see, also, Rose’s U. S. Notes].) In recent Texas cases, the supreme court of that state has held that the oil and gas lease passed to the lessee a determinable fee title in the oil and gas. (Stephens County v. Mid-Kansas Oil & Gas Co., 113 Tex. 160, 29 A. L. R. 566, 254 S. W. 290.) For general discussion see the Law of Oil and Gas, Chapter 3, by J. A. Yeasey, published in the Michigan Law Review, 1921, 1922.
    In the following eases, it is held directly that the execution of an oil and gas lease is an “alienation of a part of the land:” (Eldred v. Okmulgee Loan & Trust Co., 22 Okl. 742, 98 Pac. 929; Parker v. Riley, 243 Fed. 42, 155 C. C. A. 572; Pluto Oil {& Gas Co. v. Miller (Okl.), 219 Pac. 303; see, also, United States v. Nolle, 237 U. S. 74, 59 L. Ed. 844, 3'5 Sup. Ct. Rep. 532 [see, also, Rose’s U. S. Notes].)
    A lease was held an “alienation” within the prohibition against alienating a homestead without the consent of the wife. (Coughlin v. Coughlin, 26 Kan. 116, 119; Mailhot v. Turner, 157 Mich. 167, 133 Am. ,St. Rep. 333, 121 N. W. 804.) Under the statutes of this state a lease for a term of years is a chattel real and an estate in real property.' (Secs. 6723, 6727, Rev. Codes 1921; Wheeler v. McIntyre, 55 Mont. 295, 175 Pac. 892; see, also, Thornton’s Law of Oil and Gas, 3d ed., secs. 53, 54.) Mineral leases differ from agricultural leases in that the removal of minerals constitute a diminution of the estate. (State v. Snyder, 29 Wyo. 163, 212 Pac. 758.)
    The lease being void at the date of execution it will not be upheld on the theory of relation, i. e., that the title of a homesteader relates back to the date of application for entry. “This doctrine of relation is a fiction intended to subserve the ends of justice in protecting the rights of the claimant of property; it cannot be invoked to defeat rights, or create a liability.” (Northern Pac. Ry. Co. v. Smith, 62 Mont. 108, 203 Pac. 503; Tyler v. Tyler, 50 Mont. 65, 144 Pae. 1090.) The doctrine cannot be applied to enforce an illegal contract or circumvent the public policy as contained in the Act of Congress. (K. C. Lumber Co. v. Moores, supra; Casto v. Murray, 47 Or. 57, 81 Pac. 388, 883.)
    It is generally held that a party can never recover where he must show an illegal contract, as the basis of his claim. (13 C. J. 492; Dallas v. Douglas, 45 Mont. 114, 122 Pac. 275; Murray v. White, 42 Mont. 423, Ann. Cas. 1912A, 1297, 113 Pac. 754; Glass v. Basin etc. Min. Co., 31 Mont. 21, 77 Pac. 302.) In the present case, the defendant has set up as the basis of its claim of title an illegal contract. The defendant, therefore, falls within the rule above stated, and cannot be allowed any relief.
    
      Messrs. Norris, Hurd & Rhoades and Messrs. Mclntire & Murphy, for Respondent, submitted a brief; Mr. George E. Hurd argued the cause orally.
    The lease is not void as an alienation under homestead law. Alienation within the meaning of that Act involves the complete transfer of the property and possession of the land, tenements or other thing to another. (Stark v. Du/oall, 7 Old. 2-13, 54 Pac. 453; Boyd v. Cudderbach, 31 111. 113.) Every conveyance of an interest in a homestead prior to the patent thereof is not prohibited. Thus it has long been the law in this state, as well as generally, that a mortgage is not such an alienation of an interest in the homestead entry as is prohibited by the statutes above quoted. (Norris v. Heald, 12 Mont. 282, 33 Am. St. Rep. 581, 29 Pac. 1121; 32 Cyc. 1075, 1076, and cases cited.) So also a lease of lands composing a homestead entry is not within the prohibition of the statute. (Herman <& Leith v. Miller, 69 Neb. 764, 96 N. W. 661; Orrell v. Bay Mfg. Co., 83 Miss. 800, 70 L. R. A. 881,-36 South. 561,) From a construction of the lease, however, it seems apparent that there was prior to the issuance of patent no alienation of the homestead entry or an interest therein, nor was there any contract for such alienation. The lease here under consideration is in most respects similar to the leases which this court had under its consideration in the case of Thomas v. Standard Development Go. (Mont.), 224 Pac. 870.
    The rights and liabilities of the parties under such a lease are compared by the court to those existing under an option. An option, however, is neither an alienation nor an agreement to alienate. It is simply a privilege, in this ease, to explore, if the optionee elects. (Ide v. Leiser, 10 Mont. 5, 24 Am. St. Pep. 17, 24 Pac. 695; Snider v. Yarbrough, 43 Mont. 203, 115 Pac. 411.) The plaintiff as lessor has, under such a lease as is here presented, simply parted with the right to explore the lands for oil, gas and minerals during the period named in the lease, and the right to allow any other person than respondent such right. (Guerin v. Sunburst Oil & Gas Go., 68 Mont. 365, 218 Pac. 949.) The property, namely, the homestead entry or the minerals thereunder, is not the subject matter of the contract. (Pollock v. Brookover, 60 W. Ya. 75, 6 L. P. A. (n. s.) 403, 53 S. E. 795; Barnes v. Hustead, 219 Pa. St. 287, 68 Atl. 839; Patterson v. Farmington etc. By. Go., 76 Conn. 628, 57 Atl. 853.)
    Such a lease does not vest in the lessee thereunder title to the oil and gas in said land, nor is it a grant or any estate therein, but is simply a grant, at the election of the grantee, of a right to prospect and explore for oil and gas, no title vesting until such substances are reduced to possession by extracting the same from the earth. (Thomas v. Standard Dev. Go., supra.)
    
    Suppose, however, that the agreement herein does convey an interest in the homestead entry. Even under such circumstances, the appellant, upon the facts as developed in the pleadings, is not entitled to prevail herein. It must at all times be borne in mind that the attack made on the lease under consideration herein is made by the lessor himself more than a year after patent was issued. No attack upon the lease in question has even been made by the United States government.
    A situation somewhat similar to that presented here was considered 'by the supreme court of Mississippi in the case of 
      Anderson v. Wilder, 83 Miss., 606, 35 South. 875, where the court said: “The deed'of April 7, 1898, of course, did not affect the title of the United States government as between the government and Anderson. The title remained in the government until final proof was made, but as between third parties the conveyance was not void. That deed, though ineffectual to convey title until final proof has been made by Anderson, was within the efficacious reach of the doctrine of estoppel, so as to cause the title attempted to be conveyed by it to inure instantly, upon the acquiring of title from the government, to the grantee in the deed of 1898.” (Shiver v. United States, 159 U. S. 491, 40 L. Ed. 231, 16 Sup. Ct. Rep. 54 [see, also, Rose’s U. S. Notes]; Butterfield Lumber Co. v. Hartman, 82 Miss. 494, 100 Am. St. Rep. 644, 34 South. 328; Sanford v. Eastabutchie Humber Co., 83 Miss. 478, 36 South. 10; Hartman v. Butterfield Lumber Co., 199 U. S. 335, 50 L. Ed. 217, 26 Sup. Ct. Rep. 63 [see, also, Rose’s U. S. Notes]; McAlpine v. Resch, 82 Minn. 523, 85 N W. 545; Eing-Ryder Lumber Co. v. Scott, 73 Ark. 329, 70 L. R. A. 873, 84 S. W. 487.)
    Under such circumstances the patent is deemed to relate back to the time of the inception of the patentee’s claim to the land, and the relation back is effective in favor of persons to whom the claimant has assigned his rights in the land, or any interest therein before the issuance of the patent. Thus in the case of Pierce v. Chicago etc. Ry. Co., 52 Mont.. 110, 156 Pac. 127, it is said: “That his title subsequently acquired by his patent relates to the date of his entry, however, must be conceded.” (Gibson v. Chouteau, 13 Wall. (U. S.) 92, 20 L. Ed. 534; Knapp v. Alexander-Edgar Lumber Co., 237 U. S. 162, 59 L. Ed. 894, 35 Sup.( Ct. Rep. 515; United States v. Detroit Timber etc. Co., 200 U. S. 321, 50 U. Ed.- 499, 26 Sup. Ct. Rep. 282; United States v. Clark, 200 U. S. 601, 50 L. Ed. 613, 26 Sup. Ct. Rep. 340 [see, also, Rose’s U. S. Notes] ; United States v. Ball, 31 Fed. 667, 12 Sawy. 514; Clark v. Hall, 19 Mich. 356; Birmingham Coal etc. Co. v. Doe, 181 Ala. 621, 62 South. 26; Touchard, v. Crow, 20 Cal. 150, 81 Am. Dec. 108; Magruder v. Esmay, 35 Ohio St. 221; Cosmos Exploration Co. v. Gray Eagle Oil Co., 112 Fed. 4, 61 L. R. A. 230, 50 C. C. A. 79.) Nor may it be said that a lessee under an oil and gas lease may not urge the doctrine of relation. The lease in terms “grants, demises and leases” the property for certain purposes. Under the instrument in question it was the apparent intention of the lessor to provide expressly for peaceful possession and quiet enjoyment in the lessee of the right to use said land for the purpose of mining and taking care of the products of the land. No set form of words is necessary to make an express covenant, but any words that amount to or import an agreement are sufficient to. constitute such a covenant. (15 C. J. 1209; 24 Cyc. 917.) Even though the language above referred to was not sufficient to constitute an express covenant, still there exists in the instrument by reason of the use of the words “grant, demise and lease,” an implied covenant for right of entry and quiet enjoyment. (24 Cyc. 1057; Texas Pacific Coal etc. Go. v. Fox (Tex. Civ.), 228 S. "W. 1021; Headley v. Hoopenganer, 60 W. Va. 626, 55 S. E. 744; Knotts v. McGregor, 47 W. Va. 566, 35 S. E. 899; Black v. Gilmore, 9 Leigh (Va.), 446, 33 Am. Dec. 253; Stott v. Kutherford, 92 U. S. 107, 23 L. Ed. 486 [see, also, Rose’s U. S. Notes] ; Barney V. Keith, 4 Wend. (N. Y.) 502; Conrad v. Morehead, 89 N. C. 31, 34; Lowering v. Lowering, 13 N. H. 513; Eldred v. Leahy, 31 Wis„ 546; Maeder v. Carondelet, 26 Mo. 112; Dexter v. Manley, 4 Cush, 58 Mass. 14.)
    Although some of these authorities have reference to the ordinary agricultural lease, on principle there can be no substantive difference between such a lease and one for oil and gas in so far as the question now under discussion is concerned. (Texas-Pacific Coal etc. Co. v. Fox, su,pra; Kilcoyne v. Southern Oil Co., 61 W. Va. 538, 56 S. E. 888; Haywood v. Fulmer (Ind.), 32 N. E. 574; Wettengel v. Gormley, 160 Pa. St. 559, 40 Am. St. Rep. 733, 28 Atl. 934.\
    
    
      After a contract made in violation of a statute or public policy has been executed, neither party may avoid its effect. (Morrison v. Bennett, 20 Mont. 560, 40 L. R. A. 158, 52 Pae. 553; National Bank of Savannah v. All, 260 Fed. 370, 171 C. C. A. 236; Pelosi v. Bugbee, 217 Mass. 579, 105 N. E. 222; Perry v. Berger, 85 Neb. 753, 124 N. W. 133; Baivden v. Taylor, 166 111. App. 443; Id., 254 111. 464, 98 N. E. 941; McKee v. Verner, 239 Pa. St. 69, 44 It. R, A. (n. s.) 727, 86 Atl. 646; Beard v. White, 120 Ga. 1018, 48 S. E. 400; Batcliffe v. Smith, 13 Bush (76 Ky.), 172; Lindblood, v. Warren Min. Co., 156 Minn. 317, 194 N. W. 778; Pacific Electric By. Co. v. Commonwealth etc. Ins. Co., 55 Cal. App. 704, 204 Pac. 262; Lowenburg v. Klein, 125 Miss. 284, 87 South. 653.)
   MR. CHIEF JUSTICE CALLAWAY

delivered the opinion of the court.

The plaintiff, while a homesteader upon government land, and before he made the final proof which is required as preliminary to the issuance of patent, executed an oil and gas lease to a predecessor in interest of the defendant. Patent was issued February 27, 1922, In May, 1923, plaintiff began suit against the defendant to quiet title to the land, his purpose being to rid the land of the lease; this upon the theory that the lease is void under both federal and state statutes.

The defendant corporation by answer admits reliance upon the lease. It alleges affirmatively in substance that during the year 1920 Gordon Campbell was engaged in getting what are commonly known as oil and gas leases upon lands within the supposed limits of the Rocky Ridge Dome in Toole county, which was then what oil operators call a wildcat field. Whether the dome contained oil or gas or other hydrocarbons was problematical, but there were geological indications which seemed to warrant the expenditure of time and money in exploiting the land within its confines with a reasonable expectation of finding these minerals, or some of them, in commercial quantities. Campbell made known to the plaintiff and to other persons who were the owners of land within the field that if he could procure leases upon a sufficient acreage to justify the expenditure of the money necessary to drill one or more wells upon some part of the dome he would so do. On May 29, 1920, plaintiff executed to Campbell the lease in question. A portion of its terms and conditions are:

As party of the first part, plaintiff, in consideration of the sum of $1 and of the covenants and agreements to be kept and performed on the part of the party of the second part, granted, demised and leased the lands contained in his homestead entry to Campbell as “party of the second part, his heirs, successors or assigns, for the sole and only purpose of mining and operating for oil, gas, hydrocarbons and other minerals, and the laying of pipe-lines and building tanks, power stations and structures thereon, to produce and take care of said products, for the term of twenty years, and as much longer thereafter as oil, gas, hydrocarbons, or other minerals are found in paying quantities.”

It was provided that the lessee should either deliver to plaintiff the equal of twelve and one-half per cent of all oil produced and saved from the premises or pay in cash the equal of that per cent of the market value of the oil. Royalties respecting any gas or other hydrocarbons or minerals were likewise provided for. Other provisions need not be stated.

It is alleged that Campbell, having obtained leases upon 50,000 acres or more within the Rocky Ridge Dome, determined that a sufficient area had been obtained to justify the expenditure of the money necessary to drill and test the dome for oil and gas, and thereafter a well was drilled resulting in the discovery of oil within that area. Thereafter the lease in controversy was assigned to L. C. Stevenson, who later assigned it to the defendant. It is then alleged that Stevenson having caused the region in the vicinity of plaintiff’s lands to be examined by geologists so as to determine whether oil and gas in commercial quantities existed therein and whether the probability of discovering, producing and saving the same would justify the expenditure of large sums of money in testing the lands “all of which were then wildcat lands and had not theretofore been tested by any person for oil and gas,” eventually determined to proceed with the drilling operations; that relying upon the validity of the leases, including that obtained from plaintiff, Stevenson raised and expended approximately $250,000 in the development of the territory and on or about the fifth day of June, 1922, completed an oil well in the same township in which plaintiff’s lands lie, which ever since that date has produced oil in commercial quantities, and thereby demonstrated that all the • lands in the field including plaintiff’s were valuable for oil purposes; whereas before the exploratory activities such lands, including the lands of the plaintiff, had not even a speculative value for such purposes. These allegations the plaintiff did not deny.

Proceeding upon the theory that the lease is void and it being admitted by the defendant that its only claim to the land is by virtue thereof, plaintiff at the beginning of the trial moved for a judgment upon the pleadings, which the court denied. Plaintiff then announced that he elected to stand upon his motion for judgment and declined to introduce any testimony in support of his complaint,' Judgment of dismissal followed. The plaintiff himself caused the entry of the judgment. "Whereupon he appealed.

Counsel for defendant insist that plaintiff himself having caused the dismissal of the ease is not now in a position to say the court erred in rendering the judgment. "Whether this position is correct depends upon the force of the answer: Does it state a defense to plaintiff’s cause of action?

One may not appeal from an order denying a motion for judgment on the pleadings. (See. 9165, Rev. Codes 1921.) This being true, say counsel for defendant, the plaintiff may not do indirectly that which the statute prohibits him from doing directly. But in a given ease if the complaint states a cause of action and the answer does not state a defense thereto the plaintiff is entitled to judgment.

Had plaintiff demurred to defendant’s answer, had the court overruled the demurrer, had plaintiff refused to plead further and had judgment then been entered in favor of defendant, plaintiff’s right to appeal would not be challenged. His motion for judgment was in effect a demurrer to the answer. (Power v. Gum, 6 Mont. 5, 9 Pac. 575; Floyd v. Johnson, 17 Mont. 469, 43 Pac. 631.) Plaintiff’s action in asking the court to enter “such judgment as would allow of an appeal, was not such a consent to the judgment as to debar him of the right to appeal.” (Stevenson v. Matteson, 13 Mont. 108, 32 Pac. 291; Conner v. McPhee, 1 Mont. 73.) The method pursued by the plaintiff was a short cut to an ultimate decision, but in pursuing it he took the risk of losing his case, for if it should be determined that the answer states a defense, then having caused the court to do what it could not otherwise have done rightfully, he could not be heard to complain. (Moore v. Murray, 30 Mont. 13, 75 Pac. 515.)

To support his contention that the answer does not state a defense counsel for plaintiff insists that the lease is void upon two grounds: 'First, because it is in contravention of the policy of Congress in disposing of the public lands for that it constitutes an alienation of part of the land (U. S. Rev. Stats., secs. 2290, 2291; U. S. Comp. Stats., secs. 4531, 4532); second, because it violates a statute of Montana (sec. 6707, Rev. Codes 1921) which limits oil and gas leases to a term of ten years and the producing period thereafter.

Shortly after the cause was submitted we took up its consideration. First off, in order to settle’ one question, it may as well be said that the document in question is a lease within the meaning of our statutes. (Secs. 6902, 6903, Rev. Codes 1921.) It is very like that considered in Solberg v. Sunburst Oil & Gas Co., 70 Mont. 177, 225 Pac. 612.

While we were considering the interesting problems pre sented we were interrupted by a petition to dismiss the appeal, filed by defendant, on the ground that the questions involved have become moot. The petition sets forth that after the argument of the cause in this court the plaintiff served upon the defendant a paper called a “division order,” which relates to the lease in question and by its terms recognizes its validity and demands from the defendant as the owner and holder of the lease a percentage of the oil produced from the land which the lease covers. A copy of the division order is attached to the petition. By it the plaintiff “certifies and guarantees that he is the legal owner of two and two-thirds per cent of the production” of the wells on the land covered by the lease, “including the royalty interest”; declares that the defendant “is hereby authorized, until further notice, to receive oil from said wells, including the production from said tract, prior to date hereof for which settlement has not been made,” also, “the oil run in pursuance of this division order shall become the property of the Sunburst Oil & Gas Company at once,” and then gives directions respecting payment for the same; further plaintiff notifies the defendant that he looks to the defendant as “assignee of the original lease for the entire tract for pi’otection, compensation and indemnity as to his share of the production of the entire tract.”

In opposition to the petition to dismiss the plaintiff filed objections upon the following grounds: That the lease being void cannot be validated by ratification; that even if it were capable of being so validated, the alleged division order “was not a ratification thereof; nor is it a contract under which any new right in the defendant arises”; that the plaintiff has agreed to transfer an interest in the land involved to another person, consequently is without right or authority to make a ratification to the prejudice of that person.

As a part of his objections the plaintiff filed an affidavit in which he admits the execution of the division order and its transmission to the defendant. He sets forth at length the circumstances under which he came to make it, but he does not allege that the defendant or its agents had anything whatever to do with the action he took. He says that the tract of land involved has been producing oil for a number of months and he believes that regardless of the outcome of this lawsuit the defendant will be required to account to him for his share of production, even though the lease may be declared null and void; that in signing the division order he “did not give a single or passing thought to the lease or this lawsuit; * * * that the sole. purpose of giving the order was to hold the defendant for plaintiff’s share of oil and gas already produced and sold, as well as such oil and gas as might thereafter be produced during such time as the defendant might be in possession of the premises.” He then says that he mailed the division order to defendant on January 23, but defendant never accepted it, and then says that on the 27th of January he revoked the order.

In passing we observe that whether the defendant accepted the order or whether plaintiff attempted to revoke it does not change the fact that he voluntarily executed it in the first place. It has an important bearing on his conduct.

Counsel for plaintiff asserts that a contract illegal as against public policy cannot be rendered valid by a subsequent ratification; that the doctrine of relation may not be invoked to validate a conveyance which is illegal as against public policy; that estoppel may not be predicated upon a void instrument.

The correctness of these assertions as abstract propositions of law may be admitted; but whether a court of equity will afford relief to one so sunk in the mire of his own making as is this plaintiff is still another proposition. Ordinarily a court of equity will not aid either party to an illegal agreement. It leaves the parties where it finds them. (Glass v. Basin & Bay State Min. Co., 31 Mont. 21, 77 Pac. 302.) "What application that principle might have had had the plaintiff begun suit immediately after receiving patent for the land we need not consider; it has application to present conditions. A venerated maxim of wide application is that he who comes into a court of equity must come with clean hands. (Gazette Printing Co. v. McConnell, 45 Mont. 89, Ann. Cas. 1913C, 1327, 122 Pac. 561.)

In view of what follows let it be noted that the lease is not inherently vicious or immoral from any viewpoint. (Hartman v. Butterfield Lumber Co., 199 U. S. 335, 50 L. Ed. 217, 26 Sup. Ct. Rep. 63 [see, also, Rose’s U. S. Notes].)

From the pleadings and the facts shown in the petition to dismiss the appeal it is seen that several important developments in the situation have transpired since the lease was executed: Patent has been issued to the plaintiff; an assignee of the original lessee, recognized as such by the plaintiff, has sunk wells upon the tract of land which are producing oil in commercial quantities; the plaintiff now recognizes the lease and demands a portion of its fruits. Of course this last position is utterly inconsistent witb his first that the lease is void. To obviate this situation it is argued by his counsel that he has not estopped himself for the reason that the defendant being a trespasser must account for all of the oil it has taken from the land, so if plaintiff asks but a per centum of it he is only asking for a portion of that to which he is entitled.

It may be granted that a trespasser must account for all the oil he takes; but here again the plaintiff is inconsistent: By his division order he recognizes the defendant as the owner of the oil.

The facts as now developed in. this record are that the plaintiff, while a homesteader, and long before he made proof entitling him to patent, executed an oil and gas lease covering the land. Let it be conceded that the validity of the lease was doubtful. Whether the land was valuable for oil or gas purposes was purely speculative. The plaintiff obtains patent, and then sits by observing the defendant’s predecessor in interest spend huge sums of money in exploiting the field; oil is found in paying quantities in the vicinity of his land; his land becomes of great value by reason of the foregoing facts; almost a year after the oil is found he begins this suit; then wells are driven upon plaintiff’s land which produce, and for several months have been producing, oil in paying quantities; then plaintiff, desiring to obtain a portion of the royalties reserved to him by the terms of the lease which by this suit he seeks to repudiate and without giving “a single or passing thought to the question of the lease or this lawsuit, ’ ’ serves upon the defendant the division order in question, which notifies defendant that plaintiff is the legal owner of a certain portion of the production of the wells on the land in question, “including the royalty interest” demands credit for such interest in all oil produced, declares that the oil run in pursuance of this division order shall become the property of the defendant at once, demands payment for plaintiff’s share in a certain manner and at a certain time, and gives notice to all persons concerned that plaintiff does not recognize the right of any sublessee of any part of the land involved to hold or distribute the plaintiff’s share of production, but the plaintiff looks to the defendant as assignee of the original lease “for protection, compensation and indemnity as to his share of the production of the entire tract.”

In view of the result whether the twenty-year provision made the lease void need not be decided. However, it is interesting to note that the land is now producing oil in paying quantities. It may continue to do so for more than twenty years. Query: Does that condition affect the question?

But plaintiff says that he has agreed to transfer an interest in the land to a third person, so under the provisions of section 7943, Revised Codes of 1921, which reads, “No unauthorized act can be made valid, retroactively, to the prejudice of third persons, without their consent,” he was without authority to ratify the lease even if he desired to do so. On June 7, 192J, plaintiff and his wife entered into an agreement with one C. M. Brinton in which it was set forth that, whereas there appears of record against the lands involved here what purports to be an oil and gas lease which is being contested in the courts of Montana, plaintiff claiming it to be null and void, and whereas plaintiff and his wife “desire to lease said lands for oil and gas, notice is hereby given that they have this day executed an oil and gas lease in favor of and to said C. M. Brinton, party of the second part, upon specified conditions that such lease is to be held in escrow in the Conrad National Bank of Kalispell, Montana, until final completion of said court action is had, whereupon said lease is to be delivered, upon the specified conditions, to said C. M. Brinton, who will then be the sole lessee of said lands for the purpose of prospecting and recovering oil and gas therefrom.”

It is fairly inferable from this document that in ease the plaintiff does not win this lawsuit it is not contemplated that the lease in escrow shall be delivered to Brinton. Upon this hypothesis it will not be. Under the agreement Brinton has not had and has not now any present interest in the land. His expectancy seems doomed to failure.

If the facts which are admitted in this record had been presented to the court in plaintiff’s complaint the court would have been justified in sustaining a general demurrer thereto upon the ground of a want of equity appearing upon the face thereof. For the same reason this court declines to aid the plaintiff; he does not come before it with clean hands. Having been, according to his own theory, a party to an illegal contract he now seeks to avail himself of that illegality to his own advantage and to the disadvantage of the other party. Having sat by while another expended toil and money in bringing forth riches he would take the riches and leave the other nothing. And lastly while he seeks to have the court declare the lease invalid he himself does that which declares it valid. He who seeks relief in equity must come with clean hands; he who does not must go hence without it.

The appeal is dismissed.)

Dismissed.

'Associate Justices Holloway, Stark and Matthews concur.

Mr. Justice Galen, being absent on account of illness,’ did not hear the argument and tabes no part in the foregoing decision.

Record certified to supreme court of the United States on application for writ of certiorari on March 19, 1925. Petition for writ denied May 11, 1925'.  