Opinion
Respondent Val’s Painting and Drywall, Inc. (Val’s), filed an action in municipal court against appellant Allstate Insurance Company (Allstate). Allstate filed an amended cross-complaint seeking relief beyond the jurisdiction of the municipal court and the matter was transferred to superior court. The superior court sustained Val’s demurrer to the amended cross-complaint without leave to amend, entered an order of dismissal of the amended cross-complaint (Code Civ. Proc., § 581, subd. 3), and remanded the matter to the municipal court. Allstate appeals from the judgment of dismissal. (Code Civ. Proc., § 581d;
Keenan
v.
Dean,
Based upon the allegations of Allstate’s amended cross-complaint and court files of which the trial court apparently took judicial notice, 1 the facts may be stated as follows: Allstate issued Val’s a comprehensive general liability insurance policy. In Hendrick v. Ray-Cron, Inc., municipal court number 29736, and Iwan.ek v. Ray-Cron, Inc., superior court number 89121, complaints for personal injuries were filed alleging that on September 2, 1969, Hendrick and Iwanek were employed by Val’s as painters and were injured in a fall from a scaffolding furnished by Ray-Cron. The injuries were alleged to be due to an unsafe and defective condition of the scaffolding and the failure of Ray-Cron to furnish required safety equipment.
*580 Ray-Cron filed cross-complaints against Val’s, alleging that Val’s agent had signed an equipment rental agreement \yhich stated that Val’s acknowledged the equipment was in good working condition, that Val’s would use the equipment in a proper manner, and that Val’s agreed to exonerate, indemnify and save Ray-Cron harmless from all claims and liabilities to all parties for damage to person and property in any way arising out of the use of the equipment. Ray-Cron also alleged that the negligence and violation of safety orders of which the plaintiffs complained were in fact the negligence and violations of Val’s; that if the equipment was in a dangerous or defective condition such, condition arose after the rental, due to Val’s negligence in failing to use the equipmént in the proper manner or in failing to discover such defects. Ray-Cron further alleged that even if the equipment was in a dangerous or defective condition Val’s was obligated pursuant to the rental agreement to indemnify Ray-Cron for any liability to plaintiffs which might be found against Ray-Cron. 2
Val’s requested Allstate to provide a defense of the Ray-Cron cross-complaints. By letter dated August 21, 1970, Allstate advised Val’s that the policy did not cover liability based on a contractual indemnifying clause, and declined to defend. Subsequently Val’s again “insisted and requested” that Allstate defend the suits. Allstate agreed to defend under a “reservation of rights” stated in a letter to Val’s dated February 3, 1971, as follows:
“With respect to the occurrence of September 2, 1969 in which your company was involved you are hereby notified that Allstate Insurance Company in investigating the said accident or any claim arising therefrom, or negotiating for compromise settlement, or in making any settlement or defending any suit against you or others, or in any other way acting or failing to act, does not waive any of its rights or admit any obligations under the policy.
“We are making this reservation of rights because insurance policy 04 725 028 does not apply; ‘(a) To liability assumed by the insured under any contract or agreement except an incidental contract’; and, ‘(g) To any obligation for which the insured or any carrier as his insurer may be held liable under any Workmen’s Compensation, Unemployment or Disability Benefits Law, or under any similar law;’ and for other reasons.
*581 “The service of this notice upon you does not deprive you of any rights you may have against this company.
“The cross complaint for indemnification is being defended by Frederick W. Kosmo, Attorney at Law, 520 West Fifth Street, Oxnard, California.”
Allstate thereafter settled the municipal court action for $700 and the superior court action for $2,500. Allstate expended $3,639.94 on fees in defending those actions.
Val’s filed the instant action against Allstate to recover Val’s defense expenses for the initial period during which Allstate refused to defend. Val’s alleged that Allstate’s refusal to defend was wrongful. Allstate filed a cross-complaint alleging that it had no duty under the insurance policy to defend or indemnify Val’s for the Ray-Cron claims, that it had reserved its rights to contest coverage and the duty to defend, and that Allstate should be reimbursed by Val’s for all amounts it had spent on the actions, including both the attorney expenses and the settlements.
The trial court sustained, without leave to amend, Val’s demurrer to the amended cross-complaint, ruling in part as follows;
“It is further the Court’s opinion that if an insurance carrier in a comprehensive insurance coverage contract, as is involved in this situation, undertakes to provide a defense for the insured, it is also the insurance carrier’s obligation to pay for said defense. The Court can find no provision in the insurance contract for reimbursement by the insured to the insurance carrier for any amount of settlement that might have been negotiated and paid by the carrier, nor any provision for reimbursement to the insurance carrier for attorney fees or costs for an attorney hired by and under the control of the carrier. It is also to be noted that the control of the negotiations and settlement, pursuant to the contract in question, were solely in the control of and done exclusively by the carrier.”
Contentions
Allstate contends that the trial court erred in sustaining the demurrer without leave to amend because the cross-complaint stated, or could be amended to state, a cause of action for reimbursement of defense costs and the amounts paid in settlement. Val’s contends that the order was correct because Allstate had a duty to defend, and, having elected to *582 defend and settle the claims, may not now seek reimbursement from its insured.
We conclude that a distinction must be drawn between Allstate’s duty to defend the actions and Allstate’s duty to indemnify Val’s under the policy. As to the former, we find that under the circumstances of this case Allstate had the duty to defend because the Ray-Cron claims were potentially within policy coverage, and that Allstate is therefore not entitled to recover its attorney and legal expenses in defending those actions.
As to the duty to indemnify Val’s under the policy, there is a possibility Allstate can amend its pleadings to show that the claim was not covered by the policy, that Allstate adequately reserved its right to contest the issue and that Allstate can now seek recovery of the amounts paid on Val’s behalf to settle the claims. Since Allstate has been given no opportunity to amend, it is necessary to reverse the judgment for this purpose.
Duty To Defend
If an insurer wrongfully refuses to defend the insured, the insurer may be held liable for the judgment rendered against the insured in the third party action.
(Gray
v.
Zurich Insurance Co.,
We need not determine if Allstate’s reservation of rights was sufficient for this purpose, because, based upon the cross-complaint and the court files judicially noticed, Allstate had the duty to defend the Ray-Cron claims, and therefore Allstate is not entitled in any event to recovery of the defense costs.
Gray
v.
Zurich Insurance Co., supra,
Reviewing the policy and the Ray-Cron claims we conclude Allstate had the duty to defend. The policy provides “comprehensive general liability insurance.” Allstate promises to pay on behalf of the insured all sums which the insured shall become legally obligated to pay as damages because of bodily injury to which this insurance applies. Allstate has 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. The policy contains the following exclusions from coverage: (a) liability assumed by the insured under any contract or agreement except an incidental contract; (g) any obligation for which the insured or any carrier as his insurer may be held liable under any workmen’s compensation, unemployment compensation or disability benefits law, or under any similar law; and (h) bodily injury to any employee of the insured arising out of and in the course of his employment by the insured, but this exclusion does not apply to liability assumed by the insured under an incidental contract.
The Ray-Cron cross-complaints against Val’s arose out of a suit for damages for bodily injury, a risk which was of the nature and kind covered by the insurance policy. It is possible to detect two basic theories of the Ray-Cron cross-complaint. The first is implied indemnity, by which Ray-Cron alleged that if Ray-Cron were held liable for the injuries to Val’s employees, Val’s was obligated to indemnify Ray-Cron, on the ground that Ray-Cron’s negligence was passive and secondary whereas Val’s negligence was active and the primary cause of the accident. (See, e.g.,
Ferrel
v.
Vegetable Oil Products Co.,
The purpose of Labor Code section 3864, enacted in 1959, was to eliminate the employer’s liability for implied indemnity in the absence of a written agreement, because implied indemnity imposed a greater burden on the employer than was contemplated under the workers’ compensation system. (Pacific
Gas & Elec. Co.
v.
Morse, 6
Cal.App.3d 707, 713 [
Although the exclusion in Val’s policy for “liability assumed by the insured under any contract or agreement except an incidental contract” might be intended to exclude from coverage a written agreement of the type mentioned in Labor Code section 3864, the fact that Allstate may not be liable to indemnify the insured does not necessarily mean there is no duty to defend. Under
Gray,
the duty to defend is broader than the duty to indemnify. (See
Blackfield
v.
Underwriters at Lloyd's, London,
If Ray-Cron had sued Val’s for implied indemnity without alleging a written agreement, Allstate would have been obligated to defend because the case involved a risk the nature and kind of which was covered by the comprehensive policy. The defense would have been an easy one, namely, a demurrer for failure to state a cause of action by virtue of Labor Code section 3864. (E.g.,
Progressive Trans. Co.
v.
Southern California Gas Co.,
*585
The fact that Ray-Cron specifically alleged a written agreement would not necessarily preclude Allstate’s duty to defend. Val’s might have a valid defense to the written agreement, for example, that Val’s -agent lacked authority to enter into a written indemnity agreement, that the agreement was a contract of adhesion, or that the terms of the written agreement narrowly construed, did not cover the facts in question or exculpate the indemnitee from his own negligence. (See
Western Gulf Oil Co.
v.
Oilwell Service Co.,
Thus, applying the test of
Gray
v.
Zurich Insurance Co., supra,
Reimbursement For Settlement Costs
As we have seen, the duty of an insurer to defend the insured may be broader than its duty to indemnify the insured under the terms of the policy. The insurer’s “dilemma”
3
is how to defend the action without being held to have waived its claim of noncoverage of the policy. (E.g.,
J. Frank & Co.
v.
New Amsterdam C. Co.,
Gray
v.
Zurich Insurance Co., supra,
Thus the insurer can avoid being bound by the judgment against the insured if it secures a nonwaiver agreement from the insured (e.g.,
Coolidge
v.
Standard Acc. Ins. Co.,
The distinction between a nonwaiver agreement and a reservation of rights has been stated, as follows: “. . . A nonwaiver agreement is a bilateral contract, normally in writing, entered into by the assured and the insurer after the accident, providing that the insurer will defend the tort suit while reserving its right to assert nonliability under the policy at a later date. ... [If] A reservation of rights is very similar to a nonwaiver agreement, and it is subject to the same limitations and restrictions. It differs in being less formal than the nonwaiver and less tied to strict contract principles. The insurer need only notify, or attempt to notify, the assured that it is conducting the investigation and defense of the tort claim under a reservation of the right to assert policy defenses at a later time, and the assured’s silence will usually be deemed acquiescence. Courts have in general been fairly liberal in implying reservations.” (Note (1955) 68 Harv.L.Rev. 1436, 1446, 1447; fns. omitted.)
The authorities are split on the circumstances in which a unilateral reservation of rights will preserve the rights of the insurer. (
*587
In California, however, the theory that by defending the suit an insurer “waives” its right to claim noncoverage rests upon the doctrine of estoppel. There must be a showing that the insurer either intentibnally relinquished a known right, or acted in such manner as to cause the insured reasonably to believe the insurer had relinquished such right, and that the insured relied upon such conduct to his detriment.
(McDanels
v.
General Ins. Co., supra,
At this early stage of the proceedings, Val’s has not yet pleaded, and so there is no allegation that Val’s expressly refused to enter into a nonwaiver agreement, that Val’s notified Allstate that it did not acquiesce in the reservation of rights, that Allstate led Val’s to believe Allstate had relinquished its rights, or that Val’s detrimentally relied thereon.
Thus, were this a case where Allstate had reserved its rights under the circumstances alleged, then defended the action and refused to pay an ensuing judgment against Val’s, it could not be said as a matter of law that Allstate’s pleading was insufficient to raise the issue of a valid reservation of rights..
The additional problem raised by this case, however, is that Allstate did not defend the action to trial and judgment but instead settled it. Allstate did more than merely to undertake the defense. Allstate voluntarily paid money out in order to settle the Ray-Cron claims. Allstate contends that this money was in effect Val’s money and that Allstate should be reimbursed for the amounts paid out on Val’s behalf, assuming that the policy did not cover the claims.
The recent case
of Johansen
v.
California State Auto. Assn. Inter-Ins. Bureau,
However, in this case, the letter sent by Allstate to Val’s is insufficient, without more, to constitute the agreement contemplated by Johansen. Nowhere does the letter expressly state that if Allstate settled the case it would look to Val’s for reimbursement for any reasonable amounts paid. The statement in the letter that “in investigating the said accident... or negotiating for compromise settlement, or in making any settlement. . . [Allstate] does not waive any of its rights or admit any obligations under the policy” cannot, without more, reasonably be interpreted to mean that Allstate was given carte blanche to settle the case with what will turn out to be the insured’s own money.
Furthermore, there is no allegation in Allstate’s pleading that Val’s was informed of the settlement offer, that Val’s expressly or impliedly agreed that the claimants should be paid a total of $3,200 as a reasonable settlement, that the settlement was reasonable, that Val’s was given an opportunity to assume the defense if Val’s did not think the settlement reasonable, or that Val’s expressly or impliedly agreed that if such sum was paid the question of policy coverage should be left to future determination.
Absent an agreement by the insured—express or implied in fact—that the insurer may commit the insured’s own fund toward any reasonable settlement, the insurer is not permitted to seek reimbursement for a particular settlement unless it has secured specific authority to make that settlement or has notified the insured of a reasonable offer by the claimant and given the insured an opportunity to assume the defense.
We conclude that the allegations in Allstate’s present are insufficient to entitle it to reimbursement from Val’s of the amounts paid in the settlements. It is possible, however, that Allstate may be able to state a valid cause of action if given an opportunity to amend. Allstate has never had that opportunity, since the trial court
*589
sustained the demurrer without leave to amend. Based on the record on appeal, we have no way of knowing whether Allstate’s failure to include essential allegations as to the extent of Val’s participation in the settlement was merely due to inartful pleading, needed clarification in the law, or because the facts will not support such allegations. Since pleadings should be liberally construed to attain substantial justice between the parties, and leave to amend should be permitted if there is a reasonable possibility a valid cause of action can be stated, the matter should be remanded and Allstate given another opportunity to plead.
(Youngman
v.
Nevada Irrigation Dist.,
The judgment is reversed and the cause remanded for further proceedings consistent with the views expressed in this opinion.
Kaus, P. J., and Hastings, J., concurred.
A petition for a rehearing was denied January 6, 1976, and appellant’s petition for a hearing by the Supreme Court was denied March 3, 1976. Clark, J., and Richardson, X, were of the opinion that the petition should be granted.
Notes
In ruling on a demurrer the court may consider not only the allegations of the complaint but also facts of which the court may or must take judicial notice, including the court files in other cases involving the parties.
(Bill Loeper Ford
v.
Hites,
In June 1971, Ray-Cron filed an amended cross-complaint in which it was additionally alleged that Val’s had the duty to provide the necessary safety equipment, that Ray-Cron was prepared to provide it at the time of the rental, but that Val’s did not order such equipment despite awareness of its obligation to do so.
See, e.g., Note (1950) 2 Stan.L.Rev. 383, 384; Roos. The Obligation to Defend and Some Related Problems (1961) 13 Hastings L.J. 206, 207.
