
558 N.W.2d 155 (1997)
Charles E. ROGERS, Appellant,
v.
JoAnn P. WEBB a/k/a JoAnn P. Nye, Appellee.
No. 94-1410.
Supreme Court of Iowa.
January 22, 1997.
*156 Luis Herrera of Herrera Law Office, P.C., Des Moines, for appellant.
John A. McClintock of Hansen, McClintock & Riley, Des Moines, and Peter S. Cannon of Connolly, O'Malley, Lillis, Hansen & Olson, L.L.P., Des Moines, for appellee.
Considered by HARRIS, P.J., and CARTER, LAVORATO, SNELL, and TERNUS, JJ.
HARRIS, Justice.
It is clearly unethical for an attorney to undertake a contingent fee arrangement in a domestic relations case. Any contract providing for one is void as against public policy. The question here is whether a similar fee arrangement involving a layperson is also void.[1] We think the trial court was clearly correct in deciding it is.
In October 1984 plaintiff Charles Rogers (Charles) met defendant JoAnn Webb-Nye (JoAnn) in Scottsdale, Arizona. JoAnn was considerably distressed and vulnerable at the time because her husband had informed her he wanted to live with another woman, but did not want to end their marriage. JoAnn and her husband had built a nursing home business in Iowa and Arizona worth more than $10 million.
JoAnn filed a dissolution petition in Iowa in February 1985 and then returned to Arizona. She began seeing Charles on a social basis and Charles became her confidant regarding the dissolution proceeding. He spent almost fulltime on the case, advising JoAnn and consulting with her attorneys. Although Charles might be said to have performed some useful tasks, JoAnn's attorneys viewed him as a great hindrance to the prosecution of the case. They felt that Charles attempted to control and manipulate the three attorneys, interfered in their preparation, countermanded their instructions, frustrated settlement proceedings, and attempted to pit the attorneys against one other.
On December 24, 1985, JoAnn and Charles, with the assistance of an Arizona attorney selected by Charles, entered into a contract providing Charles was to be compensated by receiving twenty-five percent of the marital assets JoAnn received in the dissolution. The contract also contained a contingency for payment if Kenneth Webb, JoAnn's husband at the time, died prior to the "final settlement of the dissolution of marriage." It specified that Charles would obtain twenty-five percent of any assets JoAnn would receive from Kenneth Webb's estate. If Charles died before "final judicial decision on the dissolution of the Webb marriage is reached," his estate would receive twenty percent of the assets that JoAnn would receive from the dissolution.
The parties later executed an addendum out of concern the contract would be unenforceable because of the contingent fee arrangement. The addendum recited that JoAnn had retained Charles as her personal and business consultant for the dissolution, provided that JoAnn would pay Charles "in kind" at the rate of $150 per hour, and stated that his total compensation would not exceed twenty-five percent of the property received in the dissolution. JoAnn's marriage was dissolved in April 1986. JoAnn's husband appealed, and Charles worked on the appeal until its resolution in 1988. During all the relationship Charles resided in JoAnn's homes in Arizona and Iowa and used her automobiles. JoAnn spent approximately $195,000 either directly to Charles or for his benefit.
In June 1988 Charles and JoAnn formally terminated their relationship. Charles then brought this suit for breach of contract. The district court dismissed it after a bench trial, finding, among other things, the contract violated public policy. The matter is before us on Charles' appeal. Our scope of review in this law action is on error. Iowa R.App. P. 4.
I. Contracts that contravene public policy will not be enforced. Walker v. *157 American Family Mut. Ins. Co., 340 N.W.2d 599, 601 (Iowa 1983); Wunschel Law Firm, P.C. v. Clabaugh, 291 N.W.2d 331, 335 (Iowa 1980); Rowen v. Le Mars Mut. Ins. Co., 282 N.W.2d 639, 650 (Iowa 1979); see also Restatement (Second) of Contracts § 178 (1979). This "power to invalidate a contract on public policy grounds must be used cautiously and exercised only in cases free from doubt." DeVetter v. Principal Mut. Life Ins. Co., 516 N.W.2d 792, 794 (Iowa 1994). This is because whenever this court considers invalidating a contract on public policy grounds it must "also weigh in the balance the parties' freedom to contract." Walker, 340 N.W.2d at 601.
The term "public policy" is not easily defined but we have said the thrust of the term is quite clear: "a court ought not enforce a contract which tends to be injurious to the public or contrary to the public good." Id. (citing In re Estate of Barnes, 256 Iowa 1043, 1051-52, 128 N.W.2d 188, 192 (1964)). Thus a contract may be invalidated if it would "violate any established interest of society." Walker, 340 N.W.2d at 601. It is "not necessary that the contract actually cause the feared evil in a given case; its tendency to have that result is sufficient." Wunschel Law Firm, 291 N.W.2d at 335 (citing Jones v. American Home Finding Ass'n, 191 Iowa 211, 213, 182 N.W. 191, 192 (1921)). Thus, before we strike down a contract based upon public policy, we must conclude that "the preservation of the general public welfare imperatively so demands invalidation so as to outweigh the weighty societal interest in the freedom of contract." DeVetter, 516 N.W.2d at 794.
Preservation of a marital relationship is a fundamental public policy. This is evident in our decisions, in Iowa statutes, and the ethical code for attorneys. See In re Estate of Sylvester, 195 Iowa 1329, 1333, 192 N.W. 442, 443-44 (1923) (stating Iowa law favors reconciliation between marital parties contemplating a dissolution and seeks to "foster and protect" the marriage relationship); Iowa Code § 598.16 (1993) (providing for conciliation efforts prior to the granting of a dissolution decree); id. § 598.19 (providing a waiting period prior to the granting of a dissolution decree); Iowa Code of Prof'l Responsibility for Lawyers DR 2-106(C) (1993) (prohibiting a contingent fee arrangement in domestic relations cases); id. EC 2-22 ("Because of the human relationships involved and the unique character of the proceedings, contingent fee arrangements in domestic relations cases are rarely justified.").
We have long disapproved contracts which tend to promote separation or dissolution of marriage. Norris v. Norris, 174 N.W.2d 368, 370 (Iowa 1970); Barngrover v. Pettigrew, 128 Iowa 533, 535, 104 N.W. 904, 904 (1905). We have described the policy this way:
[T]he state's interest in preserving the marriage relationship makes any provision [in a contract] which provides for, facilitates or tends to induce a separation or divorce of the parties after marriage contrary to public policy and void.
Norris, 174 N.W.2d at 370; see also Barngrover, 128 Iowa at 535, 104 N.W. at 904 ("[A]ny agreement conditioned on the obtainment of divorce, or intended or calculated to facilitate its obtainment, is void."). This is the general rule. Restatement (Second) of Contracts § 190(2) ("A promise that tends to encourage divorce or separation is unenforceable on grounds of public policy."); Wayne F. Foster, Annotation, What Constitutes Contract Between Husband or Wife and Third Person Promotive of Divorce or Separation, 93 A.L.R.3d 523, 525 (1979) ("The rule is well established by the courts that any agreement between one spouse and a third person which tends to facilitate or promote the procurement of a divorce or the separation of the spouses is contrary to public policy and void.").
We see no reason to depart from the rule when a layperson, rather than an attorney, is involved. The public policy that precipitated the rule for lawyers applies alike to nonlawyers. The rule defends against persons who would derive a profit from encouraging someone especially vulnerable to their influence to end a marriage. Charles is subject to the same restrictions as a lawyer would be, so the trial court was clearly correct *158 in finding the contingent fee contract void and unenforceable.
II. Charles also brought a claim of quantum meruit. As a general rule in Iowa one who pleads an express contract "cannot ordinarily recover upon an implied contract or quantum meruit." Guldberg v. Greenfield, 259 Iowa 873, 878, 146 N.W.2d 298, 301 (1966). But when a "contract is not invalid because of illegality of the services, but merely because on policy grounds we cannot approve the way in which the fee was to be calculated" we have allowed recovery based upon quantum meruit. Wunschel Law Firm, 291 N.W.2d at 337; Lawrence v. Tschirgi, 244 Iowa 386, 399-400, 57 N.W.2d 46, 53 (1953); see also R.A. Horton, Annotation, Attorney's Recovery in Quantum Meruit for Legal Services Rendered Under a Contract Which is Illegal or Void as Against Public Policy, 100 A.L.R.2d 1378 (1965).
The exception to the general rule noted above seems to apply here. Even so, Charles' quantum meruit claim fails. The district court found that Charles had already received $195,000 worth of compensation from JoAnn, far in excess of the value of any services he claims to have established. Ample evidence supports this finding.
Because the contingent fee contract was void, and the quantum meruit claim must fail, judgment was correctly entered against Charles.
AFFIRMED.
NOTES
[1]  The parties did not raise the question whether the challenged arrangement involved the unauthorized practice of law so we do not consider the issue.
