The opinion of the court was delivered by
Hadley, J.Appellants are now, and prior to the 13th day of July, 1886, were, husband and wife. On and prior to the date above named they were the owners of cer*43tain real estate situated in Kittitas county, Washington, and on said date, they executed and delivered to the respondent Thomas Johnson a written instrument, denominated a “bond for deed,” which was of the following tenor and effect: In consideration of the sum of $1, and the further efforts of said Johnson to secure the establishment of a railroad depot by the Northern Pacific Railway Company upon section 26 in township 20 N., range 15 E., W. M., the appellants obligated themselves to convey unto said Johnson, by good and sufficient warranty deed, a one-half interest in the real estate to which reference ivas first above made. They further obligated themselves that within ten days after said Johnson should give them reasonable assurance of the establishment of such depot within the boundaries of said section, and after the platting of the whole or any portion of the land described in the written instrument into residence and business lots and blocks, they would convey to the order of said Johnson each alternate quarter block of lots so platted. They further agreed that at any time within one year from the surveying and platting of the first part or parcel they would, upon notice from Johnson, in like manner convey each alternate quarter block of lots that should within that time he platted, in addition to the part that should be first laid out. The expense of surveying, platting, and recording was to be borne by Johnson, and appellants were to continue the occupancy and use of those portions of the land which should remain unplatted. On or about the 26th day of July, 1886, about 65 acres of the tract covered by the aforesaid agreement was platted under said agreement, and designated as the “Town of Ole Elum.” Thereafter, on the 2d day of August, 1886, a further agreement was executed and signed by appellant Walter J. Keed and respondent Thomas Johnson, as follows :
*44“For the mutual advantage and accommodation of the parties hereto, it is hereby agreed that for ninety days from and after this date, and so much longer as may be mutually agreeable to the parties concerned, the division of lots, by quarter blocks, in the town of Cle Elum, Wash. Terr., contemplated and provided for in that certain bond for deed, executed and delivered by Walter J. Reed and Barbara A. Reed, his wife, to Thomas Johnson, shall be, and hereby is, deferred, and that pending the termination of this agreement through lapse of time or mutual consent the sale of lots in the town aforesaid shall be conducted indiscriminately; the proceeds being divided equally between the said Walter J. Reed and Thomas Johnson, their heirs, legal representatives, or assigns. Upon termination of this agreement as above provided, the division of lots provided for, by quarter blocks or fractional parts thereof, shall then be made, in so far as practicable, according to the terms and conditions of the bond for deed hereinbefore referred to.”
The appellants brought this suit against respondents, and in the complaint allege that the lands platted as above stated, and known as the “Town of Ole Elum,” are the only lands that have been platted under the said contracts between the parties. It is also averred that appellants, since the execution of said contracts, have paid out large sums of money from their own personal funds forthemaintenance and benefit of the town site so platted, which sums have not been repaid to them by any one or in any way, and which are a charge against said platted town site and the proceeds thereof; that appellants have advanced said Thomas Johnson large sums of money at divers times since July 26, 1886, on account of the interest of respondents in said town site under said contracts, which amounts were to be charged against the interests of respondents therein, and the same have not been paid; that said Thomas Johnson has received large sums of money from *45the sales of lots in said town, site, and from other sources in connection therewith, said sums being in excess of his just proportion, and for which excess he is now indebted to appellants, the same being a just and proper charge against the interests of respondents'; that appellants have at all times been ready and willing to comply with all the terms and conditions of said contracts to be by them performed, and have frequently demanded of respondent Thomas Johnson that the accounts between him and them on account of the said town-site transactions be balanced and closed; that the lands be divided according to the terms of said contracts, and that the contracts be terminated; that said Johnson refuses to malm a settlement of said accounts, or permit a division of said lots to be made according to the terms of said contracts and wrongfully holds said contracts as a cloud on the title to all of the lands described in said original agreement, whether the same are platted and subject to said agreement, or whether they are unplatted and not subject thereto, all of which is alleged to be to the great injury and detriment of appellants. It is alleged that the respondent Ann Johnson claims some interest in said property under said contracts as the wife of said Thomas Johnson. The complaint prays that an accounting be taken between the parties; that the accounts thereof be settled, stated, and closed; that a proper division and partition of the lots in said platted town site be made; and that said contracts be terminated and canceled. The respondents answered the complaint by way of denials, and also by way of an affirmative defense and cross complaint. In the cross complaint it is alleged, in addition to the facts alleged in the complaint concerning the contracts and the platting of lands thereunder, that on the 30th day of April, 1888, and on the *469th day of May, 1899, respectively, further and additional plats were filed upon other portions of said lands not included in the first plat, which is the only one described in the complaint. It is also alleged that, since the execution of said agreement and said original plat and supplemental plats, appellants have made sales of a large portion of the lots and blocks in the town of Ole Elum, have made conveyances thereof, and have received large sums of money therefor; that portions of the moneys so received have from time to time been paid to the respondent Thomas Johnson, but much less than his just proportion thereof; that said Johnson has paid out on account of said lands large sums of money for taxes, surveying, and platting,- and other expenses incident thereto, which sums have not been repaid, and are a charge against said lands and the proceeds thereof; that said Johnson has at various times since July, 1886, advanced to appellant Walter J. Reed large sums of money. It is alleged that respondent Thomas Johnson has at all times been ready to comply with all the conditions of said agreement and supplemental agreement to be by him performed, and has demanded of appellant Walter J. Reed that the accounts between them be settled, and that said lands, both platted and unplatted, be divided according to the terms of said agreement, which demand has been refused by said Reed. The cross complaint asks an accounting, and also a conveyance to respondents of one-half of all unsold portions of said land, both platted and unplatted. The answer to the cross complaint denies many of these allegations, and affirmatively pleads the statute of limitations as to all demands stated in the cross complaint which do not relate to the cause of action, and demands arising out of the original plat described in the complaint as the “Town of Ole Elum.” Upon the issues thus formed the parties went to trial. The *47cause was tried by tbe court without a jury, and resulted in a decree to the effect that upon the issue raised by the respective demands for an accounting there was no balance owing to either party, but that respondents are entitled to a conveyance of one-half of all the unsold lots and blocks included within the three plats named, and also one-half of the unplatted portion of said lands. From said decree this appeal is prosecuted.
No error is assigned as to the finding of the court on the question of accounting. It is assigned as error that the court granted the demands of respondents as to any lands outside of the original plat of the town site of Ole Elum, and also that the court refused to find that respondents were barred by the statute of limitations as to any demands concerning lands outside of said original plat. We will, however, confine ourselves to the discussion of the following assignment of error:
“The court erred in decreeing the conveyance of any of the lands mentioned in the contract on July 13, 1886, for the reason that said contract is void because of uncertainty, lack of mutuality, want of consideration, and as being against public policy.”
It will be remembered that the consideration for the original agreement between the parties was stated to be the efforts of respondent Thomas Johnson to secure the establishment of a railroad depot by the Northern Pacific Railway Company within the boundaries of the same section which included the lands of appellants. The respondent Johnson stated in his testimony that he had an agreement with three officers of the Northern Pacific Railway Company by which each was to receive a one-fourth interest in the proceeds of whatever lots appellants would convey under their said agreement with Johnson. The consideration for the agreement between these officers and *48Johnson was that the officers were to- cause the depot te he established within the section above named. This arrangement between Johnson and the officers of the railroad company was entered into before the contract between Johnson and appellants was executed. Johnson testified as follows:
“Q. In regard to the interest which Huson and Buckley and Bullock had, — how did that in any way affect the interest of Mr. Reed ? A. It didn’t affect him any. Q. In whose interest did they have an interest? A. In mine. I gave them one-eiglith of all the money that I got until after the railroad was complete, in ’88, for their services in the railroad line and putting the depot at Cle Elum. Q. Mr. Johnson, what was the com sideration which you gave Mr. Reed for entering into this contract ? A. I gave him consideration that I would have a depot there established. I would have the railroad line, changed from the west side on the south over on that side, which I did, and had to pay for it, though. Q. Row, who had any interest in this, besides yourself, in this deal with Reed? A. During all that time, Mr. Bogue and Iluson. Q. Any one else? A. Mr. Bullock. Q. And you accounted to them for half the money that you got ? A. I accounted to them for one-eighth of the money, — • each one of them. . Q. Mr. Johnson, you stated that certain gentlemen connected with the Northern Pacific Railway Company had an interest with you in those lots. Has that- interest been extinguished? A. They had no interest in the lots with me; they had an interest in the money that I got for the sale of lots at the time they were building the railroad. Q. They had an interest for whatever lots you should sell while they were building? A. While they were building, they got their money on it. Q. That is all the interest ? A. That is all the interest they had. Q. Whether that would he one lot or ten lots, they should have an interest in whatever money ? A. Each one of them had an interest in one-eighth of the money that we took in for the sale of the lots. Q. Did you make this agreement before or after you made *49your contract with Reed? A. I think it was before. Q. Did they have any interest in any unplatted portions of this land? A. They had no* interest in any of the ground, but the money that we sold lots for. If we sold the whole thing, they got, each of them, an eighth. Q. That was the extent of the contract? In other words, they took you for one-half of the money, — all your interest from the sale of the lots during the time the railroad was being constructed ? A. Ho; they didn’t take my half of the money, at all. Q. One-half of the interest ? A. They took — My interest was divided into four parts. The sale of the lots was divided into four parts, and the money was divided. Q. During the time the railroad was being constructed from where ? A. To Tacoma, from where it was already built to. Q. The amount of their interest depended upon the length of time they were to keep the railroad building ? A. We were not very particular about it. We didn’t stick them right down to it. They got a good deal of money after the railroad was built.”
The above testimony was undisputed. Appellants proposed the following finding of fact based upon said evidence :
“That the agreement hereinbefore mentioned was entei’ed into by the said Thomas Johnson for axxd on behalf of certain officers of the Horthern Pacific Railroad Company, who then had charge of the construction of the line of railway of the Horthern Pacific Railroad Company, through axxd near said lands, axxd that the consideration of said contract was that said officers having charge of the location of said line of railway shoxxld locate the depot of said railway company within the limits of said tract of land.”
Said proposed finding was by the court refused, and exceptioxx thereto was taken. Appellants also proposed the followixxg conclusion of law:
“That said agreement aforesaid having been made for and on behalf of the officers of a public corporation known as the Horthern Pacific Railroad Company, and whose *50duty it was to locate depots at such points as would suit the public needs and convenience, and the sole consideration for said agreement being the location of said depot for the use of the public upon the above-described lands, the said agreement was and is without consideration and void.”
Said proposed conclusion was refused, and exception was thereto taken. In refusing to make said finding and conclusion, we think the court materially erred. The respondents by their cross complaint were asking for a specific performance of the contract, by decreeing a conveyance to them of the lands claimed by them under their contract. Before they are entitled to the relief of specific performance, it must appear that the contract which they seek to enforce has all the elements of an enforceable contract. If the contract is illegal and void for reasons of public policy, specific performance will not be enforced.
“Equity will not assume jurisdiction to compel the specific performance of a contract that is illegal in any of its features. If the nature of the contract is such that its enforcement would be in violation of public policy, specific performance will not be granted. The least taint of illegality or want of equity will preclude a decree.” 22 Am. & Eng. Enc. Law, p. 1014, par. 4.
Was the contract between the parties here such as is contemplated in the above statement of the law ? It is a general rule that contracts which tend to place the officers of a corporation under an inducement to disregard their duties to the corporation, and to decide questions affecting the action of the corporation from a standpoint other than that of the best interests thereof, are illegal and void. The evidence in this case discloses that certain officers of the Northern Pacific [Railway Company, in consideration that they should receive a portion of the pro*51ceeds of sales of appellants’ lands, agreed to so locate the line of said road that it would run through the section 26 described in the contract between these parties, and further agreed to erect a depot within said section. The testimony of Johnson is to the effect that the company contemplated building its line upon another route; but, by reason of the inducement above stated, the officers having in charge the location of the line and depot determined to change the route and locate both the tracks and depot upon said lands. It is manifest that such a personal inducement acted upon by the officers of the company, having in view their private gain, would not leave them free to act in all respects as might best subserve the interests of the corporation with whose interests they were intrusted. It is urged by respondents that the officers of the company were not parties to this contract. It is true, they are not named in the contract; but it appears from the evidence in the case that before Johnson made the agreement with appellants these officers had negotiated with Johnson to the effect that, if he should procure such a contract from appellants, they would, in consideration of sharing in its benefits, make the location of the depot within said section. Johnson had no power to make the location. The persons who held that power agreed to make it if Johnson would procure certain specified compensation for them from appellants. In making the contract, Johnson, in effect, occupied the position of one simply acting between the principal parties concerned. In the arrangement that was made, Johnson stood in the position of a trustee for the officers, since he was to account to them for a specified share of the proceeds of all lands sold. We believe the relations of the officers of the company to this contract were such as east upon it the taint of illegality, and rendered it void as being against *52public policy, under the authorities we shall hereinafter discuss. This is true even though the contract, upon its face, appears to have been made with Johnson alone. The officers’ interests in the results of the contract aggregated three times as much as the interest of Johnson, and from that fact, together with the further fact that the necessary power to act in the premises resided with the officers, it follows logically that Johnson must have been entirely under the control and direction of the officers, and he therefore became particeps criminis in the illegality of the transaction.
In the case of Bestor v. Wathen, 60 Ill. 138, a contract was involved which was similar to the one here under consideration. The construction firm that was building the railroad, together with the president of the railroad company and another of its directors, and also its construction agent, entered into a contract with the owners of 160 acres of land situated where the road then in process of construction was expected to cross the Illinois.Central Railroad, by the terms of which the owners agreed to sell the first-named parties an interest in the land. Ro money was to be paid by the purchasers, but the land was to be laid out into town lots and sold. The first proceeds of the same, to the amount of $4,800, were to be retained by the owners, and when this sum was received they were to convey to the other parties an undivided half of the residue of the land. The only consideration for the agreement was that the so-called purchasers should “aid, assist, and contribute to the building up of a town on said land.” Precisely as is sought by the cross bill in this case, the so-called purchasers in. that case brought suit against the owners of the land, asking for an account of sales, and for conveyance of an undivided half of the lots unsold. The court refused to enforce the contract and *53dismissed the bill. The language of the court in discussing the principle involved is of great emphasis and weight. The necessary space forbids an extensive quotation from the opinion, but the following extract is particularly pertinent :
“A court of equity will not enforce a contract resting upon such official delinquency, or even tending to produce it. Such is the character of the contract before us. If we enforce it, we lend the sanction of the court to a class of contracts the inevitable tendency of which is to make the officers of these powerful corporations pervert their trusts to their private gain at the price of injury at once to the stockholders and to the public. Rendered into plain English, the contract in this case was a bribe on the part of Wathen and Gibson to the president and other officers of the railway company, and to the contractors who were building the road, of an undivided half of one hundred and sixty acres of land, in consideration of which the road was to be constructed on a certain line and a depot built at a certain point. ... In this particular case no wrong may have been done, and yet public policy plainly forbids the sanction of such contracts because of the great temptation they would offer to official faithlessness and corruption.”
The principle adopted in the above case is sustained by the following authorities: Fuller v. Dame, 18 Pick. 472; Holladay v. Patterson, 5 Ore. 177; Bliss v. Matteson, 52 Barb. 335; Berryman v. Trustees of Cincinnati Southern Railway, 77 Ky. 755; West v. Camden, 135 U. S. 507 (10 Sup. Ct. 838) ; Woodstock Iron Co. v. Richmond & D. Extension Co., 129 U. S. 643 (9 Sup. Ct. 402). In the last-named case the court said:
“The business of the extension company was one in which the public was interested. Railroads are for many purposes public highways. They are constructed for the convenience of the public in the transportation of persons and property. In their construction without unneces*54sary length between designated points, in their having proper accommodations, and in their charges for transportation, the public is directly interested. Corporations, it is true, formed for their construction, are private corporations, but whilst their directors • are required to look to the interests of their stockholders, they must do so in subordination to and in connection with the public interests, which they are equally bound to respect and subserve. All arrangements, therefore, by which directors or stockholders or other persons may acquire gain, by inducing those corporations to disregard their duties to the public, are illegal and lead to unfair dealing, and thus being against public policy will not be enforced by the courts.”
It will be noted that the language of the above opinion not only applies the rule to directors or stockholders and declares that all arrangements by which they may acquire gain by inducing these corporations to disregard their duties to the public are illegal, but also applies the same rule to “other persons;” the words being particularly applicable to the claim made in this case that Johnson, not being, an officer of the railway company, is .entitled to have his contract enforced. Further addressing ourselves to the last-named point, we refer to the case of Embrey v. Jemison, 131 U. S. 336 (9 Sup. Ct. 776). The contract involved in that case was a wagering contract, and it was held that the^broker who negotiated between the parties for the purpose of entering into the illegal agreement was particeps criminis, and could not recover for services rendered or losses incurred by himself on behalf of either in forwarding the transaction. In the case of Armstrong v. Toler, 11 Wheat. 258, the following instruction was given to the jury below:
“That where the contract grows immediately out of, and is connected with, an illegal or immoral act, a court of justice will not lend its aid to enforce it. And if the *55contract be, in fact, only connected with, the illegal transaction, and growing immediately out of it, though it be in fact a new contract, it is equally tainted by it.”
The instruction was sustained by the supreme court of the United States in an opinion rendered by Mr. Chief Justice Marshall. The learned jurist says the law was correctly -stated by the trial court. To the same effect are the following cases: Barton v. Port Jackson, etc., Plank Road Co., 17 Barb. 397; Deans v. McLendon, 30 Miss. 343; Howell v. Fountain, 3 Ga. 176 (46 Am. Dec. 415); Branch v. Haas, 16 Fed. 53; Gunter v. Leckey, 30 Ala. 591; Buck v. Albee, 26 Vt. 184 (62 Am. Dec. 564); Bartle v. Coleman, 4 Pet. 184; 15 Am. & Eng. Enc. Law (2d ed.), 992.
It cannot be successfully urged that appellants have waived objection to the illegality of this contract by not specially pleading the same. . The nonenforcement of illegal contracts is a matter of common public interest, and a party to such contract cannot waive his right to set up the defense of illegality in an action thereon by the other party. It is not necessary to specially plead the defense of illegality, but, when the same is made to appear to the court at any stage of the case, it becomes the duty of the court to refuse to entertain the action. The above statements of the law are sustained by the following cases: Oscanyon v. Arms Co., 103 U. S. 261; Coppell v. Hall, 7 Wall. 542; Cardoze v. Swift, 113 Mass. 250; Wilde v. Wilde, 37 Neb. 891 (56 N. W. 724) ; Sheldon v. Pruessner, 52 Kan. 579 (35 Pac. 201, 22 L. R. A. 709); Craig v. Missouri, 4 Pet. 410 ; Johnson v. Hulings, 103 Pa. St. 498 (49 Am. Rep. 131); Wight v. Rindskopf, 43 Wis. 344; Kreamer v. Earl, 91 Cal. 112 (27 Pac. 735) ; Morrill v. Nightingale, 93 Cal. 452 (28 Pac. 1068, 27 Am. St. Rep. *56207); Schmidt v. Barker, 17 La. An. 261 (87 Am. Dec. 527) ; Claflin v. Credit System Co., 165 Mass. 501 (43 N. E. 293, 52 Am. St. Rep. 528) ; Richardson v. Buhl, 77 Mich. 632 (43 N. W. 102, 6 L. R. A. 457). 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. 1 Warvelle, Vendors, p 162, § 4; Durkee v. People, 155 Ill. 354 (40 N. E. 626, 46 Am. St. Rep. 340) ; Brown v. First National Bank, 137 Ind. 655 (37 N. E. 158, 24 L. R. A. 206); Pullman's Palace Car Co. v. Central Transportation Co., 171 U. S. 138 (18 Sup. Ct. 808.) While one is not estopped to raise the illegality of a contract, yet he is not entitled to recover for losses thereunder. In Howell v. Fountain, supra, the court said:
“The law leaves the parties to such a contract where it found them. If either has sustained a loss by the bad faith of a particeps criminis, it is but a just infliction for premeditated and deeply-practiced fraud; which, when detected, deprives him of anticipated profits, or subjects him to unexpected losses. He must not expect that a judicial tribunal will degrade itself by an exertion of its powers, by shifting the loss from one to the other, or to equalize the benefits or burdens which may have resulted by the violation of every principle of morals and of laws.”
The trial court found that neither party was entitled to recover anything upon an accounting, which was fight. But in the light of the foregoing authorities, that portion of the court’s findings and judgment which awarded and decreed specific performance in favor of respondents must be set aside. To that extent the judgment is reversed, and the cause remanded, with instructions to the lower court to modify the judgment to the extent of decreeing that the *57contracts between appellants and respondents dated, respectively, July 13, 1886, and August 2, 1886, shall be canceled and terminated, and shall be removed and extinguished as a cloud upon the title of appellants to the unsold portions of the lands described therein.
Reavis, C. J., and Fullerton, Dunbar, Anders, and Mount, JJ., concur. .