In an action, inter alia, for a judgment declaring that the defendant, Zurich-American Insurance Group, is required to defend and indemnify the plaintiff, the City of New York, in an underlying action to recover damages for sexual assault, the defendant appeals from an order of the Supreme Court, Kings County (Partnow, J.), dated October 22, 2004, which denied the defendant’s motion for leave to amend its answer and for summary judgment, and granted the plaintiffs cross motion for an award of attorney’s fees.
*610Ordered that the order is affirmed, with costs.
In an underlying action to recover damages for sexual assault, the plaintiff, City of New York, sought defense and indemnification as an additional insured under a policy issued by the defendant, Zurich-American Insurance Group (hereinafter Zurich), to the City’s codefendant, Varsity Transit, Inc. (hereinafter Varsity). Zurich provided counsel for Varsity, but ignored the City’s repeated requests for counsel, and the City undertook its own defense. In the course of that litigation, the City ignored repeated discovery orders, and the plaintiff and Varsity moved to strike the City’s answer. That motion was denied, and the movants appealed the order denying the motion.
Meanwhile, the City commenced this action for a judgment declaring that Zurich was required to defend and indemnify it, and successfully moved for summary judgment. Shortly thereafter, this Court modified the trial court’s order in the underlying action by, inter alia, granting the motion to strike the City’s answer, on the ground that the City’s noncompliance with the discovery requests was “willful and contumacious,” and remitted the matter to the trial court for an inquest on damages (see Mendez v City of New York, 7 AD3d 766, 767 [2004]). Zurich then moved for leave to amend its answer and for summary judgment in this action on the ground that the City’s noncompliance in the underlying action amounted to a breach of its continuing duty to act in good faith, and therefore relieved Zurich of the duty to defend and indemnify it. The City cross-moved to recover attorney’s fees expended defending itself against Zurich’s motions. Soon thereafter, the City and Varsity settled the underlying action for $1,066,666.67, with the City reserving its right to recover its contribution from Zurich. Thereafter, the trial court in this action denied Zurich’s motion for leave to amend its answer and for summary judgment and granted the City’s motion for attorney’s fees.
Zurich contends that since the City was, in effect, forced to settle the underlying action as the result of its own contumacious conduct, the settlement is the equivalent of punitive damages. As such, Zurich argues that requiring it to indemnify the City would violate New York’s public policy against indemnifying punitive damages and would undermine the courts’ ability to sanction recalcitrant litigants.
“[W]here an insurer unjustifiably refuses to defend a suit, the insured may make a reasonable settlement or compromise of the injured party’s claim, and is then entitled to reimbursement from the insurer” (Isadore Rosen & Sons v Security Mut. Ins. Co. of N.Y., 31 NY2d 342, 347 [1972] [internal quotation marks *611omitted]; American Ref-Fuel Co. of Hempstead v Resource Recycling, 281 AD2d 573 [2001]). Where an insurer is involved in the underlying proceeding yet fails to challenge the reasonableness of the settlement there, it may not do so in a separate declaratory judgment action (see Serio v Public Serv. Mut. Ins. Co., 7 AD3d 277 [2004]; Tishman Constr. Corp. of N.Y. v American Mfrs. Mut. Ins. Co., 303 AD2d 323 [2003]). There is no question that Zurich was obligated to defend and indemnify the City in the underlying action, and that it failed to do so. Therefore, the City was entitled to enter into a reasonable settlement of that case. There is also no question that Zurich participated in the underlying action by defending Varsity. Not only did Zurich fail to challenge the reasonableness of the settlement in that case, but it participated in, and agreed to, the settlement. Therefore, it may not challenge the reasonableness or nature of the settlement in this declaratory judgment action. Therefore, because the theory upon which Zurich based its motion for leave to amend its answer was clearly without merit, the motion was properly denied (see Washington Ave. Assoc. v Euclid Equip., 229 AD2d 486, 487-488 [1996]). For the same reason, Zurich failed to sustain its initial burden of demonstrating its entitlement to judgment as a matter of law (see American Ref-Fuel Co. of Hempstead v Resource Recycling, 281 AD2d 573 [2001], supra).
Regarding the City’s cross motion for an award of attorney’s fees, an insured is generally not entitled to recover expenses incurred in bringing an action for a declaration of coverage, unless “he [or she] has been cast in a defensive posture by the legal steps an insurer takes in an effort to free itself from its policy obligations” (Mighty Midgets v Centennial Ins. Co., 47 NY2d 12, 21 [1979]). Here, Zurich’s motions, filed after the court had already awarded summary judgment in favor of the City, put the City in a defensive posture, and the City therefore was entitled to recover its attorney’s fees (see Hurney v Mattson, 59 AD2d 934 [1977]). Schmidt, J.P., Santucci, Mastro and Lifson, JJ., concur. [See 5 Misc 3d 1008(A), 2004 NY Slip Op 51273(U) (2004).]