
84 A.2d 614 (1951)
BOYLE
v.
NATIONAL CAS. CO.
No. 1132.
Municipal Court of Appeals for the District of Columbia.
Argued October 23, 1951.
Decided November 19, 1951.
Alfred Goldstein, Washington, D. C., for appellant.
Joseph C. McGarraghy, Washington, D. C., with whom Wilkes, McGarraghy & Artis, Washington, D.C., was on the brief, for appellee.
Before CAYTON, Chief Judge, and HOOD and CLAGETT, Associate Judges.
HOOD, Associate Judge.
Appellant, owner and operator of a restaurant business, purchased from appellee insurance company an insurance policy by which the company undertook to pay all sums, within specified limits, which the insured should become obligated to pay because of bodily injury sustained by any person, "caused by accident * * * and arising out of the ownership, maintenance or use" of the restaurant. The policy stipulated: "Assault and battery shall be deemed an accident unless committed by or at the direction of the Insured." The policy also provided that "as respects insurance *615 afforded by this policy" the insurance company should defend "any suit against the insured alleging such loss and seeking damages on account thereof, even if such suit is groundless, false or fraudulent."
On or about June 20, 1942, and while the policy was in force, a man named Pine was injured in insured's restaurant. Insured promptly notified the insurance company of the incident and an investigation was made by the insurance company. Following the investigation the insurance company orally notified insured that any liability arising out of the incident was not within the coverage of the insurance policy.
On August 12, 1942, Pine sued insured in the United States District Court for the District of Columbia for $50,000. Pine's complaint alleged that he was lawfully on the restaurant premises "when without just cause, reason or provocation, the defendant (insured) brutally and most cowardly with force and arms set upon the plaintiff (Pine), knocked him to the floor and beat and wounded the plaintiff, and gave him a compound fracture of the leg, which injury has since necessitated the amputation of said leg."
Insured engaged counsel who filed an answer to Pine's complaint. For reasons not here important trial of the case was not had until June 1948. A month or so before the trial insured's counsel wrote to the insurance company notifying it that the suit was pending and approaching trial and demanding that it defend the action. In reply the insurance company stated that this was the first notice to it of the pending suit, denied that the incident involved in the suit was covered by the policy, and concluded by saying that its letter "will confirm the oral disclaimer of coverage" previously given.
Pine's suit went to trial and the insured successfully defended it and then brought this action against the insurance company for $2,431.68, representing attorney's fees and other costs incurred in defending against Pine's suit. The trial court found in favor of the insurance company and insured has appealed.
The insurance company contends that because the insured delayed nearly six years before giving notice to the insurance company of pendency of the suit and calling on it to defend, there was a breach by the insured of the policy provision requiring insured to immediately forward any summons or other process received by him. In view of the disclaimer of liability by the insurance company immediately after notice to it and investigation by it of the incident, we think it is in no position to claim a default by insured in respect to further notice.[1]
We turn to the main question in the case. Was the insurance company obligated to defend the Pine suit on behalf of the insured? The nature of the coverage afforded by the policy is indicated by the use of the words "caused by accident" and it seems clear that under the policy provision an assault committed by or at the direction of the insured was not within the coverage of the policy. Insured does not contend otherwise but argues that regardless of the insurance company's responsibility to pay a judgment if one had been rendered against insured, there was a duty on the insurance company to defend the action.
The obligation of the insurance company to defend an action against insured, as distinguished from its obligation to pay a judgment in that action, by the overwhelming weight of authority is to be determined by the allegations of the complaint.[2] This obligation is not affected by facts ascertained before suit or developed in the process of litigation or by the ultimate outcome of the suit. If the allegations of the complaint state a cause of action within the coverage of the policy the insurance company must defend.[3] On the other hand, if the complaint alleges a liability *616 not within the coverage of the policy, the insurance company is not required to defend.[4] In case of doubt such doubt ought to be resolved in the insured's favor.[5]
In the instant case it is plain that Pine's complaint alleged a personal assault and battery committed by the insured and it is also plain that such a claim was outside the policy coverage. Under the test above stated, it follows that the insurance company was not obligated to defend.
The insured argues that the obligation to defend is separate and independent from the coverage provisions of the policy, and that the liability to pay is not coextensive with the liability to defend. He points out that the insurance company agreed to defend suits even though groundless, that the Pine suit was proved groundless by the verdict in that action, and therefore, he argues, the insurance company was required to defend it. This argument overlooks the fact that the agreement to defend was limited by the words "as respects insurance afforded by this policy." There has been a lack of unanimity among the cases as to whether the undertaking to pay and the undertaking to defend are independent undertakings.[6] However we think it is agreed that the duty to defend is broader than the duty to pay, and under certain circumstances an insurer may be compelled to pay the costs of defense even though not liable to pay the judgment against the insured.[7] Nevertheless there are few, if any, cases holding that an insurer is bound to defend a complaint stating a claim clearly beyond the coverage of the policy.[8] And we know of no case holding that under policy provisions like those here involved the insurer must defend all groundless suits irrespective of the coverage provisions of the policy.
The insured says it was error on the part of the trial court not to allow testimony as to the evidence developed at the trial of the Pine suit, but, as we have said, the insurance company's duty to defend was measured by the allegations of the complaint and not by the evidence developed at the trial. While we do not agree with all the reasoning of the trial court in reaching its decision, such decision was correct and must be affirmed.
Affirmed.
CLAGETT, Associate Judge, sat during the argument of this case, but died before it was decided.
NOTES
[1]  John Alt Furniture Co. v. Maryland Casualty Co., 8 Cir., 88 F.2d 36; Utilities Ins. Co. v. Smith, 10 Cir., 129 F.2d 798.
[2]  Appleman, Insurance Law and Practice, § 4683.
[3]  Goldberg v. Lumber Mut. Casualty Ins. Co. of New York, 297 N.Y. 148, 77 N. E.2d 131; Grand Union Co. v. General Accident, etc., Assur. Corp., 254 App. Div. 274, 4 N.Y.S.2d 704, affirmed, 279 N.Y. 638, 18 N.E.2d 38; Socony Vacuum Oil Co. v. Continental Casualty Co., 144 Ohio St. 382, 59 N.E.2d 199; Springfield Tp. v. Indemnity Ins. Co. of North America, 361 Pa. 461, 64 A.2d 761; Leonard v. Maryland Casualty Co., 158 Kan. 263, 146 P.2d 378; Lamb v. Belt Cas. Co., 3 Cal.App.2d 624, 40 P.2d 311.
[4]  Fessenden School, Inc., v. American Mut. Liability Ins. Co., 289 Mass. 124, 193 N.E. 558; Brodek v. Indemnity Ins. Co. of North America, 292 Ill.App. 363, 11 N.E.2d 228.
[5]  Pow-Well Plumbing & Heating, Inc., v. Merchants Mut. Casualty Co., 195 Misc. 251, 89 N.Y.S.2d 469. See Lee v. Aetna Casualty & Surety Co., 2 Cir., 178 F.2d 750, 753, where Judge Learned Hand discusses the situation which may arise if during the course of trial, because of the "plasticity of modern pleading," the character of the claim should change.
[6]  See Lumbermen's Mut. Casualty Co. v. McCarthy, 90 N.H. 320, 8 A.2d 750, 126 A.L.R. 894, and cf. American Casualty Co. of Reading, Pa. v. Howard, 4 Cir., 187 F.2d 322. See also Hoosier Casualty Co. v. Chimes, Inc., D.C.E.D.Mich., 95 F.Supp. 879, applying the law of Michigan, and cf. Duval v. Aetna Casualty & Surety Co., 304 Mich. 397, 8 N.W.2d 112.
[7]  Lee v. Aetna Casualty & Surety Co., 2 Cir., 178 F.2d 750, affirming D.C., 81 F.Supp. 1008.
[8]  Cf. Hardware Mut. Casualty Co. v. Hildebrandt, 10 Cir, 119 F.2d 291.
