
173 Cal.App.4th 1355 (2009)
___ Cal.Rptr.3d ___
FIRST NATIONAL INSURANCE COMPANY et al., Plaintiffs and Respondents,
v.
CAM PAINTING, INC., et al., Defendants and Appellants.
No. B200830.
Court of Appeals of California, Second District, Division Five.
May 15, 2009.
*1357 Lanak & Hanna, Jennifer M. Schildbach and Francis J. Lanak for Defendants and Appellants.
Wilson Elser Moskowitz Edelman & Dicker, John J. Immordino and Susannah M. Dudley for Plaintiffs and Respondents.

OPINION
ARMSTRONG, J.
Appellant Cam Painting, Inc., was the contractor on a construction project for the Los Angeles Unified School District (LAUSD), the Noble project. Cam hired a subcontractor, Sabco Electrique, Inc. Under *1358 the Cam-Sabco contract, Sabco was required to provide a payment and performance bond, with Cam as obligee. Sabco obtained its bond from respondent First National Insurance Company, which, coincidentally, had also issued a bond to Cam on the Noble project, with the LAUSD as obligee. In connection with the issuance of the bonds, both Cam and Sabco signed indemnity agreements in favor of First National.
When Sabco failed to pay a supplier, Allsale Electric, First National paid the claim, allocated half the payment to each bond, and sought indemnity from both Cam and Sabco. The trial court found that First National could allocate the loss to the Cam bond as well as the Sabco bond. We disagree. As obligee on the Sabco bond, Cam was entitled to have First National pay the Allsale claim, which all parties agree was a valid claim. Cam's rights as obligee were not diminished by the fact that Cam was also the principal on a First National bond. We thus reverse the judgment in favor of First National and the order awarding it attorney fees as prevailing party in this action.
Cam has another contention: in a different part of this action, Cam sued Sabco for breach of contract, alleging that Sabco had drilled through asbestos, contrary to contract specifications. Cam prevailed and Sabco was ordered to pay damages and attorney fees pursuant to a clause in the Cam-Sabco contract. First National, as Sabco's surety, was made jointly and severally liable for the damages, but not the fees. Cam contends that First National should have been made jointly and severally liable for the fee award. On that claim, we again agree with Cam, and order the trial court to make that order.

Facts

The bonds and indemnity agreements

The Cam bond and agreement
As a contractor on a public works project in excess of $25,000, Cam was obliged to file a payment bond. (Civ. Code, § 3247.) The bond is a $2.29 million payment and performance bond with Cam as the principal, First National as the surety, and the LAUSD as obligee. It binds First National to pay "If the Contractor or his Subcontractors fail to pay for any materials . . . and also, in case suit is brought upon the bond, reasonable attorney's fees, to be fixed by the court."
*1359 The indemnity agreement connected to the bond was signed by Priamos Yenaris as an individual indemnitor and by Maureen Grady, as president of Cam and as an individual indemnitor.[1] It obligates those parties to indemnify First National for any loss it incurred by reason of having executed the bond.

The Sabco bond and agreement
A contractor on a public works project "may require of the subcontractors a bond to indemnify the original contractor for any loss sustained by the original contractor because of any default by the subcontractors . . . ." (Civ. Code, § 3248, subd. (b).) Cam required such a bond from Sabco. The Sabco bond is a $400,000 performance and payment bond, with Sabco as the principal, First National as the surety, and Cam as obligee. The payment portion of the bond provides that if Sabco failed to pay "any of the persons named in Section 3181 of the Civil Code," a category which includes suppliers like Allsale, First National would "pay for the same, in an amount not exceeding the amount specified in this bond, and also, in case suit is brought upon this bond, . . . reasonable attorney's fees, to be fixed by the court."
There was an indemnity agreement in connection with this bond, too. It was signed by Melanie Banescu individually and as president of Sabco, Stefan Banescu, and Dan Constantinescu.[2] It obligated those parties to pay First National all costs, including attorney fees, which First National incurred by reason of having executed the bond.

The complaint
The Noble project was completed by December 2004. In March of 2005, Allsale sued Sabco, the LAUSD, Cam, and First National. Factually, the complaint alleged that Sabco owed Allsale $47,000 for materials Allsale supplied to Sabco. Against Sabco, the causes of action were breach of contract (the credit application which allowed Sabco to purchase materials on credit), open book account, account stated, and quantum valebant.
Although the LAUSD was the obligee on Cam's bond, under Civil Code section 3248, a supplier such as Allsale had a direct right of action on the bond, without reference to the liability of the contractor. (Civ. Code, § 3248, subd. (c); Sukut-Coulson, Inc. v. Allied Canon Co. (1978) 85 Cal.App.3d 648, 654 [149 Cal.Rptr. 711].) Allsale's complaint thus included a cause of action *1360 against all defendants for the proceeds of the Cam bond.[3] The Sabco bond is not referenced in the original complaint, but in June, Allsale filed an amended complaint which added a claim for recovery on the Sabco bond. At trial, Cam's expert explained that a supplier like Allsale would have had no way of knowing about the existence of the Sabco bond, but would contact the LAUSD and learn the identity of the surety for the prime contractor.

Cam's cross-complaint and motion for attorney fees
On May 12, 2005, Cam cross-complained against Sabco and First National. Against Sabco, there was a cause of action for breach of contract, alleging that Sabco had breached its contract by failing to pay Allsale and by performing substandard work. There was also a cause of action against Sabco for equitable indemnity, seeking amounts Cam incurred as the result of the Allsale complaint, including the cost of defending that complaint. The cause of action against First National was on the performance portion of the Sabco bond, alleging that First National was liable on the bond because Sabco had performed substandard work and because Sabco had failed to pay Allsale.
The Cam-Sabco contract is attached to the cross-complaint. An attorney fees clause provides that in the event that either Sabco or Cam institutes suit on the contract against the other party or its sureties, the prevailing party will be entitled to fees.

Sabco's cross-complaint
In September 2005, Sabco cross-complained against Cam and First National. The cause of action against Cam was breach of contract, on the allegation that Cam still owed it $44,000. The cause of action against First National was on the Cam bond, seeking that same payment.

First National pays Allsale
In July 2005, First National paid Allsale $47,000 to settle its claim, and became the assignee of Allsale's claim against the LAUSD. Allsale's complaint was then dismissed. First National made the payment to Allsale by issuing two checks for $23,500. First National attributed one check to the Cam bond and one to the Sabco bond.


*1361 First National's cross-complaint against Sabco

In October 2005, First National filed a cross-complaint against Sabco for breach of the indemnity agreement and statutory reimbursement under Civil Code section 2847.[4] It sought the $47,000 it had paid to Allsale, the attorney fees it had incurred in connection with the Allsale claim, and any additional amounts incurred in the future in the Allsale case or in Cam's cross-complaint against Sabco and First National.

First National's cross-complaint against Cam
In January 2006, First National filed a cross-complaint against Cam, also for breach of the indemnity agreement and statutory reimbursement under Civil Code section 2847. First National sought the $47,000 it had paid Allsale, the attorney fees it had incurred "in connection with claims made on its Bonds," and additional fees it might incur in the future.

The trial
By time of trial, First National had recovered (from the funds the LAUSD had retained at the end of the project) almost everything it had paid to Allsale. It was seeking recovery of the remaining amount, $2,246, and the attorney fees incurred in "the entire action." It sought equal amounts from Cam and from Sabco.
The proceedings began with a court trial, with Cam, Sabco, and First National participating. There was evidence about the scope of work in the Cam-Sabco contract, Sabco's performance, and Cam's payments to Sabco, relevant to Cam's claim that Sabco had breached its contract through poor performance and Sabco's claim that Cam had not fully paid.
Cam also produced evidence relevant to First National's actions for indemnity. Cam General Manager Priamos Yenaris testified that he required subcontractors to have payment and performance bonds so that he had "somebody to lean on" in the event that the subcontractor did not complete the job, "messed up" the job, or failed to pay its employees or suppliers. Sabco got the subcontract when Cam's first choice could not provide the bond.
*1362 For Cam, an expert witness, Charles Montgomery, testified that the purpose of the Sabco bond was to protect Cam from claims by Sabco's suppliers. He agreed that the Cam bond responded to the Allsale claim, but testified that because Sabco was the party responsible to Allsale, the Sabco bond was the primary bond. He cited, among other things, the Allsale-Sabco credit agreement, which obligated Sabco to pay Allsale. He also testified that it was not unusual for the same surety to issue bonds to a contractor and its subcontractor on a project and that competing claims such as the ones here were not unusual. In such instances, the surety would conduct an investigation to see which party (contractor or subcontractor) was responsible.
First National questioned Montgomery in support of its theory that Sabco's failure to pay Allsale was Cam's fault, because Cam had not fully paid Sabco. Montgomery testified that payment by the contractor was irrelevant. The subcontractor was obligated to the supplier even if the contractor was bankrupt or "fell off the face of the earth." Further, Cam's payment to Sabco, or lack thereof, could have had nothing to do with Sabco's failure to pay Allsale, because Allsale filed its stop notice before the final payments from Cam were due.
After the close of testimony, First National filed a motion for recovery on its cross-complaints against Sabco and Cam. With the motion, First National submitted declarations from First National surety claims specialists Bruce Echigoshima and David Pikulin, and John Immordino, who defended First National in the Allsale action.
These declarations establish that when First National received Allsale's claim, it tendered the defense to Cam. Cam did not defend, and First National's default was taken. Immordino took over First National's defense in May of 2005. He set aside the default, determined that Allsale had a valid claim, and negotiated a settlement with Allsale. First National then asked Cam to pay Allsale. First National knew that Allsale's contract was with Sabco, but asked Cam to pay because approximately $55,000 in contract funds remained on the project. Cam did not agree. First National paid Allsale, issuing two checks for $23,500, one attributed to each bond.
First National then asked Cam to agree that the funds the LAUSD had retained on the project be released to First National, to reimburse it for the amount spent to settle the Allsale claim. First National also asked both Cam and Sabco to dismiss First National from this action, reasoning that since both Cam and Sabco had indemnity agreements with First National, the *1363 losing party would have to reimburse First National in any event, "so why not simply dismiss First National and fight amongst themselves." Cam refused both requests.
The declarations also included information about the fees First National incurred as the result of the Allsale claim, including its pursuit of Cam. Echigoshima declared that First National had allocated roughly fifty 50 percent of the fees to each bond, "in fairness" to Cam and Sabco, and because claims had been made on both bonds.

The judgment
On Cam's cross-complaint against Sabco, the court found that Sabco had breached its contract with Cam by drilling in areas where there was asbestos, even after it was told not to do so. The court awarded Cam $12,992 against Sabco and First National, jointly and severally. The court also awarded Cam $20,000 in attorney fees expended in its case against Sabco, pursuant to a fees clause in the Sabco-Cam contract. This part of the award was against Sabco only.
The court found that at the end of the project, Cam owed Sabco a final payment of $47,000, but ordered that Sabco take nothing on its cross-complaint against Cam or First National.
The court found in favor of First National on its cross-complaints against Sabco and against Cam. The trial court found that "Because [First National] paid $23,500 on the Cam bond and $23,500 on the Sabco bond, each was required to reimburse [First National] for the amount disbursed plus costs and expenses."
The court also found that First National incurred $30,370 in defending the Allsale action, and that it incurred those fees because of Cam's and Sabco's inability to resolve the matter between themselves and refusal to dismiss First National from their cross-complaints. The court found that Cam and Sabco should each bear half the attorney fees expended by First National in the Allsale matter.
Against Cam, the court awarded First National $16,358, composed of half of First National's payment to Allsale (less the sums First National received from the LAUSD) and half the fees First National incurred in defending the Allsale action.
*1364 On the cross-complaint against Sabco, the court awarded First National $70,742. The statement of decision specifies the components of the award: half the Allsale loss, plus half of First National's attorneys fees in the Allsale matter, plus the award in favor of Cam on its cross-complaint against Sabco for breach of contract, plus the attorneys fees First National incurred in defending the Cam action.[5]
First National filed a motion for attorney fees, contending that it was the prevailing party in this action. The court granted the motion and awarded $25,203 jointly and severally against Cam and Sabco, finding that "Moving party incurred attorneys fees in prosecuting and defending the claims in this matter. Because Allsale had not been paid what was due, [First National] had to pay off the underlying debt and then litigate with Cam and Sabco in order to recoup what it had been forced to pay Allsale."

Discussion

The judgment in favor of First National
First, we agree with Cam that our review is de novo. The relevant facts were undisputed, and the question, which concerns interpretation of contracts, is one of law. (City of Chino v. Jackson (2002) 97 Cal.App.4th 377, 382, 384-385 [118 Cal.Rptr.2d 349].)[6]
Neither party cites any specific language in either bond or indemnity agreement which addresses the situation here, of a multiplicity of bonds, or any case law directly on point. We nonetheless find the answer clear, and we find it in the law concerning surety bonds and the clear language of the bonds.
(1) A surety bond is a written instrument in which the surety agrees to answer for the debt, default, or miscarriage of the principal. (Cates Construction, Inc. v. Talbot Partners (1999) 21 Cal.4th 28, 38 [86 Cal.Rptr.2d 855, 980 P.2d 407]; Civ. Code, § 2787.) The surety relationship is a tripartite one, in which the obligee, rather than the principal, is protected by the *1365 surety's promise to pay if the principal does not, in exchange for which promise the principal pays the premium for the bond. (Washington Internat. Ins. Co. v. Superior Court (1998) 62 Cal.App.4th 981, 988 [73 Cal.Rptr.2d 282]; Matthews v. Hinton (1965) 234 Cal.App.2d 736, 740 [44 Cal.Rptr. 692].)
(2) "In general, a surety bond is interpreted by the same rules as other contracts. [Citation.] That is, we seek to discover the intent of the parties, primarily by examining the words the parties have chosen." (Corby v. Gulf Ins. Co. (2004) 114 Cal.App.4th 1371, 1375 [8 Cal.Rptr.3d 663].) The extent of the surety's liability must be gathered from the language used when read in the light of the circumstances surrounding the transaction. Further, when a bond is given to satisfy a statutory obligation, the relevant statutory provisions are incorporated into the bond. (Electrical Electronic Control, Inc. v. Los Angeles Unified School Dist. (2005) 126 Cal.App.4th 601, 612 [24 Cal.Rptr.3d 316].) Surety bonds such as the ones before us here "will be construed most strongly against the surety and in favor of all persons for whose benefit such bond is given . . . ." (Civ. Code, § 3226.)
Those principles tell us that First National was required to perform on the Sabco bond, according to the terms of the bond. The bond made First National responsible to Cam, the obligee, for Sabco's debt. Cam insisted that Sabco obtain a payment bond so that, should Sabco fail to pay a supplier, it (Cam) would not have to "fight it out" with Sabco, but could rely on Sabco's surety to pay the claim. That is the promise First National must keep.
First National would have priced the premium based on its assessment of Sabco's financial stability and likelihood of default (Washington Internat. Ins. Co., supra, 62 Cal.App.4th 981, 990) and could not avoid its responsibility (and attempt to maximize its recovery on the indemnity agreements) by attributing some of the loss to the Cam bond.
(3) This is true despite the fact that Allsale had a direct right of action against First National on the Cam bond. Allsale's right of action is a requirement of Civil Code section 3181, designed to provide an additional means of compensation to suppliers like Allsale (Capitol Steel Fabricators, Inc. v. Mega Construction Co. (1997) 58 Cal.App.4th 1049, 1061 [68 Cal.Rptr.2d 672]; Washington Internat. Ins. Co., supra, 62 Cal.App.4th 981), not to assist sureties like First National. The coincidental fact that First National also bonded Cam did not dilute its obligation to Cam as obligee on the Sabco bond.
If First National had been Sabco's surety, but not Cam's, and had received the Allsale complaint, it would have no reason to turn to Cam. If First *1366 National had been Cam's surety, but not Sabco's, on receipt of the Allsale complaint it surely would have tendered the entire matter to Sabco and its surety. The Cam bond was only charged because First National was both Cam's and Sabco's surety, and that happenstance could not change First National's obligations.
(4) First National argues that it was prudent and reasonable for it to apportion liability between the bonds, because at the time it paid Allsale, it could not determine which of the principals were liable for the Allsale claim. The facts are otherwise. First National had a duty to "pursue diligently an investigation of a claim" (Cal. Code Regs., tit. 10, § 2695.10, subds. (d); see also id., subd. (f)) but it seems to have made no effort to determine whether Cam or Sabco was liable to Allsale. Instead, it tendered the complaint to Cam. If First National had sought to determine liability, it would not have had to struggle with the issue. The Allsale complaint alleged that Sabco (not Cam) owed it money, and attached Allsale's contract with Sabco. That complaint brought no cause of action against Cam, except on the bond. First National could have had no reason to believe that the fault or the obligation was Cam's.
First National also argues that Cam's failure to pay Sabco prevented Sabco from paying Allsale. First National cites nothing in the record which would establish that this is so. Moreover, First National cites no law which would establish that under such circumstances, it was entitled to charge the loss to Cam's bond. Nor is Cam's refusal to release retained funds relevant to the result here. Cam had no obligation to agree that those funds be released to First National.
(5) First National was not entitled to attribute any of the Allsale loss to the Cam bond, which means that it was not entitled to indemnity from Cam for either the sum paid to Allsale or for attorney fees it incurred in that action. Our reversal of the judgment against Cam and in favor of First National also means that First National was not the prevailing party in this action, vis-à-vis Cam, and was not entitled to attorney fees as prevailing party.

The attorney fees order on Cam's cross-complaint against Sabco
After trial, the court found that Sabco breached its contract with Cam by drilling in areas where there was asbestos, and awarded $12,922 for that breach, jointly and severally against Sabco and First National. The court also found that Cam was the prevailing party on its cross-complaint against Sabco, and as such was entitled to its reasonable attorney fees. It awarded attorney fees against Sabco in the sum of $20,000. Cam contends that the court erred when it failed to include First National in the fees award. We agree.
*1367 (6) Under Civil Code section 2808, "Where one assumes liability as surety upon a conditional obligation, his liability is commensurate with that of the principal." Thus, "certain bond claimants are entitled to recover from a surety the attorney fees they expend to enforce their contract with the principal, if the contract between the principal and the claimant expressly calls for the payment of attorney fees. (See Grace v. Croninger (1922) 56 Cal.App. 659, 667-668 [206 P. 130] [surety who guaranteed performance of a lease containing an attorney fees clause is liable for the payment of such fees] and Boliver v. Surety Co. (1977) 72 Cal.App.3d Supp. 22 [140 Cal.Rptr. 259]; Conners, Cal. Surety & Fidelity Bond Practice (Cont.Ed.Bar 1969) § 7.24, p. 72.)" (T&R Painting Construction, Inc. v. St. Paul Fire & Marine Ins. Co. (1994) 23 Cal.App.4th 738, 744-745 [29 Cal.Rptr.2d 199].) The trial court found that under the Cam-Sabco contract, Cam was entitled to attorney fees from Sabco. Under these principles, First National, too, was liable for those fees.
(7) First National argues, however, that the rules only apply when the underlying contract is incorporated into the performance bond, and that the Cam-Sabco contract was not incorporated into the Sabco bond. We cannot see that the cases, or the statute, are so limited. Instead, a performance bond and the underlying contract must be read together, as "parts of substantially one transaction." (Civ. Code, § 1642; see Boys Club of San Fernando Valley, Inc. v. Fidelity & Deposit Co. (1992) 6 Cal.App.4th 1266, 1271-1272 [8 Cal.Rptr.2d 587].) Moreover, the Sabco performance bond specifically references the Cam-Sabco contract. It provides that the contract is the condition of First National's obligation on the bond, and that if the principal, Sabco, faithfully performs all the provisions of the contract, the obligation will be void.
(8) First National also cites Crane Co. v. Borwick Trenching Corp. (1934) 138 Cal.App. 319 [32 P.2d 387], contending that under that case, a bond does not necessarily guarantee all the covenants of the underlying contract. Crane is not on point. It involved a claim from a materials supplier who was a stranger to the bond and to the contract underlying the bond. (Pacific Employers Ins. Co. v. City of Berkeley (1984) 158 Cal.App.3d 145, 150 [204 Cal.Rptr. 387].) Where, as here, the claim is made by a party to the very contract guaranteed in the bond, "a reference to the contract must be given broader interpretation." (Id. at pp. 150-151.)
Finally, First National argues that a trial court has discretion to determine that there is no prevailing party. The argument is of no assistance, because the trial court determined that there was a prevailing party, Cam.


*1368 Disposition
The judgment in favor of First National and against Cam is reversed, as is the award of attorney fees to First National as prevailing party in this case, against Cam. The judgment in favor of Cam and against Sabco and First National is ordered amended, so that First National is jointly and severally liable for the attorney fees award. Appellant to recover costs on appeal.
Turner, P. J., and Mosk, J., concurred.
NOTES
[1]  Cam and the individual indemnitors are sometimes referred to herein as "Cam."
[2]  Sabco and the individual indemnitors are sometimes referred to herein as "Sabco."
[3]  Allsale had also filed a stop notice "to reach unexpended construction funds in the hands of the owner" (National Technical Systems v. Superior Court (2002) 97 Cal.App.4th 415, 418, fn. 2 [118 Cal.Rptr.2d 465]) and there were causes of action against all defendants for enforcement of the stop notice and any stop notice bond.
[4]  That statute provides that "If a surety satisfies the principal obligation, or any part thereof, whether with or without legal proceedings, the principal is bound to reimburse what he has disbursed, including necessary costs and expenses; but the surety has no claim for reimbursement against other persons, though they may have been benefited by his act, except as prescribed by the next section." (Civ. Code, § 2847.)
[5]  The statement of decision also includes the sum of $20,000 for "The attorney's fees in the Cam action," and totals the award at $90,742. Cam moved to correct the judgment, claiming clerical error. The court denied the motion, and Cam raises the issue on this appeal, but does so as part of its challenge to the award of attorneys' fees to First National as prevailing party in this action. As Cam also argues, that award fails on our reversal of the judgment in favor of First National. We need not further consider the question.
[6]  That case observed that de novo review applies where there has been no parol evidence concerning the parties' intent. There was such evidence here, but Yenaris did no more than echo and confirm the legal, and obvious, purpose of requiring a subcontractor to obtain a bond. Certainly, First National suggests no other possible purpose.
