#### St. Louis, Jacksonville and Chicago Railroad Company *v.*Juliet M. Mathers.

*Filed at Springfield September 28,1882.*

1. • *Chancery—illegal contract will not be enforced.*Where property is conveyed to trastees in trust, for the benefit of a railroad company, under a contract which is contrary to public policy, and illegal, a court of equity will not aid either party in any effort he may make to reap the benefits which may flow from such illegal contract.

2. So, where the owner of lots conveyed the same in trust, for the benefit of a railroad company, in consideration of the illegal agreement of the company not to establish any depot or station within three miles of a certain place on its road, and the trustee afterward reconveyed the property back to the grantor, it was *held,*that the company could not maintain a bill to have the lots sold for its benefit, and have the same again conveyed to a trustee for its benefit, nor could it claim the right to have the taxes paid on the lots made a charge thereon for its reimbursement.

3. In determining whether a contract is illegal, the entire contract on both sides will be considered, and if the consideration is illegal, no part 'of it will be enforced. One part can not be disregarded and the other enforced.

4. *Same—reimbursing party for taxes paid by mistake.*If a party pays taxes on land which belongs to another, under the mistaken belief of ownership, a court of equity will not grant him any relief by which he may be reimbursed the sum paid.

Appeal from the Appellate Court for the Third District;— heard in that court on appeal from the Circuit Court of Morgan county; the Hon. Cybus Epleb, Judge, presiding.

Messrs. Beown, Kirby & Bussell, for the appellant:

The court below erred in rendering the decree dismissing complainant’s bill. This court has very plainly decided that the evidence was incompetent to affect the validity of the deed of April 25, 1860. *St. Louis, Jacksonville and Chicago R. R. Co.*v. *Mathers,*71 Ill. 572.

*258A condition in a grant which! is contrary to the policy of the law, is void. *Doe dem. Mitchinson*v. *Carter,*8 T. R. 61.

If the condition subsequent be against the law, the estate of the grantee being once vested is not thereby divested, but it becomes absolute, and a court of equity will never lend its aid to divest an estate for the breach of a condition subsequent. 4 Kent’s Com. (5th ed.) 130; 1 Washburn on Real Prop. 447.

The court below should at least have charged the land in question with the taxes paid on it by appellant. The rule is, that when one, in good faith, believing himself to be the owner, either in law or in equity, of a piece of land, has made necessary and valuable improvements thereon, upon the defeat of his title should be reimbursed for his outlay. *Union Mutual Ins. Co.*v. *Campbell,*95 Ill. 267; *Smith et al.*v. *Knoebel et al.*82 id. 392; *Kinney et al.*v. *Knoebel,*51 id. 114.

Messrs. Mobbison, Whitlock & Lippincott, for the appellee:

The deed of April 25, 1860, and the resolution of May 2, i860, are parts of the same transaction, and were construed together in *St. Louis, Jacksonville and Chicago R. R. Co.*v. *Mathers,*71 Ill. 592.

The complainant and defendant were equally involved in an unlawful combination, and a court of equity will assist neither. *Craft et al.*v. *McConoughy,*79 Ill. 346; *Jerome*v. *Bigelow,*66 id. 452; *Henderson*v. *Palmer,*71 id. 579; *Paton et al.*v. *Stewart,*78 id. 481; *Parsons*v. *Elby et al.*45 id. 232; *Lyon*v. *Culbertson,*83 id. 33; *DeWolf*v. *Pratt,*42 id. 148; 1 Story’s Eq. Jur. secs. 297, 298.

If the court can,, upon equitable principles, compel the payment of the sums paid for taxes by appellant, it can, on the same principles, enforce the performance of the contract. *Craft et al.*v. *McConoughy,*79 Ill. 344; *Neustadt*v. *Phillippi,*54 id. 309; *Jerome*v. *Bigelow,*66 id. 452.

*259Mr. Justice Craig

delivered the opinion of the Court:

The principal facts presented by this record were before this court at the January term, 1874, in the case of *St. Louis, Jacksonville and Chicago R. R. Co.*v. *Mathers,*reported in 71 Ill. 592. In the case cited, Mathers filed a bill to compel the trustees, who held the legal title to the lots in question, to convey to him, on the ground that the railroad company had disregarded the contract under which it obtained the conveyance. Since the decision was rendered, the trustees,’ of their own accord, conveyed the property to John Mathers, -and this bill was brought by the railroad company to obtain a decree for a sale of so many of the lots as may be necessary to pay taxes which have been advanced by it, and to pay for the erection of a freight house, side track, etc., and if any of the lots remain, that Mathers be required to convey them to a trustee to be designated by the court. On a hearing in the circuit court, a decree was rendered dismissing the bill, which, on appeal, was affirmed in the Appellate Court.

The consideration for the conveyance to the trustees named in the deed was, that no depot or station should be established within three miles of Ashland. The board of directors of the railroad company adopted a resolution accepting the donation of the property upon these terms and conditions. When the case was here before, the contract was held to be illegal and it was held that a court of equity would not lend its aid to enforce the performance of such a contract. In deciding the case it was said : “A court of equity will not lend its aid to enforce the performance of a contract which appears to have been entered into by both the contracting parties for the express purpose of doing that which is illegal; and where such a contract has been executed by one of the parties by conveying real estate, a court of equity will not, in general, interfere, but will leave the title to the *260property where the parties have placed it. ” This was said in the case when Mathers undertook, by a bill in equity, to obtain a reconveyance of the property on the ground that the railroad company had failed and refused to abide by the agreement under which the property was conveyed. Mathers now has a deed of the property, and the railroad company call upon a court of equity to restore the property back to it, or, what is the same thing, order it sold, and give the railroad the proceeds of such sale. What was said when the case was here before, may with propriety be said again. The same principles of equity which controlled before must govern now. The contract under which the property was conveyed for the benefit of the railroad company was contrary to public policy, and illegal, and a court of equity will not aid either party in any effort they may make to reap the benefits which may flow from such illegal contract. Had the property been conveyed to the railroad company in such' a manner that it could have converted it without the aid of the courts, then the company would have reaped the benefits of the conveyance, although the contract under which the property was conveyed was illegal; but when the company call upon a court of equity to assist it in holding the property or reclaiming it, a different rule prevails. Courts of equity do not assist parties to enforce illegal contracts, but will leave them in the position they have placed themselves.

But it is suggested that the resolution of the railroad company under which the conveyance was made is in the nature of a condition subsequent, and being void, the deed took effect as an absolute, unconditional conveyance, upon the terms specified in the deed, and that the railroad is entitled to relief against the subsequent diversion of the land. So far as this action is concerned, we do not regard it material whether the resolution is to be considered in the nature of a condition subsequent or not. The resolution, which specifies the terms *261and conditions of the conveyance, is a part and parcel of the contract under which the legal title to the property passed to the trustees,—grantees in the deed of conveyance. The complainant, in order to obtain relief, must show itself free from the taint of the illegal contract. This it can not do. It was not a purchaser of the property for value. It paid no consideration for the property. Its title came by and through an illegal contract, and one-half of that contract can not be disregarded and the other half enforced, but when a court of equity is called upon to grant affirmative relief, the whole contract will be considered, and if it appears to be illegal, the court will deny relief, and leave the parties where they have placed themselves by their illegal bargains.

The company has paid taxes on the property, and the amount thus paid, with interest, it is contended, ought at least to have been charged upon the property. It is unfortunate for the company that it has paid the taxes on this property, but we are not aware of any authority which would justify a court of equity in making the amount paid a charge on the land. We have no doubt that many cases have occurred where parties have paid taxes on land under the belief of ownership, and it afterwards turned out that the land belonged to another, and yet we are not aware of any instance in which the party who has thus paid out his money has been relieved in equity.

The decision of the Appellate Court will be affirmed.

*Judgment affirmed.*