
459 P.2d 777 (1967)
BOSTON INSURANCE COMPANY, a corporation, Appellant (Plaintiff below),
v.
MADDUX WELL SERVICE, a corporation, Appellee (Defendant below).
No. 3767.
Supreme Court of Wyoming.
October 17, 1967.
R.R. Bostwick, of Murane, Bostwick, McDaniel, Scott & Greenlee, Casper, for appellant.
James L. Hettinger and Richard I. Leedy, Riverton, for appellee.
Before GRAY, C.J., and McINTYRE, PARKER, and McEWAN, JJ.
Mr. Justice McINTYRE delivered the opinion of the court.
Boston Insurance Company sought a declaratory judgment in an action against Maddux Well Service. The question presented in the declaratory judgment suit was whether Boston, as an insurer, was obliged to defend Maddux in a separate action which had been brought by two employees of Maddux for bodily injuries.
The district court entered a summary declaratory judgment holding Boston was obliged to defend for Maddux in the separate action. Boston, the insurance company, has appealed. We are disposed to agree with the action of the trial court.
As far as the declaratory judgment suit is concerned, there is no dispute of facts. The matter was presented on an agreed statement of facts. According to such statement, a fire occurred at an oil well belonging to Belco Petroleum Corporation, while Maddux was engaged in servicing the well. The fire resulted in personal injuries to the two employees of Maddux, Gary Pilcher and John Slane. Such employees were covered by workmen's compensation; and as covered employees of Maddux, they received the benefits provided in the Wyoming Workmen's Compensation Act.
Thereafter, Pilcher and Slane sued Belco for their damages alleging negligence on the part of Belco. In addition to denying negligence on its part, Belco filed a third-party complaint against Maddux and caused it to be served with summons as a third-party defendant.
*778 Belco alleged that no negligence on its part contributed as a proximate cause to the injuries and damages suffered by plaintiffs; that if the negligence of anyone other than plaintiffs themselves proximately caused plaintiffs' injuries, it was negligence attributable to employees of Maddux and not to employees of Belco; and that if Belco should be held responsible to plaintiffs, then Maddux is liable over to Belco for the whole amount of any judgments plaintiffs might obtain against Belco.

Insuring Agreements
Part I of that portion designated as INSURING AGREEMENTS, in the policy issued by Boston to Maddux, insures under coverages A, B, C and D. These coverages, insofar as pertinent to our decision, obligate the insurance company to pay on behalf of the insured all sums which the insured shall become legally obligated to pay as damages because of:
A. "bodily injury * * * caused by accident and arising out of the ownership, maintenance or use of any automobile."
B. "bodily injury * * * caused by accident."
C. "injury to * * * property * * caused by accident and arising out of the ownership, maintenance or use of any automobile."
D. "injury to * * * property * * caused by accident."
Part II of the Insuring Agreements then provides, with respect to such insurance as is afforded by the policy, the company shall:
"(a) defend any suit against the insured alleging such injury * * * and seeking damages on account thereof, even if such suit is groundless * * *." (Emphasis added.)
The term "such injury" as used in part II (a) of the policy can only refer to an injury specified in coverages A, B, C or D. As far as this case is concerned, we are interested in the injury specified in coverage B. It is "bodily injury" "caused by accident."
It is apparent Boston has agreed in its policy to defend any suit against Maddux, the insured, which alleges bodily injury caused by accident and seeks damages on account thereof  even if such suit is groundless.
As far as provisions of the policy under Insuring Agreements are concerned, the only questions to be considered are these:
1. Is there a suit against Maddux?
2. Is bodily injury, caused by accident, alleged in the suit?
3. Does the suit seek damages on account of bodily injury caused by accident?
Regarding question 1, there can be no doubt that the third-party complaint and summons served on Maddux constitutes a suit against Maddux.
With respect to question 2, there is attached to the third-party complaint a copy of the complaint of Pilcher and Slane, and also the third-party complaint contains admissions of the accident and of bodily injuries to Pilcher and Slane. It cannot be argued and is not argued that the suit fails to allege bodily injury caused by accident.
As to question 3, Belco has demanded judgment against Maddux for the amount of any judgments that might be rendered in favor of Pilcher and Slane against Belco. In other words, Belco seeks damages from Maddux to whatever extent it is damaged by judgments in favor of the parties suing Belco.
According to the insurance policy, it matters not whether the third-party suit against Maddux may have merit or be groundless; the insurer has agreed to defend *779 groundless as well as meritorious suits against its insured, if the suit alleges bodily injury caused by accident and if such suit seeks damages on account of such injury.

Exclusions
Under the title of EXCLUSIONS, in the insurance policy, the insurance company has excluded itself from liability in certain situations. The exclusion designated as (f) provides the policy does not apply:
"under coverages A and B, to any obligation for which the insured * * * may be held liable under any workmen's compensation * * * law * * *."
Appellant contends Maddux cannot be held liable to Pilcher and Slane beyond the benefits they received from workmen's compensation; and therefore appellant is not obliged to defend Maddux in the third-party suit of Belco.
It should be noted that exclusion (f) applies only to liability under coverages A and B. These coverages are included in part I of the Insuring Agreements. On the other hand, the obligation to defend is provided for in part II (a) of the Insuring Agreements. This obligation is no part of coverage A or B.
Coverage A has to do with automobile accidents. It has no application in this case. If we read coverage B along with exclusion (f), the effect is to say Boston has agreed to pay on behalf of Maddux all sums which Maddux shall become legally obligated to pay as damages because of bodily injury caused by accident, except that such agreement does not apply to any obligation for which Maddux may be held liable under the workmen's compensation law.
The exclusion amounts to nothing more than saying Boston has not agreed to pay on behalf of Maddux any obligation for which Maddux may be held liable under the workmen's compensation law. Apparently Maddux has already paid everything it is required to pay under the workmen's compensation law. At least, appellant claims it has and there is no claim or indication to the contrary.
In holding, as we do, that the agreement to defend provided for in part II (a) of the Insuring Agreements is something separate and apart from the agreement to pay contained in coverage B of part I and referred to in exclusion (f), we point out the trial court has made no decision concerning the liability of either Maddux or its insurance carrier to pay damages sought in separate litigation from the declaratory judgment suit. We likewise are making no determination with respect to such liability. That matter is not before us.

Authorities
We are not without precedent in reading the insurance policy issued by Boston to Maddux as we do. In Alm v. Hartford Fire Insurance Company, Wyo., 369 P.2d 216, 219, we indicated the obligation of the insurer must be found in allegations of the complaint rather than in proof of the facts. We also recognized as a general rule that the insurer is obligated to defend if there is potentially a case under the complaint within the coverage of the policy.
In Annotation, 50 A.L.R.2d 458, 465, the statement is made that it appears to be well settled that, generally speaking, the obligation of a liability insurance company under a policy provision requiring it to defend is to be determined by allegations of the complaint. Commencing on page 475, the annotation sets forth a number of cases which have rejected the theory that the result or outcome of the action determines the obligation to defend and which have held instead that the duty to defend does not depend on the insurer's liability to pay.
In Gray v. Zurich Insurance Company, 65 Cal.2d 263, 54 Cal. Rptr. 104, 419 P.2d 168, 177-178, the supreme court of California held an insurer's obligation to defend, under a policy which excluded coverage *780 when damage was intentionally caused, was not extinguished merely because the injured party recovered a judgment on the basis of a finding of wilful conduct on the part of the insured.
Because the insurance carrier failed to defend in the Gray case  when it should have defended despite its exclusion from liability to pay the damages  the California court held the insurer liable for damages suffered by the insured on account of the insurer having failed to defend. A judgment in favor of the insurance company was reversed; and the trial court was instructed to take evidence solely on the issue of damages, including the judgment which the injured party had obtained against the insured and the costs, expenses and attorney fees incurred in defending the suit of the injured party.
The case of Theodore v. Zurich General Accident and Liability Insurance Company, Alaska, 364 P.2d 51, 55, was quite similar to the case now before us. The insurance company in that case refused to defend because, in its opinion, the exclusive features of the Alaska Workmen's Compensation Act abrogated the right of decedent's mother to sue under maritime law. The court held, if an allegation made in the complaint comprehends an injury that may be within the policy, then the promise to defend includes it; and the promise is not contingent upon the allegation being true.
The promise to defend which Boston made to Maddux, in the policy we are concerned with, is not contingent upon the allegation being true that Maddux is liable over to Belco for any judgments Pilcher and Slane might obtain against Belco; neither is the promise to defend contingent upon the insurer's liability to pay something on behalf of the insured under coverage B in the policy.
We therefore are led to the conclusion that the district court properly held Boston obliged to defend Maddux in the suit wherein Maddux was brought in as a third-party defendant.
Affirmed.
