In an action, inter alia, to enforce a judgment against an insurance carrier, the defendant appeals from an order of the Supreme Court, Kings County (Ruchelsman, J.), dated March 22, 2006, which denied its motion to dismiss the complaint, and, inter alia, in effect, granted that branch of the cross motion of the plaintiff Westchester Fire Insurance Company which was for summary judgment on the issue of liability.
*979Ordered that the order is affirmed, with costs.
In connection with a personal injury action entitled Chumsky v Danna Constr. Corp., commenced in the Supreme Court, Kings County, under index No. 2963/01, the general contractors Danna Construction Corp. and Danna Equipment Corp., as well as Constance Cincotta (hereinafter collectively Danna), settled their third-party action against the subcontractor Gregory Kirkham and A-l Real Estate Development Corp. (hereinafter collectively Kirkham). Danna and Kirkham entered into an agreement entitled, “Settlement Agreement and Release,” under which Danna agreed to vacate a default judgment it was awarded against Kirkham in connection with the underlying personal injury action, and Kirkham agreed to settle Danna’s third-party action against him for the actual settlement or verdict amount in the personal injury action or the sum of $300,000, whichever was less. Further, pursuant to the agreement, Danna agreed not to execute against Kirkham for the settlement or verdict amount, and in exchange, Kirkham agreed to assign to Danna and Danna’s insurer, the plaintiff Westchester Fire Insurance Company (hereinafter Westchester), all of his rights against his insurer, the defendant Utica First Insurance Company (hereinafter Utica). Utica had issued an insurance policy to Kirkham under which Utica agreed to “pay all sums which an Insured becomes legally obligated to pay as damages.”
Danna settled with the injured plaintiff in the underlying personal injury action for the sum of $270,000, which was paid by Danna’s insurer Westchester. Danna, as Kirkham’s assignee, sued Utica for a judgment declaring that Utica was obligated to defend and indemnify Gregory Kirkham. After motion practice, the Supreme Court granted Danna’s cross motion for summary judgment. This Court affirmed and remitted the matter for the entry of a judgment declaring that Utica was obligated to defend and indemnify Kirkham in the underlying personal injury action (see Danna Constr. Corp. v Utica First Ins. Co., 17 AD3d 622 [2005]). Following the entry of this judgment, Westchester, individually and as Danna’s subrogor, commenced the instant action against Utica seeking, among other things, to enforce the judgment. Utica moved for summary judgment dismissing the complaint. Westchester cross-moved for summary judgment. The Supreme Court denied Utica’s motion, and, inter alia, in effect, granted that branch of Westchester’s cross motion which was for summary judgment on the issue of liability. We affirm.
Indemnification flows from a contractual relationship (see Riviello v Waldron, 47 NY2d 297, 306 [1979]; Erdman v Eagle *980Ins. Co., 239 AD2d 847, 849 [1997]). “The duty to indemnify requires a covered loss” (Servidone Constr. Corp. v Security Ins. Co. of Hartford, 64 NY2d 419, 425 [1985]), and will ultimately turn on the “actual facts” of the case (Erdman v Eagle Ins. Co., 239 AD2d at 849, supra; Ingber v Home Ins. Co., 140 AD2d 750, 751 [1988]), including whether the insured becomes legally obligated to pay damages (see M & M Elec. v Commercial Union Ins. Co.,. 241 AD2d 58, 60 [1998]), and whether the parties entered a release agreement barring certain claims (see Mc-Donough v Dryden Mut. Ins. Co., 276 AD2d 817, 818 [2000]; Westervelt v Dryden Mut. Ins. Co., 252 AD2d 877, 879 [1998]; see also L & K Holding Corp. v Tropical Aquarium at Hicksville, 192 AD2d 643, 645 [1993]).
“New York law . . . follow[s] the general rule that liability of the insurer attaches when there is a final judgment against the insured as a result of an obligation imposed by law” (M & M Elec. v Commercial Union Ins. Co., 241 AD2d at 60, supra [internal quotations omitted]; see State Farm Mut. Auto. Ins. Co. v Westlake, 35 NY2d 587, 591 [1974]; 755 Seventh Ave. Corp. v Carroll, 266 NY 157, 161 [1935]). When insurers agree to pay all sums which an insured becomes “legally obligated to pay as damages,” there must be “an establishment of legal liability for payment of damages” to trigger the insurers’ duty to indemnify the insured (M & M Elec. v Commercial Union Ins. Co., 241 AD2d at 59, supra).
“As an insurer’s obligation to indemnify extends only to those damages the insured is legally obligated to pay, it naturally follows that a release discharging an insured from all liability relieves the insurer from the duty of indemnification because it effectively eliminates any factual or legal grounds on which the duty to indemnify may be based” (McDonough v Dryden Mut. Ins. Co., 276 AD2d at 818, supra).
Here, Utica issued a policy to the insured Kirkham under which Utica agreed to “pay all sums which an Insured becomes legally obligated to pay as damages.” Contrary to Utica’s contentions, under the circumstances of this case, Kirkham became legally obligated to pay damages pursuant to the settlement agreement and release with Danna. Kirkham acknowledged his liability in the underlying personal injury action by agreeing to settle Danna’s third-party action against him in an amount up to $300,000, and indemnify Danna for the settlement amount in the underlying personal injury action or $300,000, whichever was less. It is of no moment that Danna agreed never to execute against Kirkham for this settlement amount. This narrow restraint was not tantamount to a release of Kirkham’s liability *981in the underlying personal injury action. Moreover, where, as here, “the policy is a contract for protection against liability, the insured may turn to [the insurer] for relief as soon as his liability has become legally fixed and established, although he has not suffered actual loss” (M & M Elec. v Commercial Union Ins. Co., 241 AD2d at 60, supra).
Kirkham’s liability became legally fixed with the execution of the above settlement agreement. This agreement created a legal obligation on Kirkham’s part against which Utica was required to indemnify. As the assignee of Kirkham’s rights against Utica, Danna was entitled to indemnification from Utica. Further, after advancing the settlement amount on behalf of its insured Danna, Westchester was subrogated to the position of Danna and, thus, entitled to indemnification from Utica (see Winkelmann v Excelsior Ins. Co., 85 NY2d 577, 582 [1995]). Mastro, J.P., Santucci, Skelos and Dickerson, JJ., concur.