
745 A.2d 360 (1999)
1999 ME 134
MAINE MUTUAL FIRE INSURANCE CO.
v.
Rainald A. GERVAIS Sr.
Supreme Judicial Court of Maine.
Submitted on Briefs May 24, 1999.
Decided August 31, 1999.
*361 John C. Walker, Windham, for plaintiff.
William J. Smith, Van Buren, for defendant.
Before WATHEN, C.J., and CLIFFORD, RUDMAN, DANA, SAUFLEY, ALEXANDER, and CALKINS, JJ.
CLIFFORD, J.
[¶ 1] Rainald Gervais appeals from the judgment entered in the Superior Court (Aroostook County, Marden, J.) denying Gervais's request for reimbursement of the attorney fees he incurred in defending a declaratory judgment action brought by Maine Mutual Fire Insurance Co. to determine whether Maine Mutual had a duty to defend Gervais against emotional distress allegations in a suit filed by an injured employee of Gervais. Gervais contends that the trial court erred in denying his motion for attorney fees because Maine Mutual's duty to defend Gervais against the emotional distress allegations was clear based on the prevailing law at the time Gervais requested a defense. We agree and vacate the judgment.
[¶ 2] Aurel Lavoie, an employee working on the farm owned by Gervais, sued Gervais for negligence after sustaining work-related injuries.[1] Pursuant to the liability insurance policy it issued to Gervais, Maine Mutual provided Gervais with an attorney to defend the action. A jury awarded Lavoie $30,000 in damages. Although initially intending to appeal, Maine Mutual paid the entire amount of that judgment to Lavoie, including interest and costs.
[¶ 3] While the first action brought by Lavoie against Gervais was pending, but prior to the commencement of the trial, Lavoie filed another complaint against Gervais, and against Maine Mutual, and seven additional defendants, alleging six counts "aris[ing] out of a coordinated pattern of fraud, deceit and misrepresentation designed to deprive ... Lavoie of his legal rights and remedies in proceedings before both the Workers' Compensation Commission and before [the Superior] Court in connection with [a] ... work-related injury." After receiving the payment from Maine Mutual in the first case, Lavoie dismissed Maine Mutual as a defendant in the second action and also amended the complaint to remove the negligence allegations against Gervais.[2] Allegations of intentional infliction of emotional distress against Gervais remained pending.[3]
[¶ 4] Maine Mutual filed this action seeking a declaration that it did not have a duty to defend and indemnify Gervais against the intentional infliction of emotional distress allegations filed by Lavoie in the second complaint.[4] The Superior *362 Court entered a summary judgment in favor of Gervais in Lavoie's second suit, but declined to rule in Maine Mutual's declaratory judgment action, concluding that a justiciable controversy no longer existed. Following Lavoie's appeal of the summary judgment in favor of Gervais,[5] however, Maine Mutual requested that the Superior Court decide its declaratory judgment action. The Superior Court did rule, concluding that Maine Mutual did not have a duty to defend and indemnify Gervais in Lavoie's second lawsuit against him, and entered judgment for Maine Mutual. Gervais appealed the decision. We disagreed with the Superior Court, vacated its judgment, and held that Maine Mutual did have a duty to defend Gervais. See Maine Mut. Fire Ins. Co. v. Gervais, 1998 ME 197, ¶ 13, 715 A.2d 938, 942 (Maine Mutual v. Gervais I).
[¶ 5] Following the remand of the declaratory judgment action, Gervais sought reimbursement for the attorney fees he incurred in successfully defending the declaratory judgment action. The Superior Court denied the motion for attorney fees, concluding that Maine Mutual did not have to pay Gervais's attorney fees arising from the declaratory judgment action because its "duty to defend was less than well settled." The court denied Gervais's subsequent motion for a testimonial hearing and for findings of fact. This appeal by Gervais followed.
[¶ 6] When the issue involves whether the court is authorized to award attorney fees, we review the trial court's decision de novo. See Gibson v. Farm Family Mut. Ins. Co., 673 A.2d 1350, 1354 (Me.1996). The insured can recover attorney fees incurred to defend a declaratory judgment action brought by the insurer only "[w]hen the duty to defend is clear from the policy and the pleadings." See id. at 1354 (quoting Union Mut. Fire Ins. Co. v. Inhabitants of Town of Topsham, 441 A.2d 1012, 1019 (Me.1982)). To determine whether a duty to defend is "clear" for purposes of awarding attorney fees, a court must evaluate state law regarding an insurer's duty to defend as it existed at the time the insurer initiated the declaratory judgment action. See id. at 1355.
[¶ 7] Following Lavoie's dismissal of his claim for negligence in the second action brought by Lavoie against Gervais, the only claim remaining was the allegation of intentional infliction of emotional distress. See Maine Mut. v. Gervais I, 1998 ME 197, ¶ 8, 715 A.2d at 940. In Maine Mutual v. Gervais I, we concluded that Maine Mutual had a duty to defend Gervais against Lavoie's allegations of intentional infliction of emotional distress. Maine Mut. v. Gervais I, 1998 ME 197, ¶ 9, 715 A.2d at 940. Having previously decided that Maine Mutual had a duty to defend Gervais, the only question to resolve on this appeal is whether that duty to defend was clear at the time Maine Mutual filed its action for a declaratory judgment, in December of 1994, to warrant an award of attorney fees to Gervais. The Superior Court concluded that the duty to defend was not clear.
[¶ 8] To determine the obligation of an insurance company to defend an action brought by a third party against the insured, a court must compare the insurance policy provisions with the allegations included within the complaint. See Mullen *363 v. Daniels, 598 A.2d 451, 453 (Me.1991) (quoting Lavoie v. Dorchester Mut. Fire Ins. Co., 560 A.2d 570, 571 (Me.1989)). "If there is any legal or factual basis that could be developed at trial, which would obligate the insurer to pay under the policy, the insured is entitled to a defense." Id. Therefore, a duty to defend exists if the liability insurance company is potentially liable to cover the insured based on the third party's allegations. See id. Any ambiguity in the insurance policy language is resolved in favor of finding a duty to defend. See Union Mut., 441 A.2d at 1015. Accordingly, an award of attorney fees to the insured is appropriate when it is clear from a comparison of the insurance policy and the complaint that the insurance company is potentially liable to indemnify the insured. See Gibson, 673 A.2d at 1355; See also Mullen, 598 A.2d at 453. An award of attorney fees is not appropriate if the law is unsettled with respect to a duty to defend a particular action or if the possibility that the insurance policy requires coverage is "not something that [i]s obvious on the face of the complaint." See Union Mut. Fire Ins., 441 A.2d at 1019.
[¶ 9] The insurance policy issued by Maine Mutual provides, "If a ... suit is brought against any `insured' for damages because of `bodily injury' or `property damage' caused by an `occurrence' to which this coverage applies, we will ... provide a defense at our expense by counsel of our choice." See Maine Mut. v. Gervais I, 1998 ME 197, ¶ 10, 715 A.2d at 940-41. Maine Mutual sought a declaration that it did not have a duty to defend because Gervais's conduct that gave rise to Lavoie's suit for intentional infliction of emotional distress is not an "occurrence" covered by the insurance policy, or that if it is an occurrence, the conduct falls within the coverage exclusion for expected or intended bodily injury. See Maine Mut. v. Gervais I, 1998 ME 197, ¶ 8, 715 A.2d at 940. An "occurrence" is defined as an "accident ... which results in ... `bodily injury' or `property damage.'" See Maine Mut. v. Gervais I, 1998 ME 197, ¶ 10, 715 A.2d at 941. Citing two 1996 opinions, we explained in Maine Mutual v. Gervais I that "[t]he `accidental' nature of an event for purposes of a standard liability insurance contract ... does not derive from the voluntariness of the act, but rather from the unintentional nature of the consequence flowing from the act." Id. (Citations omitted.) We similarly explained, citing earlier opinions, that the standard coverage exclusion for expected or intended injury refers to injury that the insured subjectively wanted to occur or subjectively foresaw as almost certain to occur. See Maine Mut. v. Gervais I, 1998 ME 197, ¶ 11, 715 A.2d at 941. After comparing the policy provisions with the allegations, we held,
Because the general allegations in the Lavoies' complaint could establish that the alleged emotional distress was an unintended consequence of Gervais's conduct while still supporting each element of the tort, the Lavoies' complaint was based on an occurrence, as that term is used in the policy. Similarly, because Gervais may be found to have intentionally inflicted emotional distress without subjectively intending or foreseeing the alleged distress suffered by Lavoie, the exclusion for intended or expected bodily injury is inapplicable.
Maine Mut. v. Gervais I, 1998 ME 197, ¶ 13, 715 A.2d at 942 (citations omitted).
[¶ 10] In deciding that an intentional tort is not automatically excluded from standard liability insurance coverage, we relied on Vigna v. Allstate Ins. Co., 686 A.2d 598 (Me.1996), and Gibson, 673 A.2d 1350. See Maine Mut. v. Gervais I, 1998 ME 197, ¶ 10, 715 A.2d at 940-41. Both opinions note that an intentional act on the part of the insured forming the basis of an intentional tort action can still be an occurrence requiring coverage, and thus a duty to defend, if the consequences of the intentional act could be deemed unintentional under one set of facts. See Vigna, 686 A.2d at 600; Gibson, 673 A.2d at 1353. Although *364 Vigna and Gibson were decided in 1996, long after Maine Mutual filed its action for a declaratory judgment, we concluded in Gibson that the duty to defend in such circumstances was sufficiently clear in 1992 to warrant a similar award of attorney fees. Gibson, 673 A.2d at 1352, 1354-55.
[¶ 11] In explaining that the standard insurance coverage exclusion for expected or intended injury refers only to injury the insured subjectively wanted to occur, we again relied on law prevailing prior to 1993. See Maine Mut. v. Gervais I, 1998 ME 197, ¶¶ 11, 13, 715 A.2d at 941, 942; Maine Bonding & Cas. Co. v. Douglas Dynamics, Inc., 594 A.2d 1079, 1081 (Me. 1991); Burns v. Middlesex Ins. Co., 558 A.2d 701, 702-03 (Me.1989). Although noting that the exclusion is ambiguous, we held in both Maine Bonding & Cas. and Burns that the exclusion should be interpreted to refer "only to bodily injury that the insured in fact subjectively wanted (`intended') to be a result of his conduct or in fact subjectively foresaw as practically certain (`expected') to be a result of his conduct." Maine Bonding & Cas., 594 A.2d at 1081 (quoting Burns, 558 A.2d at 702; Patrons-Oxford Mut. Ins. Co. v. Dodge, 426 A.2d 888, 892 (Me.1981)).
[¶ 12] An award of attorney fees to Gervais is appropriate in this case because, from a comparison of the standard liability insurance policy with the Lavoie complaint, Maine Mutual's duty to defend Gervais against the intentional infliction of emotional distress allegations was clear at the time Maine Mutual filed its declaratory judgment action. That is so because Gervais could have shown that he did not intend the consequence of his actions and did not subjectively want Lavoie to suffer from emotional distress.
[¶ 13] In concluding otherwise, the Superior Court explained that attorney fees should not be awarded to Gervais because Maine Mutual did not commence the declaratory judgment action in bad faith. A showing of subjective bad faith on the part of Maine Mutual in filing a declaratory judgment action, however, is not required and was not required at that time. Although the legal standard for determining whether to award attorney fees incurred to defend a declaratory judgment action originally included a reference to bad faith, a showing of subjective bad faith on the part of the insurer has never been an independent requirement for an award of attorney fees. In Union Mutual Fire Insurance, we explained that an insured can recover attorney fees incurred to defend a declaratory judgment action brought by the insurer only "[w]hen the duty to defend is clear from the policy and the pleadings, so that the insurer's commencement of the declaratory judgment action must be attributed to a refusal in bad faith to honor its obligation under the policy." Union Mut. Fire Ins., 441 A.2d at 1019. Under this standard, if the duty to defend was clear, a legal presumption that the declaratory judgment action was initiated in bad faith was established. See id. An independent showing of subjective bad faith was not required. See id. For instance, in Union Mutual Fire Insurance, in declining to award attorney fees to the insured, we compared the insurance policy to the allegations within the complaint and concluded that the law gave little guidance to the insurer about its duty to defend. Id. Evidence of the subjective motivations of the insurer in denying a defense played no role in the analysis. See id. Because a showing of subjective bad faith is not a prerequisite to an award of attorney fees, in Gibson, we eliminated the language referring to "bad faith," "rely[ing] instead on direct evaluation of the insurer's clear responsibility for coverage pursuant to prevailing Maine law." See Gibson, 673 A.2d at 1355 n. 2. The elimination of the reference to "bad faith," and the legal fiction it represented, did not alter the substance of the standard for determining when to award attorney fees.
*365 The entry is:
Judgment vacated. Remanded to Superior Court for proceedings consistent with this opinion.
NOTES
[1]  Lavoie first sought to recover Workers' Compensation benefits pursuant to the Workers' Compensation Act. His petition was dismissed because Gervais was exempt pursuant to the Workers Compensation Act as an agricultural employer who carried liability insurance.
[2]  In an opinion addressing a previous appeal in this case, we noted in a footnote, "Whether the amendment of the complaint was consideration for the payment from Maine Mutual is not clear." Maine Mut. Fire Ins. Co. v. Gervais, 1998 ME 197, ¶ 5 n. 4, 715 A.2d 938, 940 n. 4 (Maine Mutual v. Gervais I).
[3]  Lavoie's wife also was a plaintiff in both suits seeking recovery for loss of consortium.
[4]  Maine Mutual hired an attorney to defend Gervais against Lavoie's intentional infliction of emotional distress allegations, and then filed the within complaint seeking a declaration that Maine Mutual did not have a duty to continue to represent Gervais. Maine Mutual continued to defend Gervais against Lavoie's second suit while it sought a declaratory judgment. Thus, the only fees that are in dispute are the fees Gervais incurred in defending this declaratory judgment action brought by Maine Mutual.
[5]  Lavoie appealed the Superior Court's summary judgment in favor of Gervais on the merits of the intentional infliction of emotional distress claim. We vacated the summary judgment on the grounds that the Superior Court lacked subject matter jurisdiction to hear an employee's complaint alleging fraudulent actions by the employer during a Workers' Compensation hearing. See Lavoie v. Gervais, 1998 ME 158, ¶ 11, 713 A.2d 335, 337-38.
