1. In view of the fact that this controversy_ centers largely upon the setting- of the case, we will make a concrete restatement. Plaintiffs entered into a written contract with the defendant for the purchase of 45,972.43 acres of land at the stipulated price of $7 per acre, aggregating $321,807.01. The plaintiffs completed their payments in accordance with the contract, and obtained all the right and title to the land that the defendant had. Long after the contract was made it was found that the United States government had an adverse claim to the lands, and by reason thereof the defendant was unable to give to plaintiffs a marketable title to the land. In order to obtain the interest of the United States to the lands and perfect and confirm their title plaintiffs were compelled to, and did, pay the United States the sum of $2.50 per acre, aggregating $114,932.50. This action is brought to recover from defendant the amount so paid to the United States. There is no claim or suggestion but that the payment by the plaintiffs to the United States was reasonable and fair and for the benefit of the defendant. In regard to the right of a covenantee, where he has purchased the outstanding title, to recover for the breach of the vendor’s covenant, see 15 C. J., page 1324, Section 228.
*9It is the position of the defendant that the contract for the purchase of the land is illegal and contrary to public policy; that as the defendant was prohibited from selling the land in greater quantities than 160 acres and to actual settlers only, at a price not exceeding $2.50 per acre, the plaintiffs were prohibited from making the purchase and were in pari delicto with the defendants. In other words, the defendant contends that the plaintiffs were not innocent purchasers in making the contract, but were equally guilty with the defendant in an infraction of the law. This question has been determined in the various decisions of the United States courts, and we are to a large extent relieved from the necessity of passing upon the innocence of plaintiffs in the transaction. We concur in the conclusion of the government as evidenced by the decisions of the Federal courts in the action of Congress, and the Department of Justice as represented by the. Honorable United States Attorney General to the effect that the plaintiff was an innocent purchaser of the land, and was not in pari delicto with the railroad company. Plaintiffs were not violators of the law. No law restrained them from making a contract of purchase of the lands. That inhibition, or covenant of the grant, was directed to and made to control the defendant, not the plaintiffs. In the final adjustment between the United' States and the plaintiff the sale of the land made by the railroad company to the plaintiffs was confirmed. No one suggests that the price stipulated for by the contract was inadequate or unfair. Therefore, as between the plaintiffs and defendant, if the sale is to stand, what reason can be thought of for changing the price fixed by the contract and paid by the plaintiff? Either the sale should be taken as it was made *10or it should he ignored, and nothing done by the court in regard thereto, or it should be annulled.
All of the proceedings on the part of the government of the United States plainly portray that the thought enunciated by the Supreme Court of' the United States and carried out was in effect that many years after the railroad grant was made a large number of acres of the land had been sold by the railroad company to innocent purchasers in greater quantities than permitted by the granting act, and it was determined that the lands were better suited for commercial purposes, or lumbering, than for homes. The railroad had been constructed and added to a transcontinental system, and the main object of the government in making the grant had been obtained. The railroad company had received, however, more for some of the land sold than the amount to which it was entitled. In order to adjust the matter to known present conditions, a plan was evolved to let the lands thus sold to innocent purchasers go to them as sold by the railroad company, but the railroad company, the grantee of the United States, should receive no more than provided for by the granting act, namely $2.50 per acre.
We are now dealing with substance and not form. No new sale was made by the United States to plaintiffs at $2.50 per acre. By the payment of that sum per acre by plaintiffs to the United States, a legal consideration for the conveyance was furnished, and the government was assured of receiving that much additional for the lands. All of the remainder in excess of $2.50 per acre was to be recovered by the United States upon an accounting by the railroad company. The amount to be received was all problematical. A decree for the payment of a fixed amount *11might never he satisfied. It does not seem to have heen contemplated by the parties interested in the compromise that the sales to innocent purchasers should be held for naught or canceled or in any way left out of the adjustment. Congress in authorizing the adjustment did not evince any such intention. As stated by Judge Wolverton upon a remand of these cases from the federal court (opinion not reported) :
“The Eailroad Company acquired patents for the land from the Government, but had contracted to convey in violation of a provision of the grant requiring sales to be made to actual settlers only, in quantities not exceeding one-quarter section to one person, and at prices not exceeding $2.50 per acre.
“It has been determined by the Supreme Court of the United States that this provision, which is contained in each of the two grants under which the patents were issued, is an enforceable covenant, which the Eailroad Company was. bound to perform. By reason of this provision, the Eailroad Company was unable to convey to the plaintiffs satisfactory title to the lands, as they had engaged to do under their contract.
“Pacing the predicament of losing their title, plaintiffs took advantage of the act of August 20, 1912, and by a compliance therewith title was confirmed in them by the Government on condition of their paying to the Government $2.50 per acre as required by the act.
“Plaintiffs paid to the defendant $7 per acre for the lands, and this action is to recover from the defendant the sum of $2.50 per acre, which they were required to pay in order to acquire a good and marketable title. * *
“It is plain that plaintiffs’ title thus confirmed is in no way in dispute. The only question that can arise is whether the plaintiffs, having sought confirmation under the act, thereby waived or abandoned any and all claims they might theretofore have had *12against the Railroad Company on account of the failure to convey a marketable title. This is a question not dependent upon any construction of the act; nor, as it respects the demand for reparation, upon any right, title, or immunity given or granted by it. It merely- depends upon the question whether, granting a compliance with the act, plaintiffs have abandoned or waived any right to relief they may previously have had against the Railroad Company on account of its failure or inability to convey a marketable title, as it had covenanted to do.”
The words of Judge Wolverto'n which we have emphasized, used after and in the light of the adjudication by the United States Supreme Court in the main case, would seem strange indeed if applied to a void contract which would “engage” nothing. As stated at the outset, and also by Judge Wolverton, the title of the plaintiffs obtained by their contract was confirmed in them by the government. To confirm means “to make firm or firmer, to establish, to strengthen,” and “to ratify”: Webster’s International Dictionary. When a sale upon execution is confirmed by the court, neither the sale nor the proceedings whereby it was obtained.are held void, but are ratified and established. This case of Hammond and Winton is not much unlike that of United States v. Winona & St. Peter Ry. Co., 165 U. S. 463 (41 L. Ed. 789, 17 Sup. Ct. Rep. 368, see, also, Rose’s U. S. Notes). This was a suit brought to annul a certification of lands (a certificate having the same-effect as a patent) for the benefit of the railroad company under a congressional land grant. Various purchasers from the railroad company were parties to the suit. By an act of Congress of March 2, 1896 (U. S. Comp. Stats., § 4901; 8 Fed. Stats. Ann. (2 ed.), p. 751), it was provided:
*13“But no patent to any lands held by a bona fide purchaser shall be vacated or annulled, but the right and title of such purchaser is hereby confirmed.”
It appeared that at the time the lands were certified by the Land Department, as well as at the date of the definite location of the road, which was the date which determined the status of the lands as falling in or excluded from the grant, the lands were subject to homestead entries and pre-emption filings. It was alleged and proved that the defendant purchasers bought from the railroad company without actual knowledge of these old entries and filings, but the government contended that the purchasers were charged with the constructive notice of the record in the local land office, and could not qualify as bona fide purchasers, and were therefore not entitled to the protection of the confirmatory act of 1896. The court rejected this contention and said:
“It is earnestly contended by the government: That the present holders of the title are not ‘ bona fide purchasers.’ That that term has a fixed and well-defined meaning, as announced in the frequent decisions of this and other courts. That, as said in 2 Pom. Eq. Jur., § 745: ‘The essential elements which constitute a bona fide purchaser are therefore three— a valuable consideration, the absence of notice, and presence of good faith.’ United States v. California etc. Land Co., 148 U. S. 31, 42 (37 L. Ed. 354, 13 Sup. Ct. Rep. 458, see, also, Rose’s U. S. Notes). That while two of these essential elements may be found, to wit, a valuable consideration and the presence of good faith, the third, the absence of notice, is lacking. That all men are conclusively presumed to know the law, and that, as the true rule of construction in reference to these grants was laid down by this court, the purchasers were bound to know such true rule. That the records of the land office disclosed the existence of these homestead entries and pre-emption *14filings, and therefore they who purchased from the railroad company knew, or at least were chargeable with knowledge, of the fact that those lands could not rightfully have been certified to the railroad company, but were excepted from the terms of grant, and in fact remained the property of the government. It is further insisted that, as' Congress in this statute used this well-understood expression, it intended only the protection of such parties, as came within the scope of this settled meaning. It is said that the only cases to be covered by this provision were those in which the state or the railroad company by presentation to the land, office, before the filing of the map of definite location, of a forged relinquishment by the pre-emptor, or one having made a homestead entry, or by some other fraudulent representations, secured a certification or patent to the tracts, and thereafter sold and conveyed to one who purchased in ignorance of the fraud.
“We are unable to agree with this contention of counsel, for several reasons: In the first place, the situation as- it was known to exist makes against any such narrow construction. While instances of such fraudulent conduct on the part of the state to which the lands were certified, or the company to which the lands were patented, might exist, yet in the nature of things they would be few, and hardly worth the special notice of Congress, while, on the other hand, the fact that there had been a difference between the land department and the courts, one construction obtaining in the former prior to the decisions by the latter, and the further fact that by this difference' of construction many tracts had been erroneously certified or patented, must have been well known to Congress, and naturally therefore a subject for its legislation.”
See, also, the case of United States v. Detroit Timber & Lumber Co., 200 U. S. 321 (50 L. Ed. 499, 26 Sup. Ct. Rep. 282, see, also, Rose’s U. S. Notes). The rule in regard to illegal contracts is plainly stated *15In the opinion in McMullen v. Hoffman, 174 U. S. 639, at page 654 (43 L. Ed. 1117, 19 Sup. Ct. Rep. 839, 845), as follows:
“The authorities from the earliest time to the present unanimously hold that 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. In cases of this kind the maxim is Potior est conditio defendentis.”
See Horseman v. Horseman, 43 Or. 83 (72 Pac. 698); Jackson v. Baker, 48 Or. 155 (85 Pac. 512); Kremer v. Earl, 91 Cal. 112 (27 Pac. 735); 6 R. C. L., p. 816, § 215. Let us take the language used in McMullen v. Hoffman, and see if it has been applied by the court that rendered that opinion or acted upon by the Congress of the United States in enacting the law which has been sustained by the federal Supreme Court. Did that court refuse to lend its assistance towards carrying out the terms of the contracts with Hammond and Winton and the Booth-Kelly Lumber Company? No. On the other hand, the government of the United States, through the instrumentality of its courts and Congress, said to these vendees, in effect, keep the land which you have innocently purchased, but the United States still has an interest therein which will be obliterated, and your title will be confirmed upon the payment of $2.50 per acre to the United States, under certain conditions, which were complied with by plaintiffs. This was very far from refusing to lend its aid in carrying out the terms of the sale or treating the contract of sale as a nullity. By means of such contract the vendee has, with the solemn sanction of the Congress and the courts of the United States, *16obtained exactly what they contracted to purchase-from the railroad company, at the further cost of $2.50 for what is analogous to an outstanding title.
The plan evolved by the Supreme Court of the United States is entirely at variance with the contention of the defendant, that the contract on the part of plaintiffs was a swindle, wicked, and illegal. The Congress and the court of the United States have not given it such a status in respect to the plaintiffs. The act authorizing the confirmation of. plaintiffs’ title, having had the approval of the court, has the effect of construing and applying the original ■ granting acts, and, as it was intended, is an adjustment and adjudication of the rights of plaintiffs under their contract of purchase. It is only for this court to consider it thus. It will be remembered that in the litigation between the United States and the Oregon and California Railroad Company the government took the position that the provisos relating to the sale of the granted lands to actual settlers constituted conditions subsequent annexed to the grants, and that the sales made contrary to these provisos operated to defeat the grants, and justified the United States in declaring a forfeiture and resuming title to all the lands, both to those which had been sold and those- which were unsold. In the suit involving the unsold lands, this contention was sustained by Judge Wolverton: United States v. Oregon & California R. Co. (C. C.), 186 Fed. 861. The Supreme Court of the United States came to a radically different conclusion: Oregon & California R. Co. v. United States, 238 U. S. 393 (59 L. Ed. 1360, 35 Sup. Ct. Rep. 908, see, also, Rose’s U. S. Notes). That court held that; every intendment in the construction of the grants was against the claim of forfeiture, *17and concluded that the provisos are not conditions subsequent, but covenants. The court notes the fact that no penalty is expressly prescribed for a breach of the covenants contained in the provisos. The court says:
“Our conclusions, then, on the contentions of the government and the railroad company, are that the provisos are not conditions subsequent; that they are covenants, and enforceable. * * ”
The court apparently held that there was no forfeiture by the railroad company of its unsold lands by reason of its sales, which were made in breach of the covenants contained in the provisos, and concluded as follows:
_ ‘ ‘ This, then, being the situation resulting from conditions now existing, incident, it may he, to the prolonged disregard of the covenants by the railroad company, the lands invite now more to speculation than to settlement, and we think, therefore, that the railroad company should not only be enjoined from sales in violation of the covenants, but enjoined from any disposition of them whatever, or of the timber thereon, and from cutting or authorizing the cutting or removal of any of the timber thereon, until Congress shall have a reasonable opportunity to provide by legislation for their disposition in accordance with such policy as it may deem fitting under the circumstances, and at the same time secure to the defendants all the value the granting acts conferred upon the railroads.
“If Congress does not make such provision the defendants may apply to the District Court within a reasonable time, not less than six months, from the entry of the decree herein, for a modification of so much of the injunction herein ordered as enjoins any disposition of the lands and timber until Congress shall act, and the court in its discretion may modify the decree accordingly.”
*18If, as the court stated, it is impossible to believe that Congress contemplated a forfeiture by the railroad company of its unsold lands on account of a violation of the provisos, it is also impossible to believe that Congress contemplated that plaintiffs and other like purchasers from the railroad company should forfeit all .moneys paid to the railroad company, and should take nothing by their contracts or deeds. Such a construction is not. in harmony with the just dealings by the United States court and Congress with the defendant railroad company, whose violations of the provisos have been numerous and willful. The patents to the lands issued to the railroad, by the United States contained no reference to the provisos respecting alienation contained in the granting acts. These patents named as the grantee, not the original grantee, the Oregon Central Railroad Company, but a stranger to the legislation of Congress, namely, the Oregon and California Railroad Company. The language of Mr. Justice Brewer in United States v. California & Oregon Land Co., 148 U. S. 31 (37 L. Ed. 354, 13 Sup. Ct. Rep. 458, see, also, Rose’s U. S. Notes), in speaking of the diligence required of a purchaser of titles founded on a patent of the United States, is peculiarly apt. He says:
“If a patent from the government be presented, surely a purchaser from the patentee is not derelict, and does not fail in such diligence and care as are required to make him a bona fide purchaser, because he relies upon the determination made by the. land officers of the1 government in executing the patent, and does not institute a personal inquiry into- all the anterior transactions upon which the patent rested.”
It is significant that in the act of 1912, granting to innocent purchasers'the right of perfecting their titles by the payment.'to the government of the sum of $2.50 per *19acre, the patent provided for to he issued by the Secretary of the Interior, was merely to convey “all of the right, title and interest of the United States” in the land. The act of August 20, 1912, known as the “Innocent Purchasers’ Act,” which authorized the compromise, provided that a purchase under the provisions of the act “shall operate as a compromise of any and all claims of the United States for waste or trespass upon any of said lands committed by such purchaser, defendant or defendants, or their successors or assigns respectively.” There was no attempt made to settle or compromise any question between the plaintiffs and the railroad company.
The plaintiffs, as they allege, being ignorant of the existence of any covenant affecting the disposition of these lands, in good faith and wholly innocent of any wrong, relying on such patents, contracted with the railroad company for the purchase of the lands. The defendant railroad company invokes the fiction that the plaintiffs were charged with the knowledge of the provisos contained in the acts of 1866 and 1870, and that therefore the contract of sale was unlawful and against public policy. We quote the language of Judge Gilbert in Oregon R. & Nav. Co. v. Dumas, 181 Fed. 781, 786 (104 C. C. A. 641, 646):
“A court should declare a contract void as against public policy only when the case is clear and free from doubt, and the injury to the public is substantial, and not theoretical or problematical.”
The acts of Congress indicate the public policy in the disposition of the lands, and it is to them as interpreted by the federal courts that we must look to determine that question.
In many instances of illegal contracts or transactions the parties are not deemed to be in equal fault, *20as there are degrees of wrong. A distinction has been taken between illegal contracts, both parties to which are equally culpable, and those in which, although both have participated in the illegal act, the guilt rests chiefly upon one. The maxim, “Ex dolo malo non oritur actio,” is qualified by another, namely, “In pari delicto melior est conditio defendentis.” Therefore, unless the parties are in pari delicto as well as participes criminis, the courts, although the contract is illegal, will afford relief where equity requires it, to the more innocent party, even after the contract has been executed. Such cases form an independent class, entirely distinct from those cases which rest upon a disaffirmance of the contract before it is executed. But as in the case of the repudiation of an executory illegal contract the recovery is had, not under, but independently of, the contract which is treated as a nullity. The first cases in which the principle was applied were naturally those where the statute violated by the contract was intended for the special protection of the party seeking relief from some undue' advantage taken by the other. But it soon came to be seen that the principle wasN equally applicable to cases where the law infringed was intended for the protection of the public in general: See 6 R. C. L., p. 833, § 223. If it be considered that the plaintiffs had constructive notice of the provisos contained in the granting acts referred to, then it would seem that the federal court and Congress deemed the plaintiffs "to be not in pari delicto with the defendant, and therefore entitled to relief.
Much is said in both of these cases in support of the position of the defendants, in criticising the acts of plaintiffs in completing the payments after suit was brought by the United States. The plaintiffs *21could do but one of two things; either make a small payment to complete the purchase, or subject themselves to the contention by defendant that they had not complied with their contract and were entitled to nothing. The matter was then wholly at sea, and any novice in legal matters would advise plaintiffs to take the course they did.
The demurrer to the complaint should be overruled.
The judgment of the lower court is therefore reversed, and the cause remanded for such further proceedings as may be deemed necessary, not inconsistent herewith. Reversed and Remanded.
McBride, C. J., and Benson, Harris and Johns, JJ., concur. Burnett, J., concurs in the result. Mr. Justice Bennett, who heard the case, having resigned, did not participate in the decision.