
183 Cal.App.4th 1004 (2010)
UNITED ENTERPRISES, INC., et al., Petitioners,
v.
THE SUPERIOR COURT OF SAN DIEGO COUNTY, Respondent.
ROYAL INDEMNITY COMPANY, Real Party in Interest.
No. D055879.
Court of Appeals of California, Fourth District, Division One.
March 24, 2010.
*1006 Barbara Suzanne Farley and Charles J. Wisch for Petitioners.
No appearance for Respondent.
Musick, Peeler & Garrett and Susan J. Field for Real Party in Interest.

OPINION
McINTYRE, J. 
Otay Land Company and Flat Rock Land Company sued United Enterprises, Inc., United Enterprises, Ltd., and U.E. Limited, L.P. (collectively United), in both federal and state courts for recovery of environmental response costs, damages, and other forms of equitable and statutory relief arising from the operation of a shooting range on property United owned on Otay Mesa between 1956 and 1988 (the underlying actions). Royal Indemnity Company (Royal), United's insurer for three years beginning in 1966, is defending United under a reservation of rights.
In September 2007, Royal filed its first amended complaint for declaratory relief alleging that it had no duty to defend United under the terms of its policy. Royal moved for summary judgment and summary adjudication. United responded by seeking a stay of further proceedings in the declaratory relief action pursuant to Montrose Chemical Corp. v. Superior Court (1993) 6 Cal.4th 287 [24 Cal.Rptr.2d 467, 861 P.2d 1153] (Montrose I). United argued that in responding to the summary judgment motion, it would be forced to marshal evidence that established its liability in the underlying actions. The *1007 court denied United's request for a stay but ordered that the record relating to the motion for summary judgment be sealed. United filed a petition for writ of mandate challenging the court's ruling. We conclude that Montrose I controls and grant the requested relief.

FACTUAL AND PROCEDURAL BACKGROUND

A. Royal's Insurance Policy

Under the relevant portion of the comprehensive general liability endorsement, Royal agreed "[t]o pay on behalf of the Insured all sums which the Insured shall become legally obligated to pay as damages because of bodily injury or property damage sustained by any person caused by an occurrence, and the Company shall defend any suit against the Insured alleging such bodily injury or property damage and seeking damages which are payable under the terms of this endorsement even if any of the allegations of the suit are groundless, false or fraudulent ...." (Italics added.) The policy defines "occurrence" as "an accident, including injurious exposure to conditions, which results, during the policy period, in bodily injury or property damage neither expected nor intended from the standpoint of the Insured ...." (Italics added.)

B. The Federal Action Against United

The third amended complaint filed by Otay Land Company and Flat Rock Land Company in the United States District Court alleged that activities United conducted on the propertysuch as operating the shooting range contaminated the land with numerous hazardous substances including lead. (Otay Land Co. v. U.E. Limited, L.P., case No. 03 CV 2488 BEN (POR).) Among the general allegations, the federal plaintiffs alleged: "30. The contamination at the Site is the result of a sudden and accidental occurrence, or a series of sudden and accidental occurrences, which began in approximately 1965, and continued until approximately 1997. The contamination has posed and continues to pose what [Resource Conservation and Recovery Act, 42 U.S.C. section 6972] describes as `an imminent and substantial endangerment to health and the environment.'" In the cause of action for nuisance, they alleged: "59. Defendants, and each of them, intentionally, recklessly or negligently placed, maintained, purchased, used, and/or disposed of Hazardous Substances, including without limitation, metals and other waste products in the soil, containers, sewer lines, storm drains, systems, and/or equipment at the Site in such a manner as to constitute a nuisance, in that defendants, and each of them, allowed such Hazardous Substances to enter the environment at and/or near the Site, thereby proximately causing the Site Contamination that continues to cause daily damage and injury to plaintiffs and to the environment at the Site, and interferes with plaintiffs' use and enjoyment of the Site."
*1008 The district court granted summary judgment in favor of United and against Otay Land Company and Flat Rock Land Company. In July 2009, the Ninth Circuit ruled that the case was not ripe for review as to cleanup costs, vacated the district court judgment, and remanded with directions to dismiss the complaint.

C. The State Action Against United

Two days after the federal district court granted United's motion for summary judgment, Otay Land Company and Flat Rock Land Company filed a separate lawsuit against United in San Diego County Superior Court. (Otay Land Company v. U.E. Limited, L.P., No. GIC869480.) Paragraphs 31 and 44 of their first amended complaint allege the same facts as paragraphs 30 and 59 of third amended federal complaint. The underlying state action was stayed pending final determination of the underlying federal action.

D. Royal's Action for Declaratory Relief

Among other things, Royal's first amended complaint seeks a judicial declaration that Royal does not owe a duty to defend or indemnify United in the underlying actions. In April 2009, Royal moved for summary adjudication and/or summary judgment on grounds "the underlying complaints do not allege that `property damage' was `caused by an "accident"' as required by the Policy and as defined by California law." Royal argued that its duty to defend turned on "whether United can show the underlying actions allege contamination potentially caused by `unexpected and unintended' conduct." The motion also addressed each of the other causes of contamination that Otay Land Company and Flat Rock Land Company identified in the pleadings, briefs and discovery materials extrinsic to the complaints in the underlying actions. The court set the hearing on Royal's summary judgment motion on August 21, 2009.
Royal included the following "undisputed facts" in support of its motion:
"16. The allegations in the Third Amended Complaint filed in the Underlying Federal Action, including the allegations of the shooting range's operation, do not allege `property damage' caused by an `accident.'
"17. Evidence extrinsic to the Second and Third Amended Complaints in the Underlying Federal Action shows that the Underlying Federal Action does not allege `property damage' that was caused by an `accident,' and which `property damage' occurred during the policy period.
"18. The allegations, extrinsic to the Second and Third Amended Complaints in the Underlying Federal Action, that certain Defendants `disked' the *1009 Site do not allege `property damage' that was caused by an `accident,' and which `property damage' occurred during the policy period.
"19. The allegations, extrinsic to the Second and Third Amended Complaints in the Underlying Federal Action, that certain defendants created an earthen berm on the Shooting Range contaminated with lead and [semivolatile organic compounds], do not allege `property damage' that was caused by an `accident,' and which `property damage' occurred during the policy period."
On June 10, 2009, United moved to stay the declaratory relief action pursuant to Montrose I. United argued that the summary judgment motion placed it in "an untenable conflict of interest." Specifically, United maintained that it "would first be forced to admit that the property is contaminated, which it does not admit in the Underlying Actions. [United] would then be forced to admit that shooting is an intentional act which foreseeably contaminated the real property, which [United] does not admit in the Underlying Actions. [United] would also be forced to raise arguments regarding the negligence claims against it by offering evidence of potential conduct that would support the claims made by the plaintiffs against it in the Underlying Actions. In short, to defend against Royal's summary judgment motion and obtain a defense in the Underlying Actions, [United] would be required to prove the central issue asserted against it by the plaintiffs in those Underlying Actions: that the property is contaminated by its own affirmative or negligent conduct or the negligence of its agents."
Royal opposed the stay, arguing that United would not be prejudiced by responding to the motion for summary judgment because the court could "determine as a matter of law whether the allegations in the Underlying Complaints, and the extrinsic information Royal obtained from the Underlying Actions, show a potential for liability by United for contamination `caused by an "accident."'" Royal also suggested at oral argument there were "less drastic" measures, such as sealing United's response to the motion for summary judgment, which would address United's concerns without issuance of a stay. United opposed that alternative.
After hearing argument on three separate occasions, the court found that "[g]iven the undisputed material facts, the way they are stated, ... [Royal] is putting the insured in a position where they will have to try to prove some of the things that they are actually trying to defend themselves from." Nonetheless, after considering the need to protect both the insurer and insured, and concluding that it had discretion under Montrose I, the court denied the stay and ordered that "[a]ll pleadings, affidavits, lodgments and other things submitted in support and opposition to [Royal's] motion for summary judgment... be filed under seal ...." The court made specific findings in *1010 accordance with California Rules of Court, rule 2.550(d) regarding its decision to seal the record: (1) the conflicting interests of Royal and United in the underlying actions and the declaratory relief action overrode the right of public access to the record; (2) the interest in Royal and United "being able to litigate differences between them over coverage without the necessity of being too careful about what might be disclosed in the record prejudicing [them] in the underlying case" supported sealing the record; (3) a substantial probability existed that absent sealing the record, United would be harmed in its underlying litigation in federal court; (4) the court would review the material subject to seal and make sure the proposed sealing was narrowly tailored; and (5) the alternative to sealing the record, that is, staying the declaratory relief proceedings, was not a less restrictive means to achieve the overriding interest. The court concluded, "I think it's appropriate to allow the motion to go forward so that the insurance company can have its day in court." The hearing on Royal's motion for summary judgment was reset for October 30, 2009.
United filed its petition for writ of mandate on September 15, 2009. We stayed further proceedings on the summary judgment motion, requested a response from Royal, and issued an order to show cause.

DISCUSSION
(1) The dispositive question in this petition for writ of mandate is whether the court's denial of United's motion for a stay of Royal's declaratory relief action pending resolution of the underlying actions was an abuse of discretion that will cause United irreparable injury. (Code Civ. Proc., § 1085, subd. (a).) As we explain, because factual issues to be resolved in the declaratory relief action overlap factual issues to be resolved in the underlying actions, the court was required to issue the stay. (Montrose I, supra, 6 Cal.4th at pp. 301-302; Great American Ins. Co. v. Superior Court (2009) 178 Cal.App.4th 221, 235 [100 Cal.Rptr.3d 258] (Great American).)
California courts have addressed the real and potential conflicts that arise between the insurer and insured in the layers of litigation involving coverage and defense of third party common law claims for personal injury, property damage, and, more recently, statutory claims for environmental cleanup. (See, e.g., Montrose I, supra, 6 Cal.4th at pp. 301-302; Gray v. Zurich Insurance Co. (1966) 65 Cal.2d 263, 274 [54 Cal.Rptr. 104, 419 P.2d 168] (Gray); San Diego Federal Credit Union v. Cumis Ins. Society, Inc. (1984) 162 Cal.App.3d 358 [208 Cal.Rptr. 494] (Cumis), superseded by Civ. Code, § 2860, as stated in Derivi Construction & Architecture, Inc. v. Wong (2004) 118 Cal.App.4th 1268, 1276, fn. 1 [14 Cal.Rptr.3d 329].) The courts in each case considered the divergent interests of the insured and insurer with the aim that each would *1011 receive a fair trial of coverage and liability issues at the appropriate time. (Montrose I, supra, 6 Cal.4th at pp. 299-302; Gray, supra, 65 Cal.2d at pp. 269, 274-275, fn. 14, 276; Cumis, supra, 162 Cal.App.3d at pp. 364-365.) Here, the court ruled that the interests of the insurer and insured were best served by sealing the summary judgment record and allowing the declaratory relief action to proceed. The difficulty with that resolution is that the court lacked discretion to fashion the alternative remedy in the circumstances of this case.
(2) We begin by summarizing the general principles applicable to declaratory relief actions involving the duty to defend. "`[T]he carrier must defend a suit which potentially seeks damages within the coverage of the policy.' [Citation.] Implicit in this rule is the principle that the duty to defend is broader than the duty to indemnify; an insurer may owe a duty to defend its insured in an action in which no damages ultimately are awarded. [Citations.]" (Horace Mann Ins. Co. v. Barbara B. (1993) 4 Cal.4th 1076, 1081 [17 Cal.Rptr.2d 210, 846 P.2d 792], original italics.) To decide whether a duty to defend exists, courts compare the allegations of the underlying complaint with the terms of the policy. (Ibid.) The court may also consider facts extrinsic to the complaint. (Montrose I, supra, 6 Cal.4th at pp. 295, 298-299.)
"Normally, the insurer must defend until the underlying action is resolved by settlement or judgment. However, circumstances may change such that there is no longer a potential for coverage by, for example, (1) the discovery of new or additional evidence, (2) a narrowing or partial resolution of claims in the underlying action, or (3) the exhaustion of the policy. [Citations.] When any such circumstances exist, an insurer may bring a declaratory relief action, in order to conclusively establish that there is no longer a duty to defend. [Citation.] To prevail in a declaratory relief action regarding the duty to defend (where the issue cannot be resolved as a matter of law), `the insured must prove the existence of a potential for coverage, while the insurer must establish the absence of any such potential. In other words, the insured need only show that the underlying claim may fall within policy coverage; the insurer must prove it cannot.' [Citation.]" (Great American, supra, 178 Cal.App.4th at pp. 234-235, fn. omitted, original italics.) In this case, Royal argued in the motion for summary judgment that the complaint and evidence gleaned from discovery in the underlying federal action showed there was no potential for coverage under its policy.
(3) In Montrose I, the Supreme Court addressed the timing of the declaratory relief action and concluded that a stay is "appropriate" where the factual issues to be resolved in the declaratory relief action overlap issues to be resolved in the underlying litigation. (Montrose I, supra, 6 Cal.4th at *1012 pp. 301-302.) "For example, when the third party seeks damages on account of the insured's negligence, and the insurer seeks to avoid providing a defense by arguing that its insured harmed the third party by intentional conduct, the potential that the insurer's proof will prejudice its insured in the underlying litigation is obvious. This is the classic situation in which the declaratory relief action should be stayed. By contrast, when the coverage question is logically unrelated to the issues of consequence in the underlying case, the declaratory relief action may properly proceed to judgment." (Id. at p. 302.) The court in Montrose Chemical Corp. v. Superior Court (Canadian Universal Ins. Co.) (1994) 25 Cal.App.4th 902 [31 Cal.Rptr.2d 38] (Montrose II), described specific ways the insured is prejudiced by concurrent litigation of the declaratory and third party actions: (1) the insurer will "join forces with the plaintiffs in the underlying actions as a means to defeat coverage"; (2) the insured will be "compelled to fight a two-front war, doing battle with the plaintiffs in the third party litigation while at the same time devoting its money and its human resources to litigating coverage issues with its carriers"; and (3) "the insured may be collaterally estopped from relitigating any adverse factual findings in the third party action, notwithstanding that any fact found in the insured's favor could not be used to its advantage." (Montrose II, supra, 25 Cal.App.4th at pp. 909-910.) A stay is required in the first and third type of prejudice involving factual overlap. (Id. at p. 910; Great American, supra, 178 Cal.App.4th at p. 235.) In other cases, the question whether to grant a stay or fashion some other remedy is left to the discretion of the trial court. (Great American, at pp. 235-236; Montrose II, supra, 25 Cal.App.4th at pp. 910-911.)
In this case, the court misread Montrose I and denied United's request for a stay of the declaratory relief action, even though it found that Royal's motion was "putting the insured in a position where they will have to try to prove some of the things they are actually trying to defend themselves from." We agree with United that the factual issues raised by facts numbered 16, 17, 18 and 19 of Royal's separate statement of undisputed facts overlap the cited allegations of the underlying actions. We therefore conclude that the court erred in denying United's request for a stay, and that the error constitutes an abuse of discretion justifying relief.
In reaching this conclusion, we reject as misplaced Royal's reliance on Haskel, Inc. v. Superior Court (1995) 33 Cal.App.4th 963 [39 Cal.Rptr.2d 520] as authority for sealing the record as an alternative to a stay of the declaratory relief action. That case addressed the issue of stay of discovery versus the use of a "confidentiality order" to limit the use and dispersal of information contained in the discovery responses, information that was not a part of the court record. (Id. at pp. 971-973.)
*1013 Given our conclusion that the court was required to stay the declaratory relief action once it found overlapping issues, we need not address the question whether the court abused its discretion in sealing the record.

DISPOSITION
Let a peremptory writ of mandate issue directing the superior court to vacate its August 20, 2009 order denying United's motion to stay Royal's action for declaratory relief, and enter an order granting the motion to stay the declaratory relief action until the underlying federal and state actions are fully and finally adjudicated. The stay issued by this court on September 25, 2009, is vacated. United is entitled to costs in the writ proceeding.
Haller, Acting P. J., and Aaron, J., concurred.
