
16 Cal.App.3d 472 (1971)
94 Cal. Rptr. 570
CARD CONSTRUCTION COMPANY, INC., Plaintiff and Appellant,
v.
EDWARD H. LEDBETTER et al., Defendants and Respondents.
Docket No. 10183.
Court of Appeals of California, Fourth District, Division One.
March 31, 1971.
*474 COUNSEL
Richard T. Hilmen, Jr., and Donald J. Helmer for Plaintiff and Appellant.
Hillyer & Irwin, Karen Tustin and Bryan R. Gerstel for Defendants and Respondents.
*475 OPINION
AULT, J.
Card Construction Company, Inc. (Card) appeals from a judgment of dismissal entered after demurrers to the complaint by respondents, Ledbetter & Son (Ledbetter) and San Diego Pacific Rentals (Pacific), had been sustained without leave to amend. The original complaint was brought by Card and its bonding company, Insurance Company of North America (I.N.A.).
The dispute arises out of a contract and a series of subcontracts for work performed on a state improvement project and centers upon the legal effect of certain releases executed by respondents Ledbetter and Pacific. It is also concerned with the legal effect of a previous lawsuit in which all the parties to this litigation appeared.
For purposes here, the facts are not in dispute. In March 1967, Pylon, Inc. (Pylon), as general contractor, entered into a written contract with the State of California, acting by and through the Department of Water Resources, to construct a public improvement described as the San Diego Desalted Water Transmission Facility, for a consideration of $192,240.36. In April 1967, Pylon entered into a written subcontract with plaintiff Card under which Card agreed to perform a portion of the work covered by the prime contract between Pylon and the State for the sum of $103,913.80. Card, in turn, subcontracted a portion of its work to John F. Butler and John D. Couchman, doing business as Wymore Construction Co., Inc. (Wymore), on a time and material basis. Wymore again subcontracted a portion of its work to Ledbetter on a time plus 10 percent of gross billing basis.
In September 1967, after the work on the project had been completed, Ledbetter, who had furnished labor, equipment and material on the project, and Pacific, who had furnished materials, signed releases in which they represented they had been paid in full for all labor, equipment and materials furnished on the construction project. The releases were given to Wymore and contained a statement they were signed "for the purpose of inducing" Card to pay Wymore's billings. Wymore presented these releases to Card, and Card paid Wymore all sums due under its subcontract.
In fact, Wymore had not paid Ledbetter and Pacific and failed to pay either of them after it received payment from Card. Wymore was not bonded, defaulted in the ensuing litigation and is evidently judgment proof. Ledbetter and Pacific filed stop-notices with the State of California and with Pylon, the general contractor, and eventually sued everybody, including Pylon, its bonding company, Great American Insurance Company (Great American), Card, and the State of California. The complaint, *476 entitled "Complaint for Breach of Contract: To Enforce Stop Notice and upon Statutory Payment Bond," spawned a proliferation of cross-complaints between the various parties which the court severed and ordered tried after the complaint.
Ultimately Ledbetter and Pacific were awarded summary judgments against Great American, the bonding company for Pylon, the general contractor. At the same time it was ordered that "Plaintiffs take nothing by reason of their complaint against the other defendants," which included Card.
Because of its written agreement of indemnity with Great American, Pylon paid the judgments. It then obtained judgment for the amount it had paid on its cross-complaint against Card and I.N.A., who now have paid and satisfied Pylon's judgment against them.
Card and I.N.A., as plaintiffs in the instant action, sought to recoup their loss from Ledbetter and Pacific. Their six-count complaint (three causes of action against each defendant) alleges alternative theories of recovery based upon: (1) intentional misrepresentation, (2) negligent misrepresentation, and (3) implied indemnity.
The issues raised on appeal are: 1. Did the complaint state a cause of action in implied indemnity? 2. Did the previous action operate as a bar under the doctrines of res judicata or collateral estoppel, or by reason of the compulsory cross-complaint statute? (Code Civ. Proc., § 439.)
All parties agree the basic theory underlying the complaint is implied indemnity. The three causes of action only attempt to state a cause of action for recovery under implied indemnity on different theories.
(1a) In the complaint, Card and I.N.A. (to whom Card is ultimately financially responsible under a bonding indemnity agreement) claim Ledbetter and Pacific, by intentionally giving false and untrue releases to Wymore, or by negligently giving such releases, have, in effect, caused them to pay twice for the same labor and material. Card paid on the first occasion when it paid Wymore upon the presentation of the releases. Card and I.N.A. paid again when they were compelled to satisfy Pylon's judgment.
(2) In the previous superior court action, Ledbetter and Pacific obtained judgment against Great American, the bonding company for Pylon, the general contractor. In that action, based upon the statutory bond, the releases previously given were wholly immaterial and could not be successfully urged as a defense by the bonding company. (See Powers Regulator Co. v. Seaboard Surety Co., 204 Cal. App.2d 338, 346-353 [22 Cal. Rptr. *477 373]; Sherman v. American Surety Co., 178 Cal. 286, 292 [173 P. 161]; 41 Cal.Jur.2d, Public Works and Contracts, § 77, p. 453.) By reason of its bonding indemnity agreement, Great American shifted the burden of the judgment to its principal, Pylon, who, by virtue of its contractual relation with Card and I.N.A., was able to shift the burden of paying respondents' judgments to them. Asserting the loss was occasioned by the giving of the false releases, Card claims the right to indemnity from Ledbetter and Pacific and seeks to recover the amount paid to satisfy Pylon's judgment together with interest and attorney's fees.
(1b) Although not fitting precisely within usual patterns, we believe Card and I.N.A. stated a cause of action for indemnity against Ledbetter and Pacific on each of the alternative grounds. In Alisal Sanitary Dist. v. Kennedy, 180 Cal. App.2d 69, 75-76 [4 Cal. Rptr. 379], the court states:
"`The right of indemnity rests upon a difference between the primary and secondary liability of two persons each of whom is made responsible by the law to an injured party. It is a right which enures to a person who, without active fault on his part, has been compelled by reason of some legal obligation, to pay damages occasioned by the initial negligence of another, and for which he himself is only secondarily liable. The difference between primary and secondary liability is not based on a difference in degrees of negligence or on any doctrine of comparative negligence  a doctrine which, indeed, is not recognized by the common law; ... It depends on a difference in the character or kind of the wrongs which cause the injury and in the nature of the legal obligation owed by each of the wrongdoers to the injured person....'"
".... .... .... ...
"The California cases have not expressly drawn these distinctions or adopted these theories, although they have cited with approval the reasoning of some of these cases. [Citations.] They have, however, reached the same conclusion upon still other exceptions to the general rule which allow indemnity upon the ground of a breach by the defendant of a duty, either in contract or in tort, owing by him to the plaintiff or upon equitable considerations." (Alisal Sanitary Dist. v. Kennedy, 180 Cal. App.2d 69, 75-76 [4 Cal. Rptr. 379].)
In Herrero v. Atkinson, 227 Cal. App.2d 69, 74 [38 Cal. Rptr. 490, 8 A.L.R.3d 629], the court describes the right to indemnity as follows: "The duty to indemnify may arise, and indemnity may be allowed in those fact situations where in equity and good conscience the burden of the judgment should be shifted from the shoulders of the persons seeking indemnity *478 to the one from whom indemnity is sought. The right depends upon the principle that everyone is responsible for the consequences of his own wrong, and if others have been compelled to pay damages which ought to have been paid by the wrongdoer, they may recover from him. Thus the determination of whether or not indemnity should be allowed must of necessity depend upon the facts of each case. [Citations.]"
When Pylon, by reason of its indemnity agreement, was compelled to reimburse its bonding company, Great American, for the sums the latter paid to Ledbetter and Pacific, Pylon acquired a cause of action based upon its contract against Card, its subcontractor, and Card's bonding company, I.N.A. It also could have sued Ledbetter and Pacific to recover its loss, based upon the false releases. The fact Pylon elected not to sue Ledbetter and Pacific, and proceeded on the easily established contractual and bond liability of Card and I.N.A., does not mean the latter should not be permitted in equity and good conscience to shift the loss to those more culpable in bringing it about. Their responsibility to pay was purely contractual, and not based upon fault or misconduct; respondents' alleged responsibility is based on tortious misrepresentations. By pleading these facts, we think appellant Card stated a cause of action against respondents in implied indemnity. (Alisal Sanitary Dist. v. Kennedy, supra, 180 Cal. App.2d 69, 75-76; Herrero v. Atkinson, supra, 227 Cal. App.2d 69, 75.)
Powers Regulator Co. v. Seaboard Surety Co., supra, 204 Cal. App.2d 338 and Sherman v. American Surety Co., supra, 178 Cal. 286, hold the statutory bond required by the Public Works Act. (Gov. Code, § 4200 et seq., now Civ. Code, § 3247 et seq.), creates a primary and direct obligation upon the surety, independent of the original contract, to pay sub-subcontractors and materialmen. A surety company, in an action brought by an unpaid subcontractor, may not raise the defense of estoppel based on the fact the contractor gave up his right to protect himself by making payment with a check payable jointly to the subcontractor and sub-subcontractor in reliance on the sub-subcontractor's release of his claims for labor and material, where the contractor suffered no prejudice in the transaction, since the payment to the subcontractor discharged the contractor's full obligation, the sub-subcontractor's release being inconsequential. (Powers Regulator Co. v. Seaboard Surety Co., supra, 204 Cal. App.2d 338, 345.) Indemnity was not involved in either the Powers or Sherman case, nor was the allegation, made here by Card, that it has in fact been prejudiced by the false releases and has been required to pay twice for the same services and material. Indemnity is essentially an equitable action (Cahill Bros., Inc. v. Clementina Co., 208 Cal. App.2d 367, 376 [25 Cal. Rptr. 301]), *479 and we see no reason why equity should permit those who have made false statements, upon which another has relied to his detriment, to go scot-free.[1]
(3, 4) Nor does it appear the previous superior court action is a bar to the present action, either under the doctrines of res judicata and collateral estoppel or under the compulsory counterclaim statute. In the previous action Card and respondents were not adversaries in a true sense, and the legal effect of the allegedly improper releases was not litigated. While respondents sued many parties, including appellant Card, they elected to proceed against Great American only, and obtained a summary judgment against that company on its statutory bond. As already indicated, the releases, which are the subject of this action, were wholly immaterial and constituted no defense in that action. Nothing in the findings or the record of the previous case indicates the question of the legal effect of the releases was litigated. Since the issue was neither litigated nor determined, the judgment does not operate as a bar to the present action under either the doctrine of res judicata or collateral estoppel. (Hayward Lbr. & Inv. Co. v. Const. Prod. Corp., 117 Cal. App.2d 221, 229 [255 P.2d 473]; Lee v. Merchants Collection Assn., 155 Cal. App.2d 762, 770 [318 P.2d 701].)
The compulsory counterclaim rule is set forth in Code of Civil Procedure section 439 which reads: "If the defendant omits to set up a counterclaim upon a cause arising out of the transaction set forth in the complaint as the foundation of the plaintiff's claim, neither he nor his assignee can afterwards maintain an action against the plaintiff therefor." The section embodies a special aspect of the doctrine of res judicata and constitutes a statutory extension of collateral estoppel. (Saunders v. New Capital for Small Businesses, Inc., 231 Cal. App.2d 324, 333 [41 Cal. Rptr. 703].) It has no applicability to the present case. A counterclaim "must tend to diminish or defeat the plaintiff's recovery." (Code Civ. Proc., § 438.) In the previous action, respondents sought a monetary judgment, initially against various defendants, including Card. The court ordered the complaint severed from cross-complaints and tried first. This resulted in respondents obtaining *480 summary judgment against Great American and judgment in favor of all other defendants, including Card. During the time respondents and Card were adversaries in the previous action (i.e., stood in the position of plaintiff and defendant) Card had no cause of action for implied indemnity which would have tended to diminish or defeat respondents' money claim. A cause of action for implied indemnity does not accrue until the indemnitee has suffered an actual loss (41 Am.Jur.2d, Indemnity, § 32, p. 722; 26 Cal.Jur.2d, Indemnity, § 19, p. 351). This did not occur in the case under consideration until Pylon, having paid respondents' judgment against Great American, obtained judgment on its cross-complaint against Card and I.N.A., and the judgment was satisfied by payment. This occurred after the lawsuit was over and long after judgment on respondents' complaint had been given in favor of Card.
Respondents' reliance upon Roylance v. Doelger, 57 Cal.2d 255 [19 Cal. Rptr. 7, 368 P.2d 535] and Lewis Avenue Parent Teachers' Assn. v. Hussey, 250 Cal. App.2d 232 [58 Cal. Rptr. 499], is misplaced. The cases hold a defendant may assert his right to indemnification against a codefendant in the initial action by a cross-complaint in declaratory relief. They deal with the question of permissible cross-complaints and not with compulsory counterclaims. If Card could have litigated its right to implied indemnification by respondents in the initial action, its right to do so was by permissible cross-complaint for declaratory relief and not in the nature of a compulsory counterclaim for money damages.
The judgment is reversed. The trial court is directed to overrule the demurrers and allow respondents such time as it deems reasonable to answer the complaint.
Brown (Gerald), P.J., and Coughlin, J., concurred.
A petition for a rehearing was denied April 19, 1971, and respondents' petition for a hearing by the Supreme Court was denied May 26, 1971.
NOTES
[1]  This results in a circuity of action which seems anomalous. While the bonding company is precluded from setting up the defense of the false releases when sued in the first instance, the contractor or subcontractor, who has relied upon them and sustained damage, should be permitted to assert them in the end. Other jurisdictions have obviated this circuity of action by permitting the bonding company to assert the defense of the false release in the original action. (See Wisconsin Electric Sales Co. v. Fidelity & Deposit Co. [Langdon], 191 Wis. 645 [211 N.W. 670]; New Amsterdam Casualty Co. v. F. Redondo & Co. (Tex.Civ.App.) 158 S.W.2d 334; 17 Am.Jur.2d, Contractors' Bonds, § 98, pp. 275-276.) The rule not permitting the bonding company to assert an estoppel based upon the releases in the original action, places the primary responsibility for paying the claims of labor and materialmen upon the bonding company and leaves the matter of litigating final responsibility to it and the subcontractors down the line.
