#### AMERICAN FAMILY MUTUAL INSURANCE COMPANY, as Subrogee of Michael P. McGrath, Jr., Plaintiff-Appellant, v. NORTHERN HERITAGE BUILDERS, L.L.C., et al., Defendants-Appellees (Rapciak Construction, Inc., Defendant).

First District (1st Division)

No. 1 — 10—0216

Opinion filed October 12, 2010.

*585Sneckenberg, Thompson & Brody, LLI) of Chicago (William Sneckenberg, Steven Thompson, and Emilie Kaplan, of counsel), for appellant.

Senak Smith & Michaud, Ltd. (Thomas A. Smith and Kelly A. Fox, of counsel), and Scott & Kraus, LLC (Gregory Bird, Sonia Kinra, and Blair Lazarus, of counsel), both of Chicago, for appellees.

JUSTICE HOFFMAN

delivered the opinion of the court:

American Family Mutual Insurance Company (American Family) appeals from an order of the circuit court of Cook County which dismissed its action against Northern Heritage Builders, L.L.C. (Northern Heritage), and Patrick Plunkett Architectural Design, Ltd. (Patrick Plunkett). American Family brought the instant action against Northern Heritage and Patrick Plunkett as the subrogee of its insured, Michael P McGrath, Jr. (McGrath), asserting claims based upon a theory of equitable subrogation by reason of its having made payments to McGrath under a policy of insurance for water damage to his residence. The trial court found that, since its policy of insurance with McGrath provides for subrogation, American Family had not asserted, and could not assert, claims based upon the doctrine of equitable subrogation. For the reasons that follow, we agree and affirm the judgment of the circuit court.

The facts of this case are not in dispute. McGrath is the owner of a three-story single-family residence located at 1848 N. Orchard, Chicago, Illinois. The residence was designed by Patrick Plunkett and built by Northern Heritage pursuant to contracts entered into with McGrath.

McGrath purchased a homeowner’s policy from American Family insuring the residence (the Policy). On August 23, 2006, while the Policy was in force, McGrath made a claim under the Policy for damage to the residence by reason of rain and moisture penetrating the exterior due to alleged faulty construction. American Family denied the claim, and McGrath filed suit against American Family in the United States District Court for the Northern District of Illinois (hereinafter referred to as the Federal Action).

*586On August 6, 2007, while the Federal Action was pending and undetermined, McGrath filed suit in the circuit court of Cook County against Northern Heritage and Rapciak Construction, Inc. (hereinafter referred to as case No. 07 L 8252), seeking damages for the construction defects which resulted in the same damage to his residence that gave rise to the claim that was the subject of the Federal Action against American Family. Following the filing of case No. 07 L 8252, an order was entered in the Federal Action granting a summary judgment in favor of McGrath on the issue of coverage under the Policy for the water damage to his residence. Thereafter, the Federal Action was tried, resulting in a jury verdict in favor of McGrath. Subsequent to the verdict, on May 16, 2008, McGrath and American Family settled the Federal Action, and American Family paid McGrath under the Policy for the damage to his residence. The terms of the settlement are contained in a written agreement which does not contain an assignment to American Family of McGrath’s rights of recovery against any party by reason of the damage to his residence.

On May 20, 2008, American Family filed the instant action as the subrogee of McGrath, which was docketed in the circuit court of Cook County as case No. 08 L 5548. American Family asserted the same allegations McGrath made in case No. 07 L 8252. On July 22, 2008, an order was entered consolidating McGrath’s action, case No. 07 L 8252, and the American Family action, case No. 08 L 5548, for purposes of discovery.

On March 13, 2009, American Family filed its third amended complaint in the instant action, case No. 08 L 5548, asserting claims based upon a theory of equitable subrogation against Northern Heritage and Patrick Plunkett by reason of the payment it made to McGrath for construction defects which resulted in damage to his residence. In addition to a recitation of the foregoing historical facts, American Family attached to, and incorporated into, its third amended complaint a certified copy of the Policy, which, as it relates to subrogation, provides as follows:

> “Subrogation. An insured may waive in writing before a loss all rights of recovery against any person. If not waived, we may require an assignment of rights of recovery for a loss to the extent that payment is made by us.

> If an assignment is sought, an insured must sign and deliver all related papers and cooperate with us. Where prohibited by law, subrogation does not apply under Section II to Medical Expense Coverage or Damage to Property of Others.”

On May 13, 2009, Patrick Plunkett filed a combined motion pursuant to section 2 — 619.1 of the Code of Civil Procedure (Code) (735 *587ILCS 5/2 — 619.1 (West 2008)), seeking dismissal of American Family’s third amended complaint. Northern Heritage joined in the motion on the following day. Pursuant to section 2 — 615 (735 ILCS 5/2 — 615 (West 2008)), the motion argued that the third amended complaint was insufficient at law for the following reasons: (1) American Family failed to plead how and when it became the subrogee of McGrath’s rights of action in violation of section 2 — 403 of the Code (735 ILCS 5/2 — 403 (West 2008)); (2) the third amended complaint was not verified; and (3) it fails to state a claim based upon a theory of equitable subrogation by reason of the existence of a contractual subrogation provision in the Policy. In support of its prayer for involuntary dismissal pursuant to section 2 — 619 (735 ILCS 5/2 — 619 (West 2008)), the motion asserted that, as McGrath had never assigned his rights to recover pursuant to the terms of the Policy, American Family could not maintain a claim as his subrogee. The argument was supported by McGrath’s answer to a request to admit facts wherein he denied ever having assigned his rights to American Family.

On July 13, 2009, American Family moved for leave to file an amendment to its third amended complaint, supplying the verification which had been omitted when the third amended complaint was originally filed.

On August 3, 2009, the circuit court entered an order granting the motion to dismiss the third amended complaint and entering judgment thereon in favor of Patrick Plunkett and Northern Heritage. In addition, the circuit court made the requisite finding under Supreme Court Rule 304(a) (210 Ill. 2d R. 304(a)) that there was no just reason to delay enforcement or appeal from its order.

On August 27, 2009, American Family filed a motion seeking reconsideration of the dismissal order of August 3. That motion was denied on December 22, 2009, and this timely appeal followed.

A motion to dismiss pursuant to section 2 — 615 of the Code tests the legal sufficiency of a complaint, whereas a section 2 — 619 motion admits the legal sufficiency of the complaint but asserts affirmative matter outside the complaint which defeats the claim. Solaia Technology, LLC v. Specialty Publishing Co., 221 Ill. 2d 558, 578-79, 852 N.E.2d 825 (2006). Our review of a dismissal under either section of the Code is de novo. King v. First Capital Financial Services Corp., 215 Ill. 2d 1, 12, 828 N.E.2d 1155 (2005).

In urging reversal, American Family argues that, once it paid McGrath’s claim under the Policy, it was equitably subrogated to his rights of action against the wrongdoers responsible for the loss to the extent of its payment to McGrath. It asserts that this equitable subrogation is independent of any rights under the Policy. Patrick *588Plunkett and Northern Heritage argue that, because the Policy provides for contractual subrogation, American Family is not entitled to any recovery under an equitable subrogation theory.

The right of subrogation originated as a creature of chancery as a doctrine which allowed a person compelled to pay the debt or claim of another to succeed to that person’s rights with respect to the debt or claim so paid. This common law or equitable right of subrogation is a remedial device utilized to prevent unjust enrichment. Dix Mutual Insurance Co. v. LaFramboise, 149 Ill. 2d 314, 319, 597 N.E.2d 622 (1992). Now, a right of subrogation may also arise by statute or contract. In re Estate of Scott, 208 Ill. App. 3d 846, 848, 567 N.E.2d 605 (1991). In this case, we address the question left unanswered by the supreme court in Schultz v. Gotlund, 138 Ill. 2d 171, 173, 561 N.E.2d 652 (1990), namely, the effect of an express contractual subrogation provision on a common law or equitable subrogation theory of recovery. Schultz, 138 Ill. 2d at 173.

Where the right of subrogation is created by the terms of an enforceable contract, the contract terms control, rather than common law or equitable principles. Benge v. State Farm Mutual Automobile Insurance Co., 297 Ill. App. 3d 1062, 1071, 697 N.E.2d 914 (1998). As stated in Couch on Insurance, “where the right of an insurer to subrogation is expressly provided for in the policy, its rights must be measured by, and depend solely on, the terms of such provisions.” 16 Couch on Insurance 3d §222:23 (2000). Stated otherwise, common law or equitable subrogation cannot stand in the face of an express contractual right of subrogation. See Benge, 297 Ill. App. 3d at 1071; Capitol Indemnity Corp. v. Strike Zone, S.S.B.&B. Corp., 269 Ill. App. 3d 594, 596, 646 N.E.2d 310 (1995); In re Estate of Scott, 208 Ill. App. 3d at 848. We conclude, therefore, that whatever right of subrogation American Family acquired in this case by reason of its having paid McGrath for the damage to his residence, it was acquired pursuant to the subrogation provision of the Policy, not by virtue of any equitable or common law principle.

The terms of an unambiguous insurance policy should be enforced as written. King v. Allstate Insurance Co., 269 Ill. App. 3d 190, 192, 645 N.E.2d 503 (1994). According to the unambiguous language of the Policy, American Family had the right to require McGrath to execute an assignment of his rights of recovery for the damage to his residence to the extent that American Family paid the loss. In support of the section 2 — 619 grounds for involuntary dismissal of American Family’s third amended complaint, Patrick Plunkett attached a copy of McGrath’s answer to a request to admit facts wherein he denied ever having assigned his rights of recovery to American Family. No coun*589terevidentiary material was filed by American Family. In the absence of such an assignment, American Family failed to perfect its rights of subrogation under the terms of the Policy, and for this reason, we affirm the dismissal of its third amended complaint.

Affirmed.

HALL, EJ., and LAMPKIN, J., concur.