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 Heritagе), 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 subrogаtion. 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 residencе 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).
On 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 favоr 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 оf 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 Heritagе 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 рayment 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 ILCS 5/2 — 619.1 (West 2008)), seeking dismissal оf 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, thе 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 сomplaint, 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.,
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 subrogаtion is independent of any rights under the Policy. Patrick Plunkett and Northern Heritage argue that, because the Policy provides for contractual subrogation, American Family is not entitled to аny recovery under an equitable subrogation theory.
The right of subrogation originated as a creature of chancery as a doctrine which allowed a person compellеd 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,
Where the right of subrogation is created by the terms of an enforceable contract, the contract terms control, rather than common law or equitablе principles. Benge v. State Farm Mutual Automobile Insurance Co.,
The terms of an unambiguous insurance poliсy should be enforced as written. King v. Allstate Insurance Co.,
Affirmed.
HALL, EJ., and LAMPKIN, J., concur.
