
334 Md. 381 (1994)
639 A.2d 652
ALLSTATE INSURANCE COMPANY
v.
ROBERT CAMPBELL.
No. 97, September Term, 1993.
Court of Appeals of Maryland.
April 11, 1994.
Michael J. Budow (Anne K. Howard, Budow and Noble, P.C., on brief), Bethesda, for petitioner.
Gerald Solomon (Harisha Bastiampillai, Todd Bennett, Jules R. Bricker, on brief), Greenbelt, for respondent.
Argued before MURPHY, C.J., and ELDRIDGE, RODOWSKY, CHASANOW, KARWACKI, BELL and RAKER, JJ.
MURPHY, Chief Judge.
This case focuses upon an action brought by an insured against an insurer for a claimed bad faith failure to settle a third-party claim against the insured where the insurer ultimately settled the claim prior to trial and thus no excess judgment was rendered against the insured.

I
Robert Campbell was involved in an accident in which his automobile struck an automobile driven by Kimberly Baptiste on August 9, 1990, in Montgomery County, Maryland. Baptiste filed a negligence action against Campbell in the Circuit Court for Montgomery County for injuries she sustained as a result of the collision. Liability was not an issue in the case. At the time of the accident, Campbell was insured under an automobile liability insurance policy with Allstate Insurance Company, Inc. (Allstate). The policy had a liability limit of $20,000 and contained the following pertinent language:
"Allstate will pay for all damages an insured person is legally obligated to pay because of:
"1. bodily injury sustained by any person....
"We will defend an insured person sued as the result of an auto accident even if the suit is groundless or false. We will choose the counsel. We may settle any claim or suit if we believe it is proper...."
In accordance with its policy, Allstate retained counsel to defend Campbell in Baptiste's suit. After analyzing the case, counsel, Rocco Nunzio, advised Allstate that a jury could return a verdict in excess of policy limits.
Subsequently, Baptiste offered to settle the claim within the limits of Campbell's policy. Allstate did not agree to settle the claim and Baptiste's offer was withdrawn.
In the meantime, Nunzio wrote to Campbell, recommending that Campbell obtain independent counsel with respect to any excess liability. Campbell thereafter retained Gerald Solomon, Esq. as independent counsel. Solomon wrote to Allstate, advising the company that failure to settle Baptiste's claim within policy limits was a failure to act in good faith, and urging that Allstate settle the claim immediately.
Allstate again declined to settle the claim. It also declined to direct Nunzio to pursue discovery on behalf of Campbell or to seek an independent medical examination of Baptiste. In addition, it refused to pay Solomon's fees for representing Campbell.
On February 25, 1992, Campbell filed a Complaint for Declaratory Relief in the Circuit Court for Montgomery County, claiming that Allstate failed to act in good faith and thus breached its contract to defend Campbell. Campbell asked that the court order Allstate to pay his legal fees and costs arising out of Solomon's representation of him in the Baptiste suit and in his action against Allstate. Allstate moved to dismiss the complaint, maintaining that the issue of bad faith was raised prematurely.
Shortly thereafter, before a ruling was issued in the declaratory judgment action and prior to trial in the Baptiste suit, Allstate settled Baptiste's claims for the policy limits of $20,000 and obtained a full release on behalf of Campbell.
Campbell then filed an Amended Complaint for Breach of Contract asking for attorney fees and expenses totalling $4,218.85, incurred in obtaining excess counsel. In his complaint, Campbell averred that Allstate breached its contract to defend Campbell when it failed initially to settle the Baptiste case within policy limits and failed to represent adequately the interests of Campbell, thus forcing Campbell to retain independent counsel.[1] Allstate filed a motion to dismiss the complaint, arguing that no controversy existed because Allstate had fulfilled all of its duties under its contract with Campbell. Allstate contended that Campbell did not have a cause of action against it for bad faith failure to settle the claim because such an action may not be brought against an insurer until after a judgment exceeding policy limits has been entered against an insured. The court (Ferretti, J.) granted Allstate's Motion to Dismiss, based upon a finding that Campbell was not entitled to the relief requested based upon a contract cause of action.
Campbell appealed to the Court of Special Appeals. That court noted that the trial court's only ruling was that Maryland does not recognize a cause of action for breach of contract in a suit against an insurer for wrongful refusal to settle. The intermediate appellate court then reformulated Campbell's complaint as a tort claim rather than a contract claim. It then concluded that the complaint sufficiently pleaded a claim for breach of the insurer's tort duty to make a good faith attempt to settle within policy limits. The court held that Campbell's amended complaint set forth the requisite elements of a tort claim in the allegations numbered 6, 19, 20, and 22. See supra n. 1. The court noted that "the mere `inartful' titling of appellant's pleading in terms of breach of contract [did] not render invalid the substance of the pleading itself." Campbell v. Allstate Ins., 96 Md. App. 277, 286, 624 A.2d 1310 (1993).
The court also concluded that Campbell's claim for a bad faith failure to settle was not premature, as was contended by Allstate, because Campbell became exposed to an excess judgment at the moment Allstate "arbitrarily declined" Baptiste's offer of the policy limits. 96 Md. App. at 286-87, 624 A.2d 1310. The court observed that while Campbell suffered no damages related to an excess judgment, he did suffer damages, in the form of fees for counsel retained in order to minimize excess exposure, which he was entitled to recover. Id. at 287, 624 A.2d 1310.
The court recognized that an insurer is not obligated to accept an offer simply because it is within policy limits, but noted that an insurer is obligated to negotiate and settle a claim with "proper regard" for the insured's interests and is liable for damages for a bad faith refusal to settle within policy limits. It further noted that an insurer must use "reasonable care" in defending the insured and that a refusal to settle must be based upon "an informed judgment based on honesty and diligence." Id. at 291-92, 624 A.2d 1310.
The intermediate appellate court concluded that there was a "legitimate question of fact" as to whether Allstate breached its good faith obligation to settle for policy limits where: "(1) an insurer has rejected the advice of appointed counsel to settle the case; (2) for an offer at or near the policy limits; (3) prior to the jury verdict; and (4) when the insured's liability [is] clear." Id. at 294-95, 624 A.2d 1310. Accordingly, it reversed the trial court's dismissal of the action and remanded the case to the circuit court for further proceedings. We granted Allstate's petition for certiorari.

II
Allstate argues that the trial court did not err in dismissing Campbell's contract claim against it because it did not breach its duty to defend or settle the claim within policy limits. The insurer asserts that there is no contractual obligation to settle a claim at a time chosen by the insured or the insured's independent counsel.
Allstate avers that the Court of Special Appeals erred in reforming, on its own initiative, Campbell's complaint from a contract to a tort action. It contends that the court thereby denied Allstate the right of notice and the opportunity to respond to allegations of negligence.[2] Allstate recognizes that an insurer who breaches its contractual duty to defend may be liable for the insured's attorney fees incurred in defending a suit; it urges, however, that the law does not authorize awarding an insured attorney fees in a tort action against the insurer. Rather, it maintains that the insured's damages for a bad faith failure to settle a tort action consist of the amount of any judgment against the insured in excess of the policy limits. It argues further that under its policy Allstate retains the sole right to select defense counsel and there is no contractual obligation to reimburse Campbell for obtaining independent counsel to monitor the litigation or evaluate the appointed counsel.
Allstate further suggests that while an insurer may be held liable to the insured for an excess judgment if the insurer, in bad faith, fails to settle a claim, there is no authority for holding an insurer liable for not settling a claim when it ultimately settles within policy limits and no excess judgment is entered. It avers that the Court of Special Appeals improperly expanded the law of Maryland in so holding.
Allstate also argues, contrary to the insured's position, that there was no conflict of interest between Allstate and Campbell with regard to the Baptiste claim that would require Allstate to allow Campbell to retain independent counsel at Allstate's expense.
Campbell contends that he sufficiently alleged the elements of a tort claim for bad faith, and that the facts alleged in the complaint afforded Allstate sufficient notice to defend against the tort action. He argues that this case is a mixed action of tort and contract because the issues are here interrelated. He claims that the insurer's contractual duty to defend is breached when the insurer, in bad faith, breaches its tort duty in refusing to settle within policy limits. Thus, he says, it is consistent with Maryland law to award attorney fees to the insured.
Campbell contends that an insurer need not altogether refuse to defend a suit to breach its duty to defend. Instead, he asserts that a breach exists if the insurer assumes a position that leaves the insured with no alternative but to retain independent counsel to assume the defense. He observes that the contractual duty to defend is not limited to the duty to indemnify for the policy amount.
Moreover, he says that Allstate breached its duty to defend when it "arbitrarily" refused to settle the claim at the time that Baptiste agreed to accept the policy amount. In this regard, he suggests that it breached its duty to defend when it refused to authorize the taking of depositions and to authorize an independent medical examination. The insured, to further support his claims, points out that Nunzio recommended that Campbell retain independent counsel with respect to excess liability; that Allstate declined to follow independent counsel's advice; that Allstate refused to pay fees of independent counsel; and that Allstate "attempted to direct" Campbell's defense even though there was a conflict of interest.
According to Campbell, the conflict of interest arose when Allstate declined to settle within policy limits or to authorize discovery. He maintains that Allstate's appointed counsel, Nunzio, was thereby rendered unable to adequately represent Campbell because he was torn between his duty to represent Campbell and his duty to Allstate, who paid his fees. Campbell also contends that because Nunzio sent a letter to Campbell recommending excess counsel, rather than a letter to Allstate informing it that it was acting in bad faith, Nunzio aligned himself with Allstate, leaving Campbell no choice but to seek independent counsel to handle the defense of the Baptiste suit.
And finally, Campbell argues that the Court of Special Appeals did not improperly expand the law in Maryland imposing liability upon an insurer for a bad faith refusal to settle; rather, he says, the court did no more than permit the aggrieved insured to sue for attorney fees prior to the rendering of an excess verdict. Campbell urges that because all elements of the cause of action for bad faith failure to settle are satisfied prior to trial and a breach may therefore occur even absent an excess verdict, it is inequitable to make an excess verdict a prerequisite to an action for bad faith failure to settle.

III
In reviewing the propriety of a trial court's grant of a motion to dismiss for failure to state a cause of action in contract, we assume the truth of all well-pleaded material facts and all inferences which reasonably can be drawn therefrom. Decoster v. Westinghouse, 333 Md. 245, 249, 634 A.2d 1330 (1994), and cases cited therein. Only if the facts alleged in the complaint fail to state a cause of action is dismissal proper. Id. In reversing the trial court's dismissal of Campbell's complaint, the Court of Special Appeals held, as we earlier observed, that although the complaint did not state a cause of action under a contract theory, it set forth the essential elements of a cause of action in tort, sounding in negligence, for bad faith refusal to settle the claim.
We recognized a cause of action brought in tort for bad faith refusal to settle a claim within policy limits in State Farm v. White, 248 Md. 324, 236 A.2d 269 (1967). We there considered the duty owed to an insured by an insurer when there was an opportunity to settle a claim within the limits of the insured's liability policy. After an extensive review of authority, we adopted a "good faith" theory based upon the recognition that because the insurer had exclusive control over the defense of a claim, the insurer had a tort duty to exercise good faith in making a decision not to settle a claim within policy limits. Id. at 329, 236 A.2d 269. We observed that this good faith standard requires that an insurer's refusal to settle a claim within policy limits be an informed judgment based upon honesty and diligence. Id. at 333, 236 A.2d 269. We noted that the insurer's negligence, if any, was one of several factors relevant to a determination of whether the insurer acted in good faith. Id. We identified the factors which courts used in applying the good faith test:
"[T]he courts have found that the presence of one or more of the following acts or circumstances may affect the `good faith' posture of the insurer: the severity of the plaintiff's injuries giving rise to the likelihood of a verdict greatly in excess of the policy limits; lack of proper and adequate investigation of the circumstances surrounding the accident; lack of skillful evaluation of plaintiff's disability; failure of the insurer to inform the insured of a compromise offer within or near the policy limits; pressure by the insurer on the insured to make a contribution towards a compromise settlement within the policy limits, as an inducement to settlement by the insurer; and actions which demonstrate a greater concern for the insurer's monetary interests than the financial risk attendant to the insured's predicament."
Id. at 332, 236 A.2d 269.
In White, the insurer had refused several offers to settle a claim against the insured within policy limits, and trial before a jury resulted in a judgment against the insured for nearly twice the amount of the policy limit. The insured successfully brought an action against the insurer for the amount in excess of the policy limits. On appeal, we affirmed the trial court judgment denying the insurer's motion for a directed verdict or for judgment n.o.v. We held that there was evidence from which the jury could have concluded that the insurer acted in bad faith in failing to settle within policy limits.
We here consider whether the Court of Special Appeals erred in holding that the theory set forth in White is applicable where no excess verdict has been rendered against the insured and the only "damages" to the insured are the expenses incurred in retaining excess counsel.
We have recognized an obligation by the insurer to assume the reasonable costs of the defense provided by an independent attorney where independent counsel is necessary because there exists a conflict of interest between the insurer and the insured. In Brohawn v. Transamerica Ins. Co., 276 Md. 396, 347 A.2d 842 (1975), an insurer brought a declaratory judgment action against its insured, seeking a declaration that a personal liability insurance policy afforded no coverage to the insured and imposed no duty upon the insurer to defend the insured in an action brought by injured third parties based on alternative allegations of negligence and assault. The policy expressly excluded from coverage any intentional acts committed by the insured, and the insured had pleaded guilty to assault in a criminal action arising out of the same incident. We there held that the trial court did not err in denying the declaratory judgment because the issue of intent would be decided in the underlying action. Id. at 406, 347 A.2d 842. We further indicated that the insurer's obligation to defend is determined by the allegations in the complaint; if the complaint alleges a claim covered by the policy, the insurer has a duty to defend. Id. at 407, 347 A.2d 842. Even if it is unclear, given the facts alleged, whether a claim is within policy coverage, the insurer must defend as long as the claim could potentially be covered by the policy. Id. at 407-08, 347 A.2d 842.
We made clear in Brohawn that a liability insurance policy not only carries with it the promise to indemnify up to policy limits, but also the promise to defend; in that regard it is "litigation insurance." Id. at 410-11, 347 A.2d 842.
Similarly, in Bankers & Ship. Ins. v. Electro Enter., 287 Md. 641, 415 A.2d 278 (1980), we held that an insurer was obligated to reimburse the insured for reasonable attorney fees incurred in a declaratory judgment action brought by the insurer to disclaim coverage and its obligation to defend the insured against claims brought by injured third parties. We held also that the insurer was liable to the insured for the costs of defending the underlying personal injury suits where the result of the declaratory judgment action was that the insurer had a duty to defend the insured. We said, with respect to a policy similar to that in the instant case:
"[A]n insurer is liable for the damages, including attorneys' fees, incurred by an insured as a result of the insurer's breach of its contractual obligation to defend the insured against a claim potentially within the policy's coverage, and this is so whether the attorneys' fees are incurred in defending against the underlying damage claim or in a declaratory judgment action to determine coverage and a duty to defend."
Id. at 648, 415 A.2d 278. In Government Employees Ins. Co. v. Taylor, 270 Md. 11, 310 A.2d 49 (1973), we held that an insured who successfully brought a declaratory judgment action against the insurer who denied coverage could recover attorney fees incurred in bringing the action.[3]
In urging application of the foregoing principles to the instant case, Campbell attempts to blend two separate causes of action  tort and contract  into one. He posits that when an insurer breaches its tort duty by refusing in bad faith to settle a claim within policy limits prior to trial, it, in effect, breaches its contractual duty to defend and at that point is liable for all costs incurred thereafter by the insured in seeking the advice of independent counsel.
It is generally held that if a liability insurer acts improperly in defending the insured it may become liable to the insured for the amount of judgment obtained against the insured which is in excess of the policy limits. See Annotation, Insurer's Bad Defense  Liability, 34 A.L.R.3d 533, § 2(a) at 537. Thus, if the insurer, in bad faith, fails to negotiate and bring about a settlement, the damage to the insured generally will be any excess judgment. 7C J.A. Appleman, Insurance Law and Practice, § 4711 at 414 (Berdal ed., 1979). See also Sobus v. Lumbermens Mutual Casualty Company, 393 F. Supp. 661 (D.Md. 1975), aff'd, 532 F.2d 751 (4th Cir.1976) (an insurer has a duty to conduct the insured's defense with reasonable care and it will be liable for an excess verdict caused by its negligence). It is also universally held that the insurer will be liable for expenses, including attorney fees, incurred by the insured in defending a suit after the insurer breaches the insurance contract by wrongfully refusing to provide a defense. See Robert E. Keeton & Alan I. Widiss, Insurance Law, § 9.5 at 1044-45 (1988). But we find no authority for the proposition that an insured may recover, under a theory of breach of the contractual duty to defend, attorney fees incurred in seeking independent counsel when the insurer has not declined to defend the insured, continues in fact to defend the insured, and ultimately settles, within policy limits, the claim against the insured prior to trial.
As we stated in Brohawn, supra, 276 Md. at 409-10, 347 A.2d 842, the duty to defend is a contractual obligation. As such, it cannot be extended beyond the terms of the contract. The Allstate contract provides that Allstate "will defend" Campbell if he is sued as the result of an automobile accident; that it "will pay for all damages" he becomes legally obligated to pay, within policy limits; and that it "may settle any claim or suit if [it] believe[s] it is proper." Thus, while it promises to defend Campbell and pay for damages within policy limits, it makes no promise that it will settle the claim within policy limits; it merely reserves the right to settle if it deems it appropriate. Therefore, under Brohawn, Campbell would not have a cause of action, based on a contractual duty to defend, against Allstate for its refusal initially to settle Baptiste's claim within policy limits.
Campbell concedes that Allstate did not refuse to defend him. He asserts, however, that when Allstate failed initially to settle the claim within policy limits, thereby exposing Campbell to the possibility of an excess verdict, it created a conflict of interest which left him no alternative but to retain independent counsel.
Under the terms of most liability insurance policies, the insured agrees to permit the insurer to choose counsel to defend the insured against claims by third parties. As we stated in Fid. & Cas. Co. v. McConnaughy, 228 Md. 1, 179 A.2d 117 (1962), this "customary clause in insurance policies ... is consent in advance by the insured to such dual representation and obviates an improper relationship." Id. at 10, 179 A.2d 117. However, if an actual conflict develops during the course of the representation, the attorney may not continue to represent both parties. Id.
Generally, the insurer and insured have compatible interests and goals in responding to a tort claim. However, their interests may diverge at times, creating a potential or actual conflict of interest. See Keeton, supra, § 7.6 at 808-10. We have recognized that the potential for a conflict of interest exists under liability insurance policies because of the insurer's exclusive control over the investigation, defense and settlement of a claim. See Sweeten, Adm'r. v. Nat'l. Mutual, 233 Md. 52, 55, 194 A.2d 817 (1963).
A common situation creating a conflict of interest is one where coverage is an issue. This occurred in Brohawn, supra, where the plaintiffs raised both covered and noncovered claims against the insured. Because it was in the insurer's interest to establish noncoverage, and in the insured's interest to be found liable only for the covered claims, it was necessary for the insurer to allow the insured to choose independent counsel.
When a claim exceeds the amount of applicable insurance, the potential for a conflict of interest may exist, particularly when there is an opportunity to settle the claim within policy limits, Keeton, supra, § 7.6 at 815, and where liability is not an issue. The insured, wishing to avoid the risk of a judgment in excess of policy limits, will desire to settle the claim as early as possible. The insurer, who risks nothing beyond the limits of the policy, may wish to delay settlement based upon a judgment that a more favorable settlement may be made at a later time. But their interests are in no way adverse to the extent that exists where coverage is an issue.
An insurer does not have an absolute duty to settle a claim within policy limits, although it may not refuse to do so in bad faith. 7C Appleman, supra, § 4711 at 390. But, while an insurer has a duty to enter into good faith negotiations "where reasonable and feasible" to settle a claim within policy limits, Sharrow v. State Farm Mutual, 306 Md. 754, 766, 511 A.2d 492 (1986), there is no requirement that it "rush to the settlement of a claim" against the insured to avoid an excess judgment. 7C Appleman, supra, § 4711 at 377.
An insurer's decision to reject, initially, an offer of settlement within the insured's policy limits is not enough, in itself, to create a conflict of interest as would require the insurer to give up direction of the defense of the insured.
"Since the insurer's decision [to reject a settlement offer] merely preserves and does not create the conflict of interests between the parties, it makes little sense to treat this decision as the basis for wresting from the insurer both the responsibility for and the right to continue to conduct the defense, including decisionmaking regarding the possibilities for settlement which may subsequently occur."
Keeton, supra, § 7.8 at 896. The insurer remains bound by a continuing duty to negotiate in good faith to settle the claim within policy limits. If the insurer should ultimately violate its duty regarding settlement, the insured's remedy lies in a tort action against the insurer for a bad faith failure to settle. See White, supra. The insured's damages in such a case are limited to the amount of any judgment in excess of policy limits.
We decline to extend a cause of action for bad faith failure of the insurer to settle a claim within policy limits to a failure to settle initially which is followed by a settlement by the insurer and full release of the insured. In our view, it is unreasonable to allow an insured, dissatisfied with the progress of settlement negotiations, to retain counsel either to monitor or attempt to take over the defense, and then require the insurer to reimburse the insured for the cost of that counsel. Therefore, a cause of action against the insurer for a failure, in bad faith, to settle a claim will not accrue prior to the entry of a judgment against the insured in excess of policy limits.
Of course, where there is the possibility of a judgment in excess of policy limits, it is appropriate for the appointed counsel to make the insured aware that there exists a potential for a conflict of interest and to advise the insured to consult independent counsel regarding any excess liability. But the existence of a potential conflict does not require the insurer to pay for independent counsel to take over the defense of the insured.[4] In the absence of a conflict of interest on other grounds that would necessitate the retention of independent counsel for the insured, the defense of the claim in such a situation remains in the control of the insurer.
We conclude, therefore, that the allegations contained in Campbell's complaint fail to state a claim upon which relief can be granted.
JUDGMENT OF THE COURT OF SPECIAL APPEALS REVERSED; CASE REMANDED TO THAT COURT WITH DIRECTIONS TO AFFIRM THE JUDGMENT OF THE CIRCUIT COURT FOR MONTGOMERY COUNTY. COSTS TO BE PAID BY ROBERT CAMPBELL.
NOTES
[1]  In relevant part, the Complaint alleged the following:

"6. Defendant is bound by contract and fiduciary duty to fully represent Plaintiff in the automobile action.
* * * * * *
"8. Defendant hired Rocco Nunzio, Esquire ... to represent Plaintiff.
"9. Mr. Nunzio projected to Allstate that a jury could responsibly return a verdict in excess of Plaintiff's policy limits.
"10. Kimberly Baptiste, through her counsel, offered to settle ... within the liability limits....
"11. Allstate's claims adjustor ... refused to settle....
* * * * * *
"18. Plaintiff's appointed counsel, Rocco Nunzio, had a conflict of interest between representing Mr. Campbell while [paid by] the Defendant....
"19. Due to Defendant's failure to defend in good faith, Plaintiff has been caused to procure counsel to represent him in [the underlying suit].
"20. Plaintiff's counsel properly and vigorously represented Mr. Campbell in the suit, incurring legal fees and expenses, as itemized in the attached bills.
* * * * * *
"22. Defendant refused to pay for the said legal representation."
[2]  Allstate asserts that the Court of Special Appeals also erred in concluding that a tort action for bad faith failure to settle sounded in negligence.
[3]  This rule awarding counsel fees to successful insureds in declaratory judgment actions is an exception to the longstanding principle, known as the American rule, that bars recovery of counsel fees to prevailing parties. We declined to extend this exception in Collier v. MD-Individual Practice, 327 Md. 1, 607 A.2d 537 (1992), where an insured sought to recover attorney fees incurred in an action brought to compel coverage under a health insurance policy.
[4]  The United States District Court for the District of Maryland, in Cardin v. Pacific Employers Ins. Co., 745 F. Supp. 330 (D.Md. 1990), in applying Maryland law, also rejected a "per se rule" which would require an insurer to pay counsel selected by the insured where there existed a possibility that the insurer and the insured might have "different objectives" with regard to the suit being defended by counsel appointed by the insurer. Id. at 336.
