
388 A.2d 25 (1978)
Peter FLORI d.b.a. Hope Concrete Mason Company
v.
ALLSTATE INSURANCE COMPANY.
No. 77-16-Appeal.
Supreme Court of Rhode Island.
July 20, 1978.
Abedon, Stanzler, Biener, Skolnik & Lipsey, Richard A. Boren, Providence, for plaintiff.
Higgins, Cavanagh & Cooney, Kenneth P. Borden, Providence, for defendant.

OPINION
JOSLIN, Justice.
In this Superior Court civil action a judgment was entered declaring that the defendant Allstate Insurance Company was obligated under its comprehensive general liability insurance policy to defend a tort action brought by John and Judith Mendes and Helen Vanasse against its insured, the plaintiff, Peter Flori. Allstate appealed.
In the late fall of 1974, Delmer R. Levesque, a general contractor, agreed with the Mendes, who owned and occupied a residential building in Coventry, to renovate a three-room, downstairs area of the Mendes' dwelling for occupancy by Mrs. Mendes' mother, Mrs. Vanasse. Levesque, in turn, subcontracted with Flori to perform the foundation and concrete work. Following commencement of that work, the premises were flooded. Thereupon, the Mendes and Vanasse commenced a tort action in the Superior Court against Flori and Levesque, alleging that both had negligently performed their undertakings and seeking to recover for the resulting damages.
At all times material hereto, Flori was insured by Allstate under a comprehensive general liability policy that protected him against liability for bodily injury and property *26 damage sustained by reason of acts or omissions while on the premises covered by the policy and engaged in his work as a concrete and foundation contractor. Excluded from coverage, however, was liability arising from "completed operations." The policy further provided that operations would be deemed completed, inter alia, when all operations to be performed by or on behalf of the insured under the contract had been completed, even if those operations required further service or repair because of defect or deficiency.
What happened following commencement of the Mendes-Vanasse suit against Flori is not entirely clear. Apparently Allstate, relying on the "completed operations" provision of its policy, denied coverage and refused to defend the case. In response, Flori invoked the policy's "duty to defend" clause[1] and commenced this action for a declaration of his and Allstate's respective rights, liabilities, and obligations under the policy.
At trial, the primary concern seems to have been the question of Allstate's ultimate liability under the policy, and attention largely centered on whether certain work done by Flori was intended to remedy work originally performed improperly or whether, as the trial justice concluded, the purpose of Flori's return to the job site was to perform additional work not called for by his original subcontract. The trial justice's decision, however, was not that Allstate would be obligated to indemnify Flori in the event of a successful prosecution of the tort suit against him, but "that said defendant, Allstate Insurance Co., shall be required to defend said suit."
On review our concern is with the trial justice's decision rather than with the reasoning that led thereto. Thus, we look to our cases which hold that an insurer's duty to defend hinges not on whether the insured may ultimately be liable, but on whether the complaint in the underlying tort action alleges facts and circumstances bringing the case within the coverage afforded by the policy. That question is resolved by comparing the complaint in that action with the policy issued by the insurer; if the complaint discloses a statement of facts bringing the case potentially within the risk coverage of the policy the insurer will be duty-bound to defend irrespective of whether the plaintiffs in the tort action can or will ultimately prevail. Angelone v. Union Mutual Insurance Co., 113 R.I. 230, 231, 319 A.2d 344, 345 (1974); Grenga v. National Surety Corp., 113 R.I. 45, 48, 317 A.2d 433, 435-36 (1974); Employers' Fire Insurance Co. v. Beals, 103 R.I. 623, 632, 240 A.2d 397, 402 (1968); Thomas v. American Universal Insurance Co., 80 R.I. 129, 133-34, 93 A.2d 309, 312 (1952).[2] This test determines an insurer's duty to defend even if the known facts conflict with the facts alleged in the third-party complaint. Missionaries of the Company of Mary, Inc. v. Aetna Casualty & Surety Co., 155 Conn. 104, 111-12, 230 A.2d 21, 25 (1967); Fragman Construction Co. v. Preston Construction Co., 1 Ill.App.3d 1002, 1007, 274 N.E.2d 614, 617 (1971).
Although it does not appear from the record that the trial justice applied this test, we are in as good a position as he was to compare the complaint with the policy. See Longo v. Monast, 70 R.I. 460, 463, 40 A.2d 433, 434 (1944). An examination of the complaint discloses the following allegations in Count V:
"3. The Defendant Peter Flori was negligent in the performance of his work, *27 labor, undertakings, and acts in connection with the foundation walls of the aforesaid project.
"4. As a direct and proximate result of the concurrent negligence of the Defendant Peter Flori with the negligence of the aforesaid Defendant Delmer R. Levesque and the Defendant Arctic Home Improvement Company * * * the Plaintiffs and each of them suffered the damages referred to in Count I * * *."[3]
These allegations fail to specify whether Flori's alleged negligence occurred before or after his operations would be deemed completed under the policy. The pleadings, therefore, leave in doubt whether a state of facts exists that will render inapplicable the completed operations exclusion. Under our rule that doubt must be resolved against Allstate. Employers' Fire Insurance Co. v. Beals, 103 R.I. at 632, 240 A.2d at 402-03.
The defendant's appeal is denied and dismissed, the judgment appealed from is affirmed, and the case is remanded to the Superior Court.
NOTES
[1]  The clause in the policy that defines Allstate's duty to defend provides in pertinent part:

"Allstate shall have the right and duty to defend any suit against the Insured seeking damages on account of such bodily injury or property damage, even if any of the allegations of the suit are groundless, false or fraudulent, and may make such investigation and settlement of any claim or suit as it deems expedient * * * ."
[2]  Allstate relies on Crook v. Kalamazoo Sales & Service, Inc., 82 R.I. 387, 110 A.2d 266 (1954) and Baker v. Maryland Casualty Co., 73 R.I. 411, 56 A.2d 920 (1948). In neither case did the court refer to the pleadings test. Insofar as those cases are inconsistent with and indistinguishable from the cases on which we rely and today's decision, they are overruled.
[3]  Count I, incorporated by reference in Count V and addressed primarily to the negligence of the general contractor and to the elements of damages, is not germane to this appeal.
