
23 Cal.App.4th 1774 (1994)
29 Cal. Rptr.2d 32
HARTFORD ACCIDENT & INDEMNITY CO. et al., Petitioners,
v.
THE SUPERIOR COURT OF THE CITY AND COUNTY OF SAN FRANCISCO, Respondent; SYNTEX CORPORATION et al., Real Parties in Interest.
Docket No. A062833.
Court of Appeals of California, First District, Division Three.
April 8, 1994.
*1777 COUNSEL
Gordon & Rees, Donald W. Rees, G. Christopher Ritter, David C. Capell and Joseph T. Burke for Petitioners.
No appearance for Respondent.
Lester, Schwab, Katz & Dwyer, Howard Lester, Eric A. Portuguese, Jon O. Nygaard, Heller, Ehrman, White & McAuliffe, Charles F. Robinson, K. Louise Francis and Barry S. Levin for Real Parties in Interest.
OPINION
CHIN, J.
This petition for writ of mandate presents an issue of first impression in California: does a primary insurer's duty to defend continue after a dispute arises over exhaustion of policy limits but before the insurer has established in court that its coverage limits have been exhausted? The superior court ruled that the duty to defend continues until the insurer proves in a coverage action that the policy limits have been exhausted. We conclude the court correctly applied Horace Mann Ins. Co. v. Barbara B. (1993) 4 Cal.4th 1076 [17 Cal. Rptr.2d 210, 846 P.2d 792] and anticipated Montrose Chemical Corp. v. Superior Court (1993) 6 Cal.4th 287 [24 Cal. Rptr.2d 467, 861 P.2d 1153] (Montrose). We further conclude, however, that the duty existing during this interim period should be considered contingent. A primary insurer which ultimately proves earlier exhaustion of limits may obtain reimbursement for expenses for which other insurers are obligated. We deny the petition.

Facts and Procedure
In an attempt to make our analysis clear, we simplify a complex, multiparty insurance coverage case. Real parties in interest Syntex Corporation, Syntex (U.S.A.) Inc., Syntex Laboratories, Inc., and Syntex Agribusiness, Inc. (Syntex), are accused of playing a role in the deliberate distribution of toxic chemicals (dioxins) on various dirt roads and horse arenas in the State of Missouri. Petitioner Hartford Accident & Indemnity Co. (Hartford) provided primary coverage for Syntex between 1970 and 1976 and accepted, under a reservation of rights, the duty to defend public actions brought by the State of Missouri and the United States and more than 66 private actions brought by more than 2,500 plaintiffs against Syntex, alleging dioxin-related bodily injury and property damage. On June 24, 1988, after several years of *1778 defending actions against Syntex and paying settlements of $4.1 million in these actions, Hartford withdrew its defense, claiming the applicable limits for each of its policies had been exhausted.
Syntex asked its excess carriers to take over the defense and payment of the dioxin actions, but they declined, contending Hartford had not yet exhausted its policy limits. Hartford sought in a declaratory relief action to establish that, if the policy covered the incidents, its limits had been exhausted.
Exhaustion of the seven Hartford policies, six of which contain a $300,000-per-occurrence limit but no aggregate limit for bodily injury payments, turns on how many covered occurrences took place. If, as Hartford claims, there were few separate occurrences, the Hartford policies were exhausted. If, instead, there were many separate occurrences, Hartford was wrong about when its policies were exhausted. The superior court has not yet decided how many occurrences took place. For three and one-half years the coverage action was stayed to avoid interfering with the defense of the underlying dioxin actions.
Syntex sought summary adjudication that Hartford prematurely withdrew its defense. After hearing, the court granted the motion, stating: "There is no triable issue of material fact.... Hartford's duty to defend is proven as a matter of law because the Court finds a potential for coverage exists under Hartford's primary [comprehensive general liability] policies and that exhaustion of the applicable limits under the policies has yet to be proven as a matter of law." This petition followed.

Duty to Defend
(1) The key principles surrounding the duty to defend are well established. The Supreme Court restated them in Montrose: "In Horace Mann Ins. Co. v. Barbara B. (1993) 4 Cal.4th 1076 [17 Cal. Rptr.2d 210, 846 P.2d 792] (Horace Mann), we observed: `[A] liability insurer owes a broad duty to defend its insured against claims that create a potential for indemnity. (Gray v. Zurich Insurance Co. [1966] 65 Cal.2d 263 [54 Cal. Rptr. 104, 419 P.2d 168] (Gray)].) As we said in Gray, "the carrier must defend a suit which potentially seeks damages within the coverage of the policy." (Id. at p. 275, italics in original.) 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, supra, 4 Cal.4th at p. 1081.)" (Montrose, supra, 6 Cal.4th at p. 295.)
*1779 "`The determination whether the insurer owes a duty to defend usually is made in the first instance by comparing the allegations of the complaint with the terms of the policy. Facts extrinsic to the complaint also give rise to a duty to defend when they reveal a possibility that the claim may be covered by the policy. (Gray, supra, 65 Cal.2d at p. 276.)' (Horace Mann, supra, 4 Cal.4th at p. 1081.) As one Court of Appeal has put it, `[f]or an insurer, the existence of a duty to defend turns not upon the ultimate adjudication of coverage under its policy of insurance, but upon those facts known by the insurer at the inception of a third party lawsuit. [Citation.] Hence, the duty "may exist even where coverage is in doubt and ultimately does not develop." [Citation.]' (Saylin v. California Ins. Guarantee Assn. (1986) 179 Cal. App.3d 256, 263 [224 Cal. Rptr. 493].)" (Montrose, supra, 6 Cal.4th at p. 295.)
(2) "The defense duty is a continuing one, arising on tender of defense and lasting until the underlying lawsuit is concluded (Lambert v. Commonwealth Land Title Ins. Co. (1991) 53 Cal.3d 1072, 1077, 1079 [282 Cal. Rptr. 445, 811 P.2d 737]) or until it has been shown that there is no potential for coverage, as we demonstrate below. Imposition of an immediate duty to defend is necessary to afford the insured what it is entitled to: the full protection of a defense on its behalf. (See Signal Companies, Inc. v. Harbor Ins. Co. (1980) 27 Cal.3d 359, 367 [165 Cal. Rptr. 799, 612 P.2d 889, 19 A.L.R.4th 75].)" (Montrose, supra, 6 Cal.4th at p. 295.)
"The insured's desire to secure the right to call on the insurer's superior resources for the defense of third party claims is, in all likelihood, typically as significant a motive for the purchase of insurance as is the wish to obtain indemnity for possible liability. As a consequence, California courts have been consistently solicitous of insureds' expectations on this score. [Citations.]" (Montrose, supra, 6 Cal.4th at pp. 295-296.)

Exhaustion of Policy Limits
(3) "There are two levels of insurance coverage  primary and excess. Primary insurance is coverage under which liability `attach[es] to the loss immediately upon the happening of the occurrence.' [Citation.] Liability under an excess policy attaches only after all primary coverage has been exhausted. [Citation.]" (North River Ins. Co. v. American Home Assurance Co. (1989) 210 Cal. App.3d 108, 112 [257 Cal. Rptr. 129].) An excess carrier is not normally responsible for any of the costs of defense incurred before the primary coverage is exhausted, but an excess carrier has a duty to defend after the primary coverage is exhausted unless the excess policy provides to *1780 the contrary. (Pacific Indemnity Co. v. Fireman's Fund Ins. Co. (1985) 175 Cal. App.3d 1191, 1198 [223 Cal. Rptr. 312].)
If an excess carrier shirks its duty to defend after exhaustion of the primary policy and the primary carrier continues to provide a defense under a reservation of rights, principles of equity compel the excess carrier to reimburse the primary carrier for the excess carrier's share of the defense costs. (Aetna Cas. & Surety Co. v. Certain Underwriters (1976) 56 Cal. App.3d 791, 800-804 [129 Cal. Rptr. 47]; accord, Pacific Indemnity Co. v. Fireman's Fund Ins. Co., supra, 175 Cal. App.3d at pp. 1196-1201.)

Montrose
Montrose, supra, 4 Cal.4th 287, decided shortly after we issued the alternative writ in this case, is central to the issue here because Montrose explained the relationship between the duty to defend and summary judgment procedures. Montrose first considered whether facts known to the insurers and extrinsic to the third party complaint could defeat the defense duty. The insurers in Montrose adduced evidence which could support an inference the alleged contamination resulted from the insured's deliberate practices rather than from an accident or occurrence. (Id., at pp. 293-294.) Montrose resolved an appellate court conflict by upholding use of such extrinsic evidence. However, the court held that, in the case before it, even the extrinsic evidence could not defeat the potential for coverage and therefore the duty to defend. (Id., at pp. 296-301.)
The court then explained how summary adjudication procedures mesh with the duty to defend: "It is appropriate to recall at this point the procedural ramifications of rulings on motions for summary judgment in actions seeking a declaration of the existence or nonexistence of the duty to defend. When an insured successfully moves for summary judgment that the insurer owes a defense duty, the insurer's duty is clear. If an insurer successfully moves for summary judgment that it owes no duty to defend, the absence of a duty is clear. But an unfavorable ruling on the insured's motion does not establish the absence of a defense duty; it merely means that the question whether the insurer must defend is not susceptible of resolution by undisputed facts, but instead must go to trial. In the interim, presumably there continues to exist a potential for coverage and thus a duty to defend. As we said in Horace Mann, supra, 4 Cal.4th at page 1085, when the evidence adduced in the declaratory relief action does not permit the court to eliminate the possibility that the insured's conduct falls within the coverage of the policy, `the duty to defend is then established, absent additional evidence *1781 bearing on the issue.' (Ibid.) If the insurer, having defeated the insured's motion for summary judgment, seeks to escape the defense duty altogether, it must present proof of the kind described in the preceding paragraph, i.e., evidence that the underlying claim cannot come within the policy coverage by virtue of the scope of the insuring clause or the breadth of an exclusion. In order to avoid any possibility that a refusal to defend may subject it to eventual liability for bad faith, the insurer is well advised to seek a judicial determination that it owes no defense. This it may do by means of a cross-motion for summary judgment in the declaratory relief action." (Montrose, supra, 6 Cal.4th at p. 301, original italics omitted, italics added, fn. omitted.)

Montrose's Application to the Exhaustion Issue
(4) As revealed by Montrose, the duty to defend begins when a potential for coverage arises, and the duty continues until the insurer proves otherwise. Consistent with Fireman's Fund Ins. Co. v. Chasson (1962) 207 Cal. App.2d 801, 807 [24 Cal. Rptr. 726], a declaratory judgment of no coverage, either by summary judgment or after trial, does not retroactively relieve the primary insurer of the duty to defend. It only relieves the insurer of the obligation to continue to defend after the declaration.
(5) The issue here, however, is not whether a potential for coverage and therefore a duty to defend ever existed. All agree the Hartford policies potentially cover the dioxin actions. The issue here is exhaustion of the Hartford policies.
Although Montrose is factually distinguishable, we conclude it applies here. Hartford could not unilaterally terminate a defense for which it potentially is responsible. When a dispute arises over exhaustion of policy limits, a primary insurer must defend until it obtains a declaratory judgment or summary judgment that it has exhausted its policy limits.
Montrose does not imply or suggest, however, that it overrides the settled principle that a primary insurer is entitled to reimbursement from an excess carrier that improperly refuses to assume its duty of defense upon exhaustion of the primary policy. Thus, the primary insurer's duty to defend is only a contingent duty in the interim period after a dispute over exhaustion of limits arises. If Hartford had provided a defense during the period between actual *1782 exhaustion of policy limits and proof of exhaustion, it could have obtained reimbursement from excess carriers obligated for that defense.[1]
The court here summarily adjudicated that Hartford's duty to defend continues. Although the court did not state that the duty was contingent, neither did it conclude it was unconditional. Interpreting the order in favor of its validity, we conclude the court found a contingent duty to defend.
The alternative writ is discharged and the petition for a peremptory writ of mandate is denied.
White, P.J., and Werdegar, J., concurred.
NOTES
[1]  We express no opinion about the conditions under which an insured without excess coverage might be required to reimburse the primary insurer for the defense costs incurred during this interim period.
