
150 N.W.2d 233 (1967)
IOWA NATIONAL MUTUAL INSURANCE COMPANY, Respondent,
v.
UNIVERSAL UNDERWRITERS INSURANCE COMPANY, Appellant.
No. 40123.
Supreme Court of Minnesota.
April 21, 1967.
*234 Mordaunt, Walstad, Cousineau & McGuire, Minneapolis, for appellant.
King, MacGregor & Lommen, and John J. Roseen, Minneapolis, for respondent.

OPINION
MURPHY, Justice.
This is an appeal from a judgment of the district court allowing Iowa National Mutual Insurance Company recovery against Universal Underwriters Insurance Company for expenses of investigation and attorneys' fees in connection with an asserted defense in a personal injury action in which the two companies had overlapping coverage.
Stated broadly, the controlling issue is whether expenses incurred by an "excess carrier" from the time it tendered defense until the "primary carrier" accepts the defense are recoverable where there is a *235 bona fide dispute as to the nature and extent of liability as between the two carriers.
It is necessary only to make brief reference to the facts out of which this dispute arises. They are fully stated in a prior decision of this court, Lowry v. Kneeland, 263 Minn. 537, 117 N.W.2d 207. In that case, Kneeland was involved in an automobile accident while driving and operating an automobile owned by Mitchell Boyer, Inc., which was insured by Universal. Iowa National insured Kneeland's automobile, which policy contained the provision that "the insurance with respect to a temporary substitute automobile or non-owned automobile shall be excess insurance over any other valid and collectible insurance." The party injured in the collision instituted an action against Kneeland and Mitchell Boyer, Inc. Iowa National's counsel interposed an answer for Kneeland, and Universal interposed an answer for Mitchell Boyer, Inc. Universal refused to defend Kneeland under its contract of insurance and was brought into the action by a third-party complaint. In proceedings in the district court to determine the responsibility of the two companies, the question was certified to this court as important and doubtful, and by a 4 to 3 decision it was held that at the time of the accident Kneeland was an employee of Mitchell Boyer, Inc. We accordingly held that Universal, Mitchell Boyer, Inc.'s insurer, was the primary carrier. After this, Universal settled the case. Iowa National then brought this action, seeking reimbursement for expenses of investigation, attorneys' fees, and other charges in connection with the defense and third-party proceedings. By its complaint Iowa National alleges:
"That the defendant, Universal Underwriters, by its refusal to accept the defense of H. H. Kneeland in the first instance, which it properly should have done under the terms of its insurance policy with Mitchell Boyer, Inc., has caused the plaintiff, Iowa National, to incur by reason of defendant's breach of contract investigation expense, attorney's fees, together with other costs and expenses * * *."
The trial court found that Iowa National incurred investigating expenses in the sum of $405.48 and reasonable attorneys' fees in the sum of $2,410, and allowed costs and interest, making a total judgment of $3,703.83.
While it appears from the complaint that Iowa National predicates its right to recovery on a breach of contract, from an examination of the proceedings in district court and a review of the arguments presented in this court, both orally and by brief, it appears that Iowa National contends that recovery might be allowed on various theories, including indemnity, contribution, subrogation, or some other equitable principle growing out of a circumstance by which Universal is said to have been unjustly enriched by reason of the expenses incurred by Iowa National. We examine the issues to determine if Iowa National is entitled to recover on any theory.
1. The authority principally relied upon by Iowa National is Morrison v. Swenson, 274 Minn. 127, 142 N.W.2d 640, which involved a declaratory judgment action by which the insured sought to determine the obligation of his insurer under the terms of the policy issued to him. After holding that the policy did in fact provide coverage for the insured, we went on to say that since the insured was forced to incur legal fees in having his rights determined, the defendant insurance company should reimburse him for the expenses incurred. Recovery was based upon damages for breach of the insurance contract. In noting that "legal fees are ordinarily not recoverable unless there is statutory authority for it," we held that an exception applied in that situation. We said, "We think that the injured party in an action of this kind ought to be permitted to recover whatever expenses he has been compelled to incur in *236 asserting his rights, as a direct loss incident to the breach of contract." 274 Minn. 137, 138, 142 N.W.2d 647. Iowa National reasons from this that, if Kneeland himself had prevailed in an action against Universal, he could recover costs and attorneys' fees; and that Iowa National by reason of the subrogation agreement in Kneeland's policy has acquired his rights.
The principle expressed in Morrison to the effect that an insurance company is liable to the insured for damages arising as a result of refusal to undertake a defense of an action based upon a claim within the coverage of its policy has been stated in a great many cases. Butler Bros. v. American Fidelity Co., 120 Minn. 157, 139 N.W. 355, 44 L.R.A.,N.S., 609; Annotation, 49 A.L.R.2d 696, 717; Mannheimer Bros. v. The Kansas Cas. & Surety Co., 149 Minn. 482, 184 N.W. 189; Note, 76 A.L.R.2d 996; Klemmer v. Ohio Cas. Ins. Co., 188 Minn. 209, 246 N.W. 896; Fruchtman v. State Farm Mutual Ins. Co., 274 Minn. 54, 142 N.W.2d 299; Berke Moore Co., Inc. v. Lumbermens Mutual Cas. Co., 345 Mass. 66, 185 N.E.2d 637; Southwestern Ind. Co. v. National Surety Corp. (5 Cir.) 277 F.2d 545. See, also, 37 Minn.L.Rev. 139.
We are not persuaded that these authorities support Iowa National's contentions. They are confined to the issue of a breach of contract in an action between the insured and the insurer. They do not relate to a dispute between two insurance companies having separate policies covering the same insured.
2. An authority which is more in point is American Surety Co. v. State Farm Mutual Auto. Ins. Co., 274 Minn. 81, 142 N.W.2d 304. That case considers the opposite side of the coin in that the positions of the excess and primary insurers are reversed. There, after settling for substantially less than its policy limits, the insurer with primary liability sought to recover from the excess-liability insurer one-half of the expenses and attorneys' fees incurred in defending the insured. We held that only when the actual recovery was for more than the primary insurer's policy limits, regardless of whether the original complaint sought damages in excess of the primary insurer's limits, did the excess insurer have an obligation to pay one-half of the expenses and attorneys' fees. That decision emphasizes the lack of contractual agreement between the insurers which would give the primary insurer the right to demand participation in the defense of the insured by the excess insurer or to recover compensation because of nonperformance. It emphasizes that no contractual obligation existed to make one insurer accountable to the other for a breach of its independent obligation to the insured. The obligation of defending an insured and paying for the defense is a separate obligation existing exclusively between the insurer and the insured.[1]
3. The principle expressed in American Surety Co. v. State Farm Mutual Auto. Ins. Co. supra, has been approved by authorities which we consider controlling. Mannheimer Bros. v. The Kansas Cas. & Surety Co., 149 Minn. 482, 184 N.W. 189; West American Ins. Co. v. Allstate Ins. Co. (10 Cir.) 295 F.2d 513; St. Paul Mercury Ins. Co. v. Huitt (6 Cir.) 336 F.2d 37; United States Fidelity & Guar. Co. v. Tri-State Ins. Co. (10 Cir.) 285 F.2d 579; Travelers Ins. Co. v. American Fidelity & Cas. Co. (D.Minn.) 164 F.Supp. 393. These authorities hold that, while it is true that a policy may limit coverage to excess insurance over collectible insurance, that does not limit the obligation of the excess insurer to defend. The obligation to defend is a separate undertaking from the duty to *237 provide coverage and pay a judgment. It was said in the Huitt case (336 F.2d 44):
"* * * The obligation to defend is separate and distinct from the duty to provide coverage and to pay. West American Ins. Co. v. Allstate Ins. Co. (C.C.A. 10, 1961) 295 F.2d 513; United States Fidelity & Guar. Co. v. Tri-State Ins. Co. (C.C.A. 10, 1960), 285 F.2d 579; 8 Appleman Insurance Law and Practice, Sec. 4685. This is a contractual right of the insured irrespective of other insurance and irrespective of primary or excess coverage. American Fidelity & Cas. Co. v. Pennsylvania Threshermen & Farmers' Mut. Casualty Ins. Co. (C.C.A. 5, 1960), 280 F.2d 453. The controversy between the two insurance carriers who have no contractual relationship to each other cannot operate to alter the obligation that each owes unto the insured, with whom they each have a contract. With regard to the providing of a defense, Huitt has double insurance and may call upon either or both carriers to fulfil their policy obligations in this respect."
In United States Fidelity & Guaranty Co. v. Tri-State Ins. Co. (10 Cir.) 285 F.2d 579, 582, an action by a carrier of excess automobile liability insurance to obtain contribution from a primary insurer with respect to the amount expended in the successful defense of liability claims presented against the insured, the court said:
"* * * The agreement to furnish such [defense], several with the two companies, is distinct from and in addition to the insuring agreement pertaining to liability. The question here thus narrows to whether contribution will lie between two insurance companies when each has a policy containing a defense agreement. The question has been answered in the negative, and we believe properly so, in a number of cases. The duty to defend is personal to each insurer. The obligation is several and the carrier is not entitled to divide the duty nor require contribution from another absent a specific contractual right."
4. We dispose of the contention that recovery may be supported on the basis of contribution by observing that the two companies have no joint liability or common obligation. Both were obligated to defend under separate contractual undertakings which would not support a common obligation for the purpose of invoking the principle of contribution. Hartford Acc. & Ind. Co. v. Anderson, 192 Minn. 200, 256 N.W. 185.
5. Nor do we think the right of recovery could be justified on principles of subrogation, either legal or conventional, since each of the companies had a separate and distinct obligation to defend. The equities between them are at best equal. Southern Surety Co. v. Tessum, 178 Minn. 495, 228 N.W. 326, 66 A.L.R. 1136. This issue was discussed in American Surety Co. v. State Farm Mutual Auto. Ins. Co., 274 Minn. 81, 85, 142 N.W.2d 304, 306, where we said:
"* * * To recover under this clause plaintiff would have to establish that its insured possessed a right of recovery against defendant either for attorney's fees or expenses incurred or other damages sustained by him because of defendant's breach of its obligations under the policy. Since he incurred no expenses or damages in this respect, and since the obligation for attorney's fees and expenses which plaintiff incurred was required under its own policy, it would follow that plaintiff acquired no rights against defendant under the subrogation clause referred to."
6. The charges upon which Iowa National's judgment is based grow out of expenses any automobile liability insurer would be expected to incur, particularly under circumstances where, as here, the obligations of overlapping insurers were in doubt. By its contract Iowa National undertook to pay damages for "bodily injury" *238 and "property damage," and to "defend any suit" alleging such damages "even if any of the allegations of the suit are groundless, false or fraudulent; but the company may make such investigation and settlement of any claim or suit as it deems expedient." In addition to paying damages up to the applicable limits, the company agreed to pay "[a]ll expenses incurred by the company, all costs taxed against the insured in any such suit and all interest on the entire amount of any judgment therein which accrues after entry of the judgment and before the company has paid or tendered or deposited in court that part of the judgment which does not exceed the limit of the company's liability thereon." Iowa National received premiums from Kneeland to assume the risk of insuring these expenses. Moreover, the expenses incurred in the third-party action were primarily expended to protect its own interests. These charges are not in the nature of a payment of a debt for which another was primarily liable. They are Iowa National's expense of doing business.
7. Iowa National also contends, under authority of Eicher v. Universal Underwriters, 250 Minn. 7, 83 N.W.2d 895, that it was relieved of the duty to defend because the amount of damages claimed in the injured party's complaint was within the limits of the primary insurer's coverage.
It is correct to say that, where there is no coverage by reason of an exclusionary clause, there is no obligation of the insurer to defend. Bobich v. Oja, 258 Minn. 287, 104 N.W.2d 19; Weis v. State Farm Mutual Auto. Ins. Co., 242 Minn. 141, 64 N. W.2d 366, 49 A.L.R.2d 688; Annotation, 49 A.L.R.2d 694, 710. But it is not safe to say that the duty to defend is to be determined only by the allegations of the injured party's complaint. Other factors must be considered as well, including the provisions of the insuring contract. In Crum v. Anchor Cas. Co., 264 Minn. 378, 390, 119 N.W.2d 703, 711, we noted that "[w]hether an insurer is under an obligation to defend is not always free from doubt until the case is actually tried." Lee v. Aetna Cas. & Surety Co. (2 Cir.) 178 F.2d 750, 752; Annotation, 50 A.L. R.2d 458; Woodrich Const. Co. v. Indemnity Ins. Co., 252 Minn. 86, 89 N.W. 2d 412; 7 Am.Jur.2d Automobile Insurance, § 162. The obvious validity of our observation in the Crum case is apparent here where it was not until after a decision by a divided court that the respective rights of the two insurers was determined.
It may be observed by way of dicta that an insurer may not safely assume that the limits of its duties to defend are fixed by the allegations a third party chooses to put in his complaint. While that rule would have appeal as an easy and convenient guide, it is not one to be relied upon under present practices where variances of proof from pleadings are generally tolerated and where relaxed pleading requirements under the Rules of Civil Procedure provide little assurance that the complaint of an injured party will reflect the full extent of his demands for relief.
Since, in the final analysis, the debt asserted by Iowa National represents charges incurred in its business operation pursuant to its contract, the judgment must be vacated.
Reversed.
PETERSON, J., not having been a member of this court at the time of the argument and submission, took no part in the consideration or decision of this case.
NOTES
[1]  An interesting and helpful note on this decision is contained in 51 Minn.L.Rev. 339. Other discussions of the obligation of carriers to defend are found in 34 Temple L.Q. 152; 4 Miami L.Q. 398; 114 U. of Pa.L.Rev. 734; 41 Ind.L.J. 87.
