
50 Cal.App.4th 1115 (1996)
CENTURY INDEMNITY COMPANY, Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent; SCOTTSDALE INSURANCE COMPANY, Real Party in Interest.
Docket No. B101063.
Court of Appeals of California, Second District, Division Three.
November 13, 1996.
*1116 COUNSEL
Daniel Mansueto for Petitioner.
No appearance for Respondent.
Joseph J. Ryan for Real Party in Interest.
*1117 OPINION
ALDRICH, J.
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) 8 Cal. App.3d 427 [87 Cal. Rptr. 348] to determine Scottsdale's action is one founded on an instrument in writing within the meaning of section 337. Our review of the relevant case law indicates Liberty Mutual was wrongly decided. We further conclude that "an action upon [a] contract obligation or liability founded upon an instrument in writing" is an action on the contract between or among contracting parties who are in privity. We hold, therefore, that Scottsdale's action against Century is governed by the two-year statute of limitations of section 339 as an action not founded on an instrument in writing. In so holding, we do not rule on the issue of when Scottsdale's purported equitable contribution cause of action arose. We deny the petition and remand to the trial court for further proceedings consistent with this opinion.

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. [¶] 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. [¶] 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...."
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, 8 Cal. App.3d 427, determined Century's obligations could be based on a "writing," i.e. the written insurance policy issued by Century to Vikron, depending upon the terms of the policy. If such were found to be the case, the four year statute of limitations applicable to actions "founded upon written instruments," as provided in section 337, would apply and Scottsdale's action was timely.[5] The court, finding the question whether the obligation was based on a writing was a "factual issue" to be decided "at a later date," overruled Century's demurrer.
Century now seeks a writ of mandate directing the trial court to vacate its order.[6]

THE ISSUE PRESENTED
(1) 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, 8 Cal. App.3d at p. 432.)
The Liberty Mut. court found Colonial's contention without merit. Citing the court's decision in Comunale v. Traders & General Ins. Co. (1958) 50 Cal.2d 654, 662 [328 P.2d 198, 68 A.L.R.2d 883], the court indicated it could not conclude "`... an action of implied obligation arising out of contract is not on the written instrument and ... therefore [not governed by] the four-year term prescribed in section 337, subdivision 1, of the Code of Civil Procedure.... The promise which the law implies as an element of the contract is as much a part of the instrument as if it were written out. [Citations.]'" (Liberty Mut. Ins. Co. v. Colonial Ins. Co., supra, 8 Cal. App.3d at p. 432.) In concluding the four-year period prescribed by section 337 applied, the court determined Liberty's action was "... one brought by one insurer against another insurer upon an `obligation or liability founded upon an instrument in writing,' i.e. the latter's policy of insurance." (8 Cal. App.3d at pp. 432-433.)
Initially, we note the case relied upon by the Liberty Mut. court, Comunale v. Traders & General Ins. Co., supra, 50 Cal.2d 654, does not support the Liberty Mut. court's conclusion. In Comunale, unlike Liberty Mut. or the instant action, the parties were in privity of contract. In Comunale the plaintiff was the insured's assignee and thus stood in the shoes of the insured in the action against the insurance company. The contract sued upon was the insurance policy between the company and the insured. In Comunale, the defendant insurer wrongly declined to defend the insured and refused to accept a reasonable settlement within the policy limits in violation of its duty *1121 to consider in good faith the interest of the insured. The insurer then contended the plaintiff, who had been assigned the insured's interest in the policy, was barred from suit by the two-year statute of limitations which applied to actions not founded on a writing. The insurer argued the action was based on an implied obligation arising out of contract, but not on the written instrument. The California Supreme Court disagreed, stating, "The promise which the law implies as an element of the contract is as much a part of the instrument as if it were written out. [Citations.]" (Id. at p. 662; citing O'Brien v. King (1917) 174 Cal. 769, 774-775 [164 P. 631].)
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) 20 Cal. 130, property belonging to the plaintiff had been sold to satisfy a judgment rendered against the plaintiff and several others. The plaintiff then sued the others for reimbursement according to each party's proportionate share of the judgment. One defendant, Morrill, demurred to the action, claiming it was barred by the two-year statute of limitations applicable to actions not based on a written instrument.
*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." (20 Cal. at p. 136, italics added.) In determining the plaintiff's action was not founded on a written instrument, the court stated, "Our conclusion is ... that the statute [of limitations] by the language in question refers to contracts, obligations or liabilities resting in, or growing out of written instruments, not remotely or ultimately, but immediately; that is, to such contracts, obligations or liabilities as arise from instruments of writing executed by the parties who are sought to be charged, in favor of those who seek to enforce the contracts, obligations or liabilities." (Id. at p. 137.)
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, 174 Cal. at page 772, the California Supreme Court determined that for a cause of action "`... to be founded upon an instrument in writing, the instrument must, itself, contain a contract to do the thing for the nonperformance of which the action is brought.' [Citation.]" The court recognized the promise or obligation being sued upon must be "embodied in the language of the writing." (Id. at p. 773.)
In Murphy v. Hartford Acc. & Indem. Co. (1960) 177 Cal. App.2d 539 [2 Cal. Rptr. 325], Murphy had been awarded a contract to construct a diversion *1123 dam for the United States Department of Reclamation. In his suit against Hartford, Murphy alleged the company had committed certain wrongful, intentional acts to secure control of monies belonging to Murphy, and to cause him to breach his contract with the government. In determining Murphy's cause of action was not one founded on a written instrument, the court indicated Murphy's claims were not based on a breach of any contract. The court stated, "[T]here is no allegation that Hartford breached any term or provision of any written agreement. In order for an action to be based upon an instrument in writing, the writing must express the obligation sued upon. [Citations.]" (Id. at p. 543.)
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) 27 Cal.3d 359 [165 Cal. Rptr. 799, 612 P.2d 889, 19 A.L.R.4th 75]. In that case, the court considered whether an excess insurance carrier was obligated to contribute defense costs to a primary liability carrier when the cost of the defense had not exceeded the limits of the primary insurer's policy. Although the court determined in that case that under the terms of the excess carrier's policy its coverage had not attached, and the excess carrier was not obligated to contribute, the court expressly declined to "... formulate a definitive rule applicable in every case in light of varying equitable considerations which [might] arise, and which affect the insured and the primary and excess carriers, and which depend upon the particular policies of insurance, the nature of the claim made, and the relation of the insured to the insurers. [Citation.]'" (Id. at p. 369.) The court further stated, "Moreover, we affirm the wisdom expressed in Amer. Auto. Ins. Co. v. Seaboard Surety Co. (1957) 155 Cal. App.2d 192, 195-196 [318 P.2d 84]: `The reciprocal rights and duties of several insurers who have covered the same event do not arise out of contract, for their agreements are not with each other.... Their respective obligations flow from equitable principles designed to accomplish ultimate justice in the bearing of a specific burden. As these principles do not stem from agreement *1124 between the insurers their application is not controlled by the language of their contracts with the respective policy holders. [Citation.]'" (Signal Companies, Inc. v. Harbor Ins. Co., supra, 27 Cal.3d at p. 369; see also CNA Casualty of California v. Seaboard Surety Co. (1986) 176 Cal. App.3d 598, 619 [222 Cal. Rptr. 276], disapproved on another point in Montrose Chemical Corp. v. Superior Court (1993) 6 Cal.4th 287, 296-298 [24 Cal. Rptr.2d 467, 861 P.2d 1153]; Amer. Auto. Ins. Co. v. Seaboard Surety Co., supra, at pp. 195-196.)
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, 8 Cal. App.3d 427, in which the court concluded one insurer's action brought against another insurer for contribution could be one brought "upon an `obligation ... founded upon an instrument in writing,' i.e. the latter's policy of insurance," was wrongly decided and the trial court erred when it relied on that decision to overrule Century's demurrer to Scottsdale's complaint. 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.


*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
[1]  Unless otherwise specified, all statutory references are to the Code of Civil Procedure.
[2]  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.
[3]  There is no evidence in the record that Century ever agreed in writing to this arrangement.
[4]  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."
[5]  Section 337 provides that an "action upon any contract, obligation or liability founded upon an instrument in writing" must be brought "within four years."
[6]  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) 35 Cal.3d 197, 213-214 [197 Cal. Rptr. 783, 673 P.2d 660].) The "plaintiff need only plead facts showing that he may be entitled to some relief." (Alcorn v. Anbro Engineering, Inc. (1970) 2 Cal.3d 493, 496 [86 Cal. Rptr. 88, 468 P.2d 216].)
[7]  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. (20 Cal. at p. 136.)
