
6 Ill.2d 194 (1955)
127 N.E.2d 489
JULIUS LALEMAN, Appellee,
v.
URLANIE CROMBEZ et al.  (MARY L. HERMANS, Exrx., et al., Appellants.)
No. 33319.
Supreme Court of Illinois.
Opinion filed June 16, 1955.
*195 SHERWOOD L. COSTIGAN, of East Moline, and BELL, FARRAR & SCOTT, of Rock Island, for appellants.
SIDNEY S. DEUTSCH, of Rock Island, for appellee.
Reversed and remanded.
Mr. JUSTICE SCHAEFER delivered the opinion of the court:
Julius Laleman brought an action against the executrix of his deceased wife's will and her legatees to partition real property in her estate in which he claimed an undivided half interest as the surviving spouse. None of the legatees appeared. An answer filed by the executrix was stricken *196 on plaintiff's motion, and a decree was entered in his favor, from which she appeals. A freehold is involved.
In 1936 the plaintiff and his wife, who were then living apart, concluded a separation agreement. The property involved in this litigation was not mentioned in the agreement, and apparently it was acquired by the plaintiff's wife at a later time. By the agreement, plaintiff's wife quit-claimed to him her interest in certain property which was originally owned solely by him but which was put into joint tenancy upon their marriage and subsequently improved by expenditures from the individual funds of each party. There was a grocery store on this property, and the fixtures and merchandise had also been paid for out of the individual funds of each of the parties. The separation agreement provided that these goods and fixtures should belong to the plaintiff. The agreement further recited that he had paid $2000 to his wife in consideration for which she waived her rights in any property which he then owned or should later acquire. He also waived his rights in any property which she then owned or should later acquire. By another clause in the contract plaintiff's wife agreed that he was not to pay her any money for her support, and that she was to contract no debts in his name. The sole issue on this appeal is whether plaintiff's surrender of rights in his wife's estate is rendered unenforceable by the fact that the agreement in which it was contained also included the provision by which his wife released him from his duty to support her. The plaintiff maintains that the latter promise is invalid and that the entire agreement is therefore void.
It is not questioned that a husband and wife may make a valid separation agreement by which one or each of them releases all his rights in the other's property, including inchoate rights of inheritance and dower. The consideration for such a release may be either a present payment or a similar release executed by the other party. Lyons v. Schanbacher, 316 Ill. 569; cf. Weinebrod v. Rondenburg, *197 343 Ill. 318; Edwards v. Edwards, 267 Ill. 111; Carling v. Peebles, 215 Ill. 96.
Difficulty arises, however, with regard to the effect of provisions in these agreements relating to the support of the wife during her husband's lifetime. It was stated in French v. French, 302 Ill. 152, that a provision for periodic payments designated as for support was valid, but that it did not preclude an action for separate maintenance, at least where the husband had breached the agreement, and in Reighley v. Continental Illinois Nat. Bank and Trust Co. 390 Ill. 242, where a similar provision was involved, it was indicated that an action on the contract itself would be proper. See also VanKoten v. VanKoten, 323 Ill. 323, 326.
Several cases have been before this court in which the agreement, while providing for a present transfer of money or property to the wife, contained no provision expressly providing for her support, and in which she completely relinquished any claim thereto. In those cases it has been held that she is not barred by her covenant from bringing an action for separate maintenance. (VanKoten v. VanKoten, 323 Ill. 323.) It has further been held, however, that the inclusion of such an express waiver of support also renders the remainder of the agreement unenforceable. Thus the wife is precluded from bringing an action on the agreement itself (Berge v. Berge, 366 Ill. 228,) and either the wife or the husband may avoid a provision in the agreement releasing his or her rights of inheritance in the other's estate. (Lyons v. Schanbacher, 316 Ill. 569; Lagow v. Snapp, 400 Ill. 414; but cf. Kohler v. Kohler, 316 Ill. 33.) These cases do not appear to turn on the adequacy or inadequacy of the agreement in providing for the wife, but rather on the presence of an express waiver of all rights to support other than what the agreement provides. See Threw v. Threw, 410 Ill. 107; but cf. In re Moser, 145 Fed.2d 523.
*198 Plaintiff relies on these decisions, and particularly on the Lyons case, as controlling decision here. The defendant, on the other hand, cites our decision in Vock v. Vock, 365 Ill. 432, where it was held that a wife who had separated from her husband by mutual consent could not obtain a decree for support, and suggests that the provision for release of support therefore is not invalid but at most superfluous. The Vock case, moreover, taken with the other decisions referred to, creates a situation where the wife cannot recover support either under the agreement or by repudiating it.
From the fact that a total surrender of the right to support is unenforceable it does not follow that the inclusion of such a provision must always make unenforceable a release of rights of inheritance. It may be conceded for argument's sake that during the lifetime of the parties the wife's promise not to demand support can supply no consideration for a husband's promise not to assert a claim in her property, so that his promise in turn becomes unenforceable. But that principle has no application here, where the plaintiff has already enjoyed the maximum benefits of his wife's release.
Plaintiff's contention rests on the broader theory that his wife's promise not only did not bind her during her lifetime, but was illegal, and that the invalid provision makes the entire agreement void. In our opinion that formulation loses sight of the purpose of denying enforcement to a promise on the basis of illegality. Opinions often say metaphorically, "That which is bad destroys that which is good and both perish together." (Lyons v. Schanbacher, 316 Ill. 569, 574.) But what is actually involved is a determination as to whether or not the public policy objective requires that the particular relief sought in the case then before the court should be denied. In many cases it is of course true that enforcement must be denied, as in those situations where to allow recovery would permit a party *199 to benefit from conduct in contravention of public policy. Cf. Schnackenberg v. Towle, 4 Ill.2d 561.
Where refusal to enforce the promise would not advance the public policy involved, however, the parties are held to the terms of their contract. This is illustrated by Central Republic Trust Co. v. Evans, 378 Ill. 58. There an action was brought by a bank upon a promissory note, and one of the defenses raised was that the note was given in pursuance of an illegal conspiracy by the payee and its officers to engage in branch banking. In discussing that contention the court stated on pages 71-72, "Public policy also lies at the base of the law in regard to enforcing illegal contracts, and the rule is adopted not for the benefit of the parties to the contract, but to the public. We have held public policy requires banking laws should be construed with the object of protecting depositors and the public. * * * Public policy frequently requires the enforcement of a contract tinged with illegality where not to do so would produce a harmful result on the persons for whose protection the law violated exists." Cf. Ferguson v. Sutphen, 3 Gilm. (Ill.) 547, 573-574; 11 Restatement of the Law of Contracts, sec. 601; V Williston, Contracts, sec. 1632 (rev.ed.); IV Corbin, Contracts, sec. 1540.
The rule of law which makes a wife's waiver of her right to support unenforceable is designed in part for her protection, and in part for the protection of the public, upon whom the necessity of supporting her might fall if the husband should fail to discharge his obligation. In the case before us, despite his release of all rights of inheritance, the plaintiff, after having reaped the benefits of that waiver of support, now seeks to obtain a half interest in property of his wife in which he never had any interest, and which she might well have disposed of by inter vivos transfer had she anticipated that he would advance this claim. It is apparent that no consideration of public policy requires us to refuse to give effect to his covenant. To *200 the extent that it is inconsistent with the views expressed in this opinion, Lyons v. Schanbacher, 316 Ill. 569, and Lagow v. Snapp, 400 Ill. 414, are overruled.
The decree of the circuit court is therefore reversed and the cause is remanded, with directions to proceed in accordance with this opinion.
Reversed and remanded, with directions.
Mr. JUSTICE KLINGBIEL took no part in the consideration or decision of this case.
