*1117 Opinion
In this case we are called upon to decide whether an action brought by one insurance company against another insurance company to recoup a pro rata share of defense costs expended by the first in defense of their coinsured is governed by the two-year statute of limitations of Code of Civil Procedure section 339 1 as an action not founded on an instrument in writing, or by the four year statute of limitations of section 337.
We conclude the trial court erred when it relied on the court’s decision in
Liberty Mut. Ins. Co.
v.
Colonial Ins. Co.
(1970)
Factual and Procedural Background
Century Indemnity Company (Century) seeks a writ of mandate directing the trial court to vacate its March 18, 1996, order overruling Century’s demurrer to the complaint filed by plaintiff, Scottsdale Insurance Company (Scottsdale), seeking equitable contribution from Century. 2 Century requests this court to direct the trial court to vacate its order overruling the demurrer and to reconsider the demurrer under the proper statute of limitations.
Century and two other insurers, Scottsdale and Northbrook Property and Casualty (Northbrook), each insured Vikron, Incorporated for covered claims arising out of a particular set of circumstances. This set of circumstances led to litigation known as the “Vikron action.” From 1991 to July of 1993, Scottsdale, pursuant to its contractual duty to defend Vikron, paid a total of $968,119.88 in attorney fees, costs and expenses in the defense and *1118 settlement of the Vikron action. Scottsdale, on behalf of its insured, settled the litigation on July 30, 1993.
In a letter dated July 29, 1991, from a representative of Northbrook to a representative of Scottsdale, Northbrook acknowledged the three insurance companies had “agreed that the expenses [incurred in the Vikron action] would be split among the three carriers equally.” In a letter to Scottsdale dated August 28, 1991, Northbrook again indicated it was “agreeable to reimbursing Scottsdale Insurance Company.” 3
The next correspondence between Scottsdale and Northbrook appears to have been a letter from a representative of Scottsdale, dated April 8, 1994. An identical letter, also dated April 8, 1994, was sent by Scottsdale to Century. In this correspondence, Scottsdale states: “Sorry about bringing this old ghost back to haunt you, but after the settlement on the file was concluded the file somehow got off diary and ended up in archives. I only recently retrieved it due to coincidence. [U You will recall that we had an agreement to split the indemnity and defense costs on a one-third basis, i.e., one-third Northbrook, one-third [Century], one-third Scottsdale. [tM I enclose for your assistance a copy of all the bills received in this matter. ...[*][] I would appreciate it if you would forward your check payable to Scottsdale 99
On April 11, 1995, after Northbrook and Century failed to pay Scottsdale, Scottsdale filed a complaint alleging causes of action against both companies for breach of contract and equitable contribution. On December 21, 1995, Scottsdale filed its fourth amended complaint, the operative complaint for purposes of this petition, which alleged causes of action against both companies for equitable contribution, and against Northbrook for specific performance of an express promise to indemnify. Scottsdale alleged all three companies had mutually insured Vikron for covered claims arising out of the Vikron action, Scottsdale had defended Vikron pursuant to its contractual duty, and Scottsdale’s right to equitable contribution was being “. . . brought upon the basis of [Century’s] obligation to its insured, Vikron, Inc., which is founded upon the insurance relationship that existed between [Century] and Vikron, Inc., to defend Vikron, Inc. . . .” Scottsdale further alleged, “As the legal result of [Century’s] breach of its contractual obligations to Vikron, Inc., in refusing to perform its contractual duty to defend Vikron, Inc. from the above described litigation attacks, Scottsdale has been damaged to the extent it has paid more than its equitable share for the attorney fees, costs and expenses which were incurred in the defense and settlement of the insured’s liability in the above described actions.”
*1119
Century filed a demurrer to the complaint. Citing section 339, Century alleged Scottsdale’s action was one based in equity and thus barred by the two-year statute of limitations which applies to actions not founded on an instrument in writing.
4
Following argument by the parties, the trial court, relying on the court’s opinion in
Liberty Mut. Ins. Co.
v.
Colonial Ins. Co., supra,
Century now seeks a writ of mandate directing the trial court to vacate its order. 6
The Issue Presented
Century contends the trial court erred in determining Scottsdale’s action could be founded on its own insurance policy to its insured, and thus erred in determining the matter is governed by the four-year statue of limitations prescribed by section 337. Century argues, as a matter of law, Scottsdale’s action is founded, not on any written contract, but in equity, and the two-year statute of limitations prescribed in section 339 must apply. Century further contends, although Scottsdale’s action may remotely stem from a written instrument, i.e., Century’s contract of insurance with its insured, there is no privity of contract between Scottsdale and Century and therefore, as a matter of law, Scottsdale’s action against Century cannot be founded “upon an instrument in writing” within the meaning of section 337. We agree with both contentions. However, since it cannot be ascertained from the face of the fourth amended complaint when Scottsdale’s cause of action accrued, the trial court was correct in overruling Century’s demurrer.
*1120 Discussion
In determining Scottsdale’s cause of action was one founded on a writing within the meaning of section 337, the trial court relied on the court’s decision in
Liberty Mut. Ins. Co.
v.
Colonial Ins. Co.
There, Liberty Mutual Insurance Company (Liberty) and Colonial Insurance Company (Colonial) were found to be “concurrent primary insurer[s],” each of which was liable to the insured, the Butler Company, for a personal injury claim made against it. Liberty employed attorneys to defend Butler against the action, which Colonial refused to do. When Liberty then sought contribution from Colonial, Colonial argued contribution was precluded because the statute of limitations applicable to Liberty’s claims, the two-year period prescribed by section 339, had run. Colonial urged section 339, which applied to actions on obligations “not founded upon an instrument in writing” was applicable because Liberty’s claim was based, not on any written instrument, but on “ ‘an implied contract of indemnification.’ ”
(Liberty Mut. Ins. Co.
v.
Colonial Ins. Co., supra,
The
Liberty Mut.
court found Colonial’s contention without merit. Citing the court’s decision in
Comunale
v.
Traders & General Ins. Co.
(1958)
Initially, we note the case relied upon by the
Liberty Mut.
court,
Comunale
v.
Traders & General Ins. Co., supra,
The promise which the Comunale court was referring to, the promise to execute the terms of the contract in good faith, is a promise which accompanies every written agreement and which is derived directly from the terms of that agreement. Thus, when the parties to the agreement sue for breach of good faith, the action is one directly founded on the written instrument. In Comunale, when the plaintiff, who had been assigned the rights of the insured, sued for the failure of the insurer to execute in good faith the terms of the insurance agreement, he sued directly on the contract of insurance.
In Liberty Mut., Liberty and Colonial had no contractual relationship. Although it could be said Liberty’s cause of action stemmed remotely from Colonial’s contract with its insured, Liberty’s action against Colonial was founded on principles of equity.
In the present case, too, Scottsdale’s action against Century exists because of the duties created by Century’s policy to the common insured. However, there is no privity of contract between Century and Scottsdale. Therefore, Scottsdale has no right to enforce the terms of that agreement. Unlike the implied agreement that the terms of a contract will be executed by the parties in good faith, Century’s obligation to contribute to Scottsdale’s defense of their common insured is one recognized as a matter of law and founded in principles of equity.
Our conclusion is supported by the case law. Beginning in 1862, the California Supreme court considered the meaning of a statute containing language similar to that in the present version of section 337. In
Chipman
v.
Morrill
(1862)
*1122
The court determined that when the plaintiff, by means of the sale of the property, effectively paid the entire amount of the judgment, his cause of action became not one based on the written note given when the real property was purchased, but one on the “assumpsit [or obligation] which the law
implies
where a surety is compelled to advance money for his principal.” (
Although the Chipman v. Morrill court was interpreting a statute which preceded section 337, although with substantially the same language, 7 its decision has application to the present statute. Citing Chipman v. Morrill, the first annotation to the current section 337 states: “1. Construction of Section—This section has been held to refer to contracts, obligations, and liabilities resting in or growing out of written instruments, not remotely or ultimately, but immediately. Thus, where two persons executed a note, one as principal and the other as surety, and a judgment obtained upon the note is paid by the surety, the obligation of the principal to pay the surety is not ‘founded upon a written instrument’ within the meaning of this section. [Citation.]” (13A West’s Ann. Code Civ. Proc. (1982 ed.) § 337, p. 224.)
Courts have continued to recognize that, for section 337 to apply, the obligation sued upon must be one immediately founded upon the written instrument. In
O’Brien
v.
King, supra,
In
Murphy
v.
Hartford Acc. & Indem. Co.
(1960)
In the present case, although Century’s obligation to Scottsdale could be said to ultimately or remotely stem from Century’s written contract of insurance with Vikron, it is not one immediately resting in or growing out of that written instrument. Scottsdale was not a party to Century’s insurance contract and cannot sue for a breach of a provision of that contract. Accordingly, we conclude Scottsdale’s action is not one founded on a written instrument, i.e., Century’s contract to insure Vikron. Scottsdale’s action is a claim of equitable contribution, a right recognized as a matter of law in order to do equity.
This determination is consistent with the court’s decision in
Signal Companies, Inc.
v.
Harbor Ins. Co.
(1980)
Our review of the relevant case law reveals the Liberty Mut. decision stands alone. No court has since relied on the decision for the proposition that an insurer’s cause of action for contribution from a coinsurer is one founded on the coinsurer’s contract of insurance. We conclude Liberty Mut. was wrongly decided and the trial court erred in relying on the opinion to overrule Century’s demurrer.
Nor does our resolution of the issues in this case leave coinsurers such as Scottsdale without a remedy when, as here, one fulfills its obligation to defend and indemnify its insured and the other does not. An action would still lie based upon an implied promise to contribute pro rata on principles of equitable contribution or indemnity. Our holding merely requires that the action be commenced within two years as is required for such actions under section 339.
Conclusion
Our review of the relevant case law indicates Scottsdale’s cause of action is not founded upon an instrument in writing within the meaning of section 337, as it is not an action on a contract between contracting parties who are in privity. It is instead an action brought on equitable principles implied in the law and is thus governed by the two-year statute of limitations prescribed in section 339. We conclude
Liberty Mut. Ins. Co.
v.
Colonial Ins. Co., supra,
*1125 Disposition
The alternative writ is discharged. The petition for writ of mandate is denied. The matter is remanded to the trial court for further proceedings consistent with this opinion. Each party to bear its own costs.
Klein, P. J., and Croskey, J., concurred.
The petition of real party in interest for review by the Supreme Court was denied February 26, 1997.
Notes
Unless otherwise specified, all statutory references are to the Code of Civil Procedure.
The operative complaint refers to Century by the name of its predecessor, the Insurance Company of North America. Throughout this opinion, we refer to either or both companies as Century.
There is no evidence in the record that Century ever agreed in writing to this arrangement.
Section 339 provides that an “action upon a contract, obligation or liability not founded upon an instrument of writing” must be brought “within two years.”
Section 337 provides that an “action upon any contract, obligation or liability founded upon an instrument in writing” must be brought “within four years.”
In reviewing Century’s claim, we note “[a] demurrer tests only the legal sufficiency of the pleading. [Citation.] It ‘admits the truth of all material factual allegations in the complaint . . . ; the question of plaintiff’s ability to prove these allegations, or the possible difficulty in making such proof does not concern the reviewing court.’ [Citation.]”
(Committee on Children’s Television, Inc.
v.
General Foods Corp.
(1983)
The statute provided that “ ‘an action upon any contract, obligation or liability founded upon an instrument of writing,’ ” except in certain designated cases, shall be commenced within four years, and an action upon a contract, obligation or liability not thus founded, with certain exceptions, shall be commenced within two years. (
