OPINION OP THE COURT.
ROBERTS, C. J.The appellants have assigned as error the action of the lower court in sustaining the demurrer to the answer, and entering judgment for the plaintiff ás by default for want of a sufficient answer, claiming that the court thereby lent its aid to the enforcement of an executory contract of mortgage which the answer clearly showed was illegal, in that it was made in the course of, and as a part of a deed of sale and assertion of exclusive possession of vendor and vendee of public land of the United States in violation of the penal statutes and public policy of the United States, of which appellees had notice, being parties to saidillegaltransaction.
Appellees, in support of the judgment, contend, first: That the conveyance in question was not illegal, and second: That a grantee of land, though it be public land of the United States, cannot repudiate his purchase money mortgage of the land, by means of which he procured and acquired possession of the land, and at the same time withhold and retain the possession of the land so acquired.
The statute of the United States, which appellants contend the contract and transaction violates, is the Act of Feb. 25, 1885, ch. 149, 23 Stat. L. 321; 6 Fed., Stat. Ann. 533, the section of which reads as follows:
Sec. 1. That all enclosures of any public lands in any state or territory of the United States, heretofore, or to be hereafter made, erected or constructed by any person, party, association or corporation, to any of which land included within the enclosure, the person, party, association or corporation, making or controlling the enclosure, had no claim or color of title made or acquired in good faith, or an asserted right thereto by or under claim made in good faith with a view to entry thereof at the proper land office under the general laws of the United States at the time any such enclosure was or shall be made, are hereby declared to be unlawful, and the maintenance, ereclion, construction or control of any such enclosure is hereby forbidden and prohibited; and the assertion of aright to the exclusive use and occupancy of any part of-1 the public lands of the United States in any state or any of the territories of the United States, without claim, color of title or asserted right, as above specified as to enclosure, is likewise declared unlawful and hereby prohibited.”
Section 2 makes it the duty of the various district at: lorneys of the United States to institute injunction suits to prevent violations of the act, and section 5 prescribes a penalty of a fine not exceeding $1,000 and imprisonment not exceeding one year for each offense.
1 It will be noted that the statute defines two offenses, each of which is punishable by fine and imprisonment. First, it is an offense for any person to enclose public lands of the United States in controvention of the statutes, and second, it is likewise an offense for any person to assert the right to the exclusive use and occupancy of any' part of the public domain; the party in either' event having' no claim or color of title made or acquired in good faith, or an asserted right thereto by or under claim, made in good faith, with a view to entry thereof at the proper land office, under the general laws of the United States. If a person has claim or color of title made or acquired in good faith, or asserts a right to public. land by or under claim made in good faith, with a view to entry thereof at the proper land-office, etc., it is not an offense for him to either enclose public land or to assert the right to the exclusive use and occupancy of public land. The paragraph of the answer in question, alleges that Eeinhart “had not claim or color of title made or acquired in good faith with a view to entry "thereof at the proper land office of the United States * * * nor had he at any time theretofore any other claim or color of title made or acquired in good faith to said land,” and that he asserted the right to the exclusive use and occupancy of' the land described in the deed of trust, and had enclosed the same, and that the unlawful assertion of such right to the exclusive use and occupancy of said land was the inducement for the purchase by Smith, and that Reinhart undertook and agreed to deliver such ex-.-elusive oecupanejr of said land to Smith, thus showing that the assertion of the right to the exclusive use and occupancy of the land, which was in violation of the penal statute, was a part of the consideration which entered into the consummation of the contract for the purchase of the land and the execution of the notes and trust deed. 'The demurrer, of course admitted the truth of the allegations of the answer, which were well pleaded, hence it is admitted that the land in question was public land of the United States, to which Reinhart had not good faith, claim or color of title, and to which he had no asserted right with a view to entry, etc.; that he had enclosed the land; that he delivered to appellants the exclusive use and occupancy of said land, which said Reinhart then hold, which delivery was made in pursuance of the contract to deliver such exclusive use and possession as a part of the transaction and attempted conveyance, and for which the notes and trust deed were executed. The allegations of the paragraph of answer clearly allege that the agreement to deliver the exclusive use and possession of the land, which Reinhart had theretofore asserted, to Smith, was a part of and entered into the consideration of the notes and trust deed.
The first question to be determined is whether the contract and conveyance was legal or illegal. Appellees rely ■chiefly upon the case of Tidwell v. Chiricahua Cattle Co., (Ariz.) 53 Pac. 192, in support of their position that the conveyance in question was not illegal, but a careful reading of the case will show a distinction between the facts in that case and the one now under consider'ation. There the court says:
“The lands enclosed were not Tracts of vast area of wild, unimproved land of the public domain/ as contemplated by the act of congress, but a tract of less than 160 acres, all in cultivation, and actually used for agricultural purposes, and was held by the appellee not ‘without claim or color of title5 but by conveyances of record from grantors, under which appellee had for years hold, oocupied, plowed, seeded, irrigated, cultivated and improved it,” and the court distinctly found that the defendant had shown color of title, thus bringing the case relied upon clearly without the prohibition and penalty of the statute-in question; but here the allegations of the'answer allege-that Reinhart did not have good faith, claim, asserted right, etc., or color of title. If issue should be joined upon the allegations of the answer and the proof should establish, as it did in the ease of Tidwell v. Chiricahua Cattle Co., that Reinhart held the land in good faith under conve}rances, he would then bring himself clearly within the doctrine laid down, and his act would not be in contravention of the act of Congress in question.
3 2 The paragraph of the answer now under consideration alleges that Reinhart held the land without good-faith, claim or color of title or asserted right, etc. The defense-interposed here is that the consideration of the contract out of which the notes and trust deed originated, and' which they were given to secure, was based upon the violation of a penal statute of the United States. We think the authorities uniformly hold that an act done in-violation of a statutory prohibition, is void and confers no right upon, the wrongdoer. Reinhart had no-right, under the law, to assert the right to the exclusive-use and possession of government land, to which he hacino claim or color of title, made or acquired in good faith, or asserted right thereto by or under claim made in good faith, with a view to entry thereof at the proper-land office, etc., and in asserting such right he was acting in violation of law, and any conveyance or contract which he might make to any portion of the land to which he asserted such right, to the exclusive use and possession, and into which his assertion of such right to the exclusive use and possession entered, and by which he attempted to confer such right upon another part.v, was utterly void. Waskey v. Hammer, 222 U. S. 187; Schwanger v. Meabry, 59 Cal. 91; Coombs v. Miller, (Okla.) 103 Pac, 590; McLaughlin v. Ardmore Loan & Trust Co., (Okla.) 95 Pac. 779; Garst v. Love, 55 Pac. 19; Tandy v. Ellmore Copper Live Stock Comm. Co., 113 Mo. App. 409; Levison. v. Boas, 12 L. R. A., N. S. 575, and extended note. .
We are aware that the rule above stated is subject to the qualification that when upon a survey of the statute, and from its subject matter and the mischief sought to be prevented, it appears that the legislature intended that the violation of the statutory prohibition should not render a contract void, effect must be given to that intention, but a survey of the statute in question fails to disclose' any such intention. As was said by the Supreme Court of the United States in the case of Waskey v. Hammer, supra, in considering a section of a statute of the United States prohibiting officers, clerks and employes of the general land office from directly or indirectly purchasing or becoming interested in the purchase of any of the public land, and providing that any person who violated the section should be forthwith removed from office.
“The acts described in sec. 452 are expressly prohibited under the penalty of dismissal. There is in its language nothing indicating that its scope is to be confined to the exaction of that penalty, or that acts done in violation of it are to be valid against all but the government. Nor is there anything in its subject matter or in the mischief sought to be prevented which militates against the application of the general rule. On the contrary, it is reasonably inferable from the language of the section and the situation with^which it deals, that it is intended that violations of it shall be attended by the ordinary consequences of unlawful acts.”
In the case of Garst v. Love, supra, the Supreme Court of Oklahoma held that a paragraph of answer interposed as a defense to a suit to recover for the pasturage of cattle within an enclosure on government land, which stated that the enclosure was maintained upon government land, to which the plaintiff had no right or title, and of which they were holding exclusive possession for rental and speculation purposes in violation of the act of Congress of February 25, 1885, stated a good defense.
In the case of McLaughlin v. Ardmore Loan & Trust Co., supra, the Supreme Court of Oklahoma, in a suit instituted on a promissory note, where the proof showed the consideration therefor to be a deed of land from the payee, to the payor in possession of the payee and held by him in violation of sec. 2118, R. S. U. S., which imposed a penalty upon a person making- a settlement upon any lands belonging, secured or granted by a treaty with the United States to any Indian tribe, that there could be no recovery as the contract had for its object the violation of law and was illegal. The Court says:
“The general principle is well established that a contract founded on an illegal consideration, or which is made for the purpose of furthering any matter or thing prohibited by statute, or to aid or assist any partir therein is void.”
■4 The paragraph of the answer in question alleging that Reinhart had the exclusive use and possession of the land in question, and that he transferred to the appellant the exclusive use and possession of the land, all without right or claimed right or color of title, and being designed to further the violation of the statute, and to aid and assist the appellant in continuing the violation thereof, under the rule announced in the above •case, the contract would be clearly void and uncnforcible. The assertion of the right to the exclusive use and possession of government land in violation of the statute, was a crime in itself, and where the notes and trust deed. were grounded upon this violation, and the proposed continued violation by the appellant, Smith, it would hardly do to permit the party committing the offense to maintain an action upon obligations arising out of a ■criminal act.
The appellees contend, however, that even if the notes and trust deed are invalid, by reason of the facts above stated, the appellants are estopped to deny that Rein-hart had title when he conveyed, or that the appellants had title when they executed the deed of trust, and that they are therefore estopped from setting up title in a third person. The appellees rely upon the doctrine laid down by Herman on Estoppels and Res Judicata, vol. 2, sees. 910 and 911, that
“In a suit against a mortgagor for the land mortgaged, lie is estopped to deny that he had title when -he mortgaged, or to set up title in a stranger. * * * The same principles of estoppel in pais apply in the case of mortgagors, and the rule that no man shall take advantage of his own wrong, is one of universal application,” ancT numerous cases cited in support of the principle announced.
5 We concur fully in the above statement of the law, but do not think the principle applicable to this case The appellant is not relying upon the fact that he had no title, or that Reinhart had no title, except as such a fact or facts are incident to the main fact that the notes and trust deed are based upon a consideration, growing out of a violation of a penal statute. It is the invalidity and unlawfulness of the transaction upon which the defense is based, and not the mere failure of title. It is a well-settled rule that a teuant cannot, during his possession of premises, dispute the title of his landlord under whom he entered, yet leases made in violation of the law, or which contemplate the doing of an act in violation of law and the settled public policy of the country are void. In the case of Dupas v. Wassel, 1 Dill. 213, Judge Caldwell, in passing upon a lease executed to a portion of the “Hot Springs Reservation,” which under an act of Congress was reserved for future-disposal by the United States, and which under the ac-t could not be entered, located or appropriated for any other purpose whatever, said,
“No rule is better settled than that tenant shall not, during his possession of premises, be permitted to dispute the title of his landlord, under whom he entered. And this rule extends to an under tenant * * * The plaintiff' insists that applying these rules of law to the facts in this case he is entitled to judgment. Every agreement that parties may make does not in law, amount to a contract having a binding obligation. Contracts to do an illegal act, and contracts against good morals and public policy are void; and the law will not lend its aid 'to either party to such a contract to compel its perform-anee or enforce any right claimed under it. * * * A lease of premises for the purpose of prostitution or for any other immoral object, is a contract against good morals and absolutely void * * * and the same is true of leases that contemplate the doing of an act in violation of law and the settled public policy of the country. The lease in this case falls within the last category. * * * Ho had no right and could acquire no right to treat this government property as his own; and in attempting to do so, he was acting in violation of law; and any lease he may have granted to any portion of the reservation was utterly void.”
There can be no estoppel against pleading illegality in the sense of penalized acts. This question was met by the Supreme Court of Arkansas in Shorman v. Eakin, 47 Ark. 351; I. S. W. 559, where some of the authorities are collated. The first paragraph of the syllabus of the case states the facts of the ease as follows:
"The United States government is the original source of title to lands in Arkansas, and the presumption of the law is that the title remains with the Government until some other disposition of it is shown and where a man sells land in that state, claiming to have derived it from the state upon a swamp land grant, and at the same time, according to the books of the United States Land Office, the land ivas vacant, ánd subject to homestead entry under the federal laws, the presumption is that the grantor had no title, and a note given for the purchase money is void.”
In the opinion of the court it is said:
"As a general rule, a purchaser entering into possession under his contract of purchase cannot, in an action like this, so long as he retains such possession, deny his vendor’s title. If the vendor is unable to convey the title and he would rescind the contract, he must restore the possession. He cannot enjoy the properly, and refuse to pay the price. The principle on which this rule rests is the purchaser is estopped to deny the title of his vendor. Because he acknowledged it and gained possession of his purchase, and he ought not in conscience as between them, to be allowed, to enjoy the fruits of his contract, and not pay the full consideration money. Lewis v. Boskins, 27 Ark. 64; Galloway v. Finley, 12 Pet. 294; Jackson v. Ayers, 14 Johns, 223; Jackson v. McGinness, 14 Pa. St. 333; McIndoe v. Mormon, 26 Wis. 589. But this rule is not without exception. No one, as a rule, can estop himself from taking advantage of that which is contrary to public policy. Contracts, as a general rule, cannot vest in parties any rights in contravention of law or public policy. Mr. Parsons in his work on Contracts, says: ‘It is obvious, however, that the doctrine of estoppel can go no further than to preclude a party from denying that he has done that which he had power to do.’ 2 Pars. Cont. (5th ed.) 799; Pub. Pol. 1115; Spare v. Home Mut. Ins. Co., 15 Fed. Rep. 707; Steadman v. Duhamel, 1 Man. G. & S. 888; Dupas v. Wassell, 1 Dill. 213; Klenk v. Knoble, 37 Ark. 304; Webb v. Davis, Id. 555.
“The constitution of 1868 prohibited the encumbering ■of homesteads of residents of this state who are married men or heads of families, in any manner, while owned by them, except for taxes, laborers’ and mechanics’ liens and securities for the purchase money. In Klenk v. Knoble and Webb v. Davis, supra, the defendants, while the constitution of 1868 was in force, executed mortgages, and recited or covenanted therein that the property mortgaged was not their homesteads. The court held, in both •cases, which were actions to foreclose mortgages, that the mortgagor was not estopped from denying the truth •of these recitals and covenants, and claiming the property as his homestead, because such recitals and covenants were contrary to public policy and void. As a rule, a tenant cannot dispute the title of his landlord. Yet, in Dupas v. Wassell, supra, it was held that a landlord •could not recover, against his lessee, ground rent for the use of the lands leased, because the lease was void by reason of its being contrary to the statutes of the United States, and against public policy; and that the lessee was not estopped to deny his landlord’s title.”
In Langan v. Sankey, 55 Iowa 52; 7 N. W. 393, the court said of an estoppel pleaded to an illegal contract:
“It is conceded, as we understand, by counsel for tile-appellant, that an action could not be maintained to enforce the contract, and that Adye v. Hanna, 47 Iowa, 264, is decisive as to this question. But it is insisted such a contract may be relied on as an estoppel, and a recovery, therefore, had. We do not believe this is correct, and are unwilling to hold that á contract void, as being against public policy, has any vitality whatever. It matters not how it may be pleaded, a substantial right cannot be enforced thereunder. That which cannot be recovered in an action on the contract should not be permitted to be done by inderection. Besides this, the defendant did not affirm any fact to be true which turned out to be false. At most, lie asserted his legal opinion, and upon that the contract was based.”
In Brown v. First National Bank, 137 Ind. 655, 37 N. E. 158; 24 L. R. A. 206, the Court said:
“The contention of counsel that appellee, having received the benefits of the contract, is estopped to defend against it on the principle that a corporation which has such benefit is estopped to assert that it had no power to contract, is unsound, as applied to the case at bar. The rule suggested applies to cases where private rights alone are concerned, while in contracts void as against public policy the public is interested. The public concern cannot be made a matter of private bargain. A number of maxims apply to interdict the enforcement of such a contract, and many decisions hold that the receipt of the benefits and retention of property under such a contract give no right of recovery. If the contract has not been executed, it will not be enforced; if it has not been executed, the law will not extend itself. It cannot be rendered valid by invoking the doctrine of estoppel. Hutchins v. Weldin, 114 Ind. 80; Perkins v. Jones, 26 Ind. 499; Dumont v. Dufore, 27 Ind. 263; Root v. Stevenson, 24 Ind. 115; Wheeler v. Wheeler, 5 Lans. 355; Snyder v. Willey, 33 Mich. 483: Greenhood Pub. Pol. pp. 2, 3, 6, note 3; Broom Legal Maxims, p. 729-730; 7 Wait. Act. & Def. 92.”
In Reed v. Johnson, 27 Wash. 42, 67, Pac. 381, the court said: “The appellants are not estopped to raise the illegality of the contract because of their course of dealing with respondents under the contract. Validity cannot be given to an illegal contract through any principle of estoppel. Warvelle, Vendors, p. 162, 4; Durkee v. People, ex rel. Askren, 155 Ill. 354, 40 N. E. 626; Brown v. First National Bank, 137 Ind. 655; 24 L. R. A. 206; 37 N. E. 158; Pullman Palace Car Co. v. Central Transportation, Co., 171 U. S. 138; 43 L. Ed. 108; 18 Sup. Ct. Rep.”
The cases relied upon by the appellees merely go to the effect that in cases wherein no illegality arises but in which some legal defect of title may exist, which renders a deed or mortgage invalid because wanting in some legal requirement or formality, one claiming under a title is estopped to deny its validity, and one affirming a title by conveying or mortgaging is estopped to deny its validity in the absence of illegality. But illegality in the sense of acts forbidden and penalized by law may always be shown with or without pleading, and will be taken notice of by the court whenever it is made to appear in the case when waived by the parties.
The vice of appellees’ contention consists in looking to the position of the defendant and in making the weakness of the defendant’s position the point of decision, whereas the real question to be decided_ is not what the right of the defendant, who is not seeking relief, may be, but the question is, shall the court enforce at the instance of the plaintiff an illegal contract made in violation of a statute, which renders it criminal and declares a public policy against such transaction as the one brought to the attention of the court in this case was.
The plaintiff seeks affirmative relief and seeks relief upon the very contract, which is illegal and not otherwise than upon the contract. The question is not what the defendant may plead, but what relief can the plaintiff' have on the contract if the facts brought to the attention of the court by the answer be true.
Appellees insist however, that equity, in the enforcemént of a superior public policy, will apply the doctrine of estoppel, contended for by appellees, to preclude the appellants from setting up the illegality of the transaction of which they seek to take advantage, and will wink at the malum prohibitum of Beinharffs conveyance, in order to prevent the malum in se of the defendants attempted fraud. Appellees rely chiefly upon the case of Brooks v. Martin, 2 Wall. 70, in support of the proposition, and attempt to apply to this case the principles of that case, holding that an accounting may be had and enforced of the proceeds of an illegal partnership. This case has, however, been criticized, and the general statements made in the opinion have been repudiated in most of the American cases, and it has been limited by the United States Supreme Court to the very facts of that case in McMullen v. Hoffman, 174 U. S. 639. But the facts of that case and the one now before the court are altogether different; there the illegal ■contract had been fully executed, and the plaintiff was not relying upon the illegal contract and was not seeking to enforce it, but in the case now before the court, as disclosed by the answer, the plaintiff is seeking to enforce the illegal contract. This mortgage contract and the notes are ■executory, and this action is brought in a court of justice to enforce, what the answer shows to be a part of an illegal transaction and the question is, not as to the rights or standing of the appellant, but is, will the court enforce at the instance of the appellees an illegal contract. It might be that the appellees could allege such a state of facts in reply, as would render it unjust and inequitable to permit appellant to take advantage of the illegality of the transaction, a matter however, which we do not decide, but from the present state of the pleadings, nothing appears necessitating the application of the rule contended for by appellees. From all that appears, Beinhart, without good faith claim, color of title, or asserted right, took possession of government land, asserted thereto the right to the exclusive use and possession, enclosed it with a fence, and sold It to appellant, and agreed to deliver and did deliver to appellant, Smith, the exclusive use and possession of said ]and and the enclosures thereon. -
It is true that the recitals in the deed to Smith say that the land was obtained by conveyance, but the answer alleges that Beinhart did not hold the land under color of title, made or acquired in good faith, or claim or asserted right, made in good faith, and if these allegations are true, and they must be taken as true, upon demurrer, no equities are shown to exist in favor of Reinhart, which require a departure from the rule announced in the case of McMullen v. Hoffman, supra., that
7 “No court will lend its assistance in any way towards carrying out the terms of an illegal contract. In case any action is brought in which it is necessary to prove the illegal contract in order to maintain the action, courts will not enforce it, nor will they enforce any alleged rights directly springing from such contract.”
6 The appellees contend that it would be inequitable to permit appellant to retain possession of the land, acquired by the contract even if it is illegal, and that they should not be permitted to plead the illegality of the contract and still retain possession of the land. It is true that the defense interposed in this case is a dishonest defense, and it lies ill in the mouth of the defendants to allege it. But it is not out of any consideration for the defendants that courts permit such a defense to be interposed, but it is allowed for public considerations and in order to better secure the public against dishonest transactions, McMullen v. Hoffman, supra. As said by the Supreme Court of the United States in Pullman Palace Car Co. v. Central Transportation Co., 171 U. S. 138, in speaking of the holding of the courts in regard to illegal contracts:
“They are substantially unanimous in expressing the view that in no way and in no channels, directly or indirectly, will the courts allow an action to be maintained for the recovery of property delivered under an illegal contract where in order to maintain such recoveiy, it is necessary to have recourse to that contract. The right of recovery must rest upon a disaffirmance of the contract, and it is permitted only because of a desire of courts to do justice as far as possible to the party who has made payment or delivered property under a void agreement, and which in justice he ought to recover. But courts will not in such endeavor permit any recovery which will weaken the rule founded upon principles of public policy already noted.”
As the appellees seek a recovery upon the alleged illegal contract, and not upon a disaffirmance thereof, equity can extend to them no relief.
Being of the opinion that the answer properly alleges that the notes and trust deed were founded upon a contract, which'was illegal, in that its consideration was grounded upon the violation of a penal and prohibitory statute of the United States, and that it stated a good defense, it follows that the trial court erred in sustaining the demurrer thereto. The cause is therefore reversed with instructions to the lower court to overrule the demurrer and to permit a reply to be filed thereto by appellees and to proceed with the case in accordance with this opinion.