
101 Cal.Rptr.2d 48 (2000)
84 Cal.App.4th 605
WALT RANKIN & ASSOCIATES, INC., Plaintiff and Appellant,
v.
CITY OF MURRIETA, Defendant and Respondent.
No. E024139.
Court of Appeal, Fourth District, Division Two.
October 31, 2000.
*52 Ashley, Brady & Cerniglia and Sam J. Cerniglia, San Diego, for Plaintiff and Appellant.
Harper & Burns and John R. Harper, Orange, for Defendant and Respondent.
Bill Lockyer, Attorney General, Richard W. Bakke, Supervising Deputy Attorney General, Leslie Branman Smith and Gregory S. Price, Deputy Attorneys General, for J. Clark Kelso, Acting Insurance Commissioner, as Amicus Curiae.

OPINION
HOLLENHORST, J.
In an action by a subcontractor for negligent breach of a mandatory duty against the City of Murrieta ("City"), the trial court entered judgment for the City. The subcontractor appeals, contending the trial court erred in finding the City did not have a mandatory duty to require the surety providing a payment bond under Civil Code sections 3247 and 3248[1] to be an admitted surety insurer or to confirm the sufficiency of the surety prior to accepting the bond.
The resolution of this appeal requires us to determine several issues of first impression, including: (1) must the statutory scheme under sections 3247 and 3248, requiring a payment bond as a condition of being awarded a contract by a public entity, be construed with reference to the Bond and Undertaking Law, Code of Civil Procedure section 995.010 et seq; and (2) if so, do those sections construed together impose a mandatory duty under Government Code section 815.6 on a government entity awarding a public contract to take certain measures to ensure the payment bond surety is a sufficient admitted surety insurer under Code of Civil Procedure 995.310. We answer these questions in the affirmative and reverse the judgment of the trial court. Other issues will be addressed in this opinion as they arise.

I.

FACTS AND PROCEDURAL HISTORY
In lieu of trial, the parties submitted a stipulation of agreed facts. The following undisputed facts are taken from the stipulation.
After soliciting bids for the construction of a playground park project, the City of Murrieta ("City") awarded the subject construction contract to general contractor Michael Bahash, doing business as KLM Engineering ("KLM") on March 21, 1995. As part of the bid solicitation process and the award of the contract, KLM was required under sections 3247 and 3248 to provide a payment bond to the City. On March 27, 1995, a payment bond, also referred to as a labor and materials bond, was executed by Red Sea Group, Ltd. ("Red Sea"), as surety, through its attorney-in-fact, Sergei N. Klimow, an Arizona attorney. The form of the bond had been provided by the City to Red Sea after the form initially submitted by Red Sea was in an unacceptable format.
The City inquired of Mr. Klimow regarding the surety on the bond and his execution of the bond as the surety's attorney-in-fact. In response, Mr. Klimow furnished the City with a copy of his special power of attorney, recorded June 7, 1994, in San Bernardino County, California, executed by Red Sea's President, David Pesnell. Mr. Klimow further provided the City with a letter from California's Secretary of State, dated December 13, 1994, acknowledging Red Sea's filing on that *53 date of a statement by a foreign lending institution, pursuant to Corporations Code section 2104.[2] The City approved the bond without further investigation.
On May 3, 1995, Walt Rankin & Associates ("Rankin") entered into a contract with KLM to supply and install the playground equipment at the park for the subcontract price of $100,514. Prior to its bidding on and completion of its subcontract, Rankin did not make any inquiry regarding the payment bond approved by the City, nor did Rankin inquire about the financial condition of Red Sea. Rankin completed installation of the playground equipment on or about June 15, 1995, and demanded payment from KLM on June 30, 1995 in the amount of $100,514.
When KLM failed to make payment, Rankin initiated statutory stop notice procedures. Pursuant to Rankin's stop notice, the City withheld the remaining sum due to KLM, $63,000, and on April 17, 1996, disbursed that amount to Rankin, leaving a balance of $37,514 due under the subcontract. Rankin's demands under the payment bond were unsuccessful and the $37,514 balance due to Rankin remains unpaid.
As it turned out, Red Sea was a Turks and Caicos Islands corporation that maintained and did its business out of offices in Tucson, Arizona. Red Sea was not licensed as a surety by either the California or Arizona state insurance departments, nor any other state, and Red Sea was not a corporation authorized to do business in California. Shortly after the bond in this case was given, Mr. Klimow resigned as attorney-in-fact for both Red Sea and its president, Mr. Pesnell. Mr. Pesnell was subsequently indicted in the United States District Court, District of Arizona, in connection with his participation in an "Individual Surety Bonding Program." Mr. Pesnell pled guilty to fraudulent misrepresentation. In mid 1996, Red Sea and Mr. Pesnell vacated their Tucson, Arizona office, leaving rent owing in excess of $20,000; "since then, their whereabouts are unknown, and their assets are nonexistant [sic] or unable to be located."
On July 8, 1996, Rankin filed a verified complaint alleging five causes of action: (1) breach of contract against KLM; (2) enforcement of its stop notice against the City; (3) recovery against Red Sea Group, Ltd., on the payment bond; (4) fraud by Sergei N. Klimow; and (5) negligence by the City and failure to perform a statutory duty. The City filed an answer to the complaint on September 4, 1996.[3] On May 18, 1998, the City and Rankin filed the above mentioned stipulation of agreed facts together with exhibits, and agreed that the trial court could decide the issues in the case based on that stipulation in lieu of trial.
Rankin requested a statement of decision pursuant to Code of Civil Procedure section 632, which the trial court issued on November 24, 1998. In its statement of decision, the trial court ruled that the City did not have a duty under Civil Code sections 3247 and 3248 to require a surety providing a payment bond to be an admitted surety insurer or to confirm the solvency *54 of the surety. Rankin challenges this ruling on appeal.

II.

MANDATORY DUTY
On appeal, Rankin challenges the trial court's ruling that the City did not have a duty to determine whether the entity providing a payment bond for its public works project was an admitted surety insurer. According to Rankin, it was not enough for the City to "make inquiry" of the attorney-in-fact, examine a letter provided by the attorney-in-fact from the Secretary of State acknowledging Red Sea's filing of a statement by a foreign lending institution (Corp.Code, § 2104), and look at the attorney-in-fact's recorded special power of attorney. Rather, Rankin contends the City had a mandatory duty to refer to the county clerk's register of admitted surety insurers, telephone the California Department of Insurance to inquire whether Red Sea was licensed as a surety, and contact the Secretary of State to ascertain Red Sea's qualifications to do business in California. The City responds that no such mandatory duty exists and makes reference to the immunity provision contained in Government Code section 815, subdivision (b).[4]
In sorting out the issues presented, we must follow a logical sequence of inquiry, keeping in mind that conceptually, questions of statutory immunity do not become relevant until it has been determined that the government entity owes a duty of care to the plaintiff and would be liable in the absence of such immunity. (Davidson v. City of Westminster (1982) 32 Cal.3d 197, 201-202, 185 Cal.Rptr. 252, 649 P.2d 894.) Accordingly, although analytically the issues are somewhat related, we must address the question of statutory liability for breach of a mandatory duty prior to the question of statutory immunity. (Creason v. Department of Health Services (1998) 18 Cal.4th 623, 630, 76 Cal.Rptr.2d 489, 957 P.2d 1323.)
We begin our analysis with the well-established rule that "[u]nder the California Tort Claims Act (Gov.Code, § 810 et seq.), `a public entity is not liable for injury arising from an act or omission except as provided by statute. (Gov.Code, § 815, subd. (a); [citation].)' [Citation.] Thus, in California, `all government tort liability must be based on statute [citation].' [Citation.] `"In the absence of a constitutional requirement, public entities may be held liable only if a statute ... is found declaring them to be liable."' [Citation.]" (Hoff v. Vacaville Unified School Dist. (1998) 19 Cal.4th 925, 932, 80 Cal. Rptr.2d 811, 968 P.2d 522, fn. omitted.)
One such statute is Government Code section 815.6. It provides: "Where a public entity is under a mandatory duty imposed by an enactment that is designed to protect against the risk of a particular kind of injury, the public entity is liable for an injury of that kind proximately caused by its failure to discharge the duty unless the public entity establishes that it exercised reasonable diligence to discharge the duty."
"[A]pplication of section 815.6 requires that the enactment at issue be obligatory, rather than merely discretionary or permissive, in its directions to the public entity; it must require, rather than merely authorize or permit, that a particular action be taken or not taken. [Citation.] It is not enough, moreover, that the public entity or office have been under an obligation to perform a function if the function itself involves the exercise of discretion. [Citation.]" (Haggis v. City of Los Angeles (2000) 22 Cal.4th 490, 498, 93 Cal.Rptr.2d 327, 993 P.2d 983 ("Haggis").)[5]*55 Whether an enactment is intended to impose a mandatory duty, as opposed to a mere obligation to perform a discretionary function, is a question of law for the court. (Haggis at p. 499, 93 Cal. Rptr.2d 327, 993 P.2d 983.)
The enactment's language is an important guide in determining legislative intent. (Haggis, supra, 22 Cal.4th 490, 499, 93 Cal.Rptr.2d 327, 993 P.2d 983.) To this extent, the usual rule with California codes is that "shall" is mandatory and "may" is permissive unless the context requires otherwise. (Roseville Community Hosp. v. State of California (1977) 74 Cal. App.3d 583, 587-588, fn. 4, 141 Cal.Rptr. 593; Gov.Code, §§ 5, 14.) At the same time, though, not every statute that uses the word "shall" is obligatory rather than permissive, and there may be factors other than statutory language that may indicate that apparently obligatory language was not intended to foreclose a government entity's exercise of discretion. (Haggis, at p. 499, 93 Cal.Rptr.2d 327, 993 P.2d 983.)
"`Government Code section 815.6 contains a three-pronged test for determining whether liability may be imposed on a public entity: (1) an enactment must impose a mandatory, not discretionary, duty ...; (2) the enactment must intend to protect against the kind of risk of injury suffered by the party asserting section 815.6 as a basis for liability ...; and (3) breach of the mandatory duty must be a proximate cause of the injury suffered.' [Citation.]" (Becerra v. County of Santa Cruz (1998) 68 Cal.App.4th 1450, 1458, 81 Cal.Rptr.2d 165.) All three elements must be met before a government entity is required to confront the rebuttable presumption of negligence. (Braman v. State of California (1994) 28 Cal.App.4th 344, 349, 33 Cal.Rptr.2d 608; Brenneman v. State of California (1989) 208 Cal.App.3d 812, 816-817, fn. 2, 256 Cal.Rptr. 363.)

A. Is there an Enactment Imposing a Mandatory Duty?

Rankin contends the City had a mandatory duty under various statutory provisions to investigate Red Sea's status and solvency prior to accepting the payment bond. We examine each statute in turn.

1. Mandatory Duty Under Sections 3247 and 3248.

The trial court ruled that sections 3247 and 3248 did not impose a duty on the City to confirm Red Sea's solvency prior to *56 accepting the payment bond or to require that Red Sea be an admitted surety insurer before accepting it as surety on the bond. Rankin contends the trial court erred in so ruling.
Section 3247 requires a payment bond as a condition of being awarded a contract by a public entity. It provides in relevant part as follows: "(a) Every original contractor to whom is awarded a contract by a public entity, except as provided in subdivision (d) of Section 7103 of the Public Contract Code, involving an expenditure in excess of twenty-five thousand dollars ($25,000) for any public work shall, before entering upon the performance of the work, file a payment bond with and approved by the officer or public entity by whom the contract was awarded...." (Italics added.)
Former section 3248 sets forth the requirements for approval: "To be approved the payment bond shall satisfy all of the following requirements: [¶] (a) Be in a sum not less than that prescribed in the following paragraph which is applicable to the total amount payable: [¶] ... [¶] (b) Provide that if the original contractor ... fails to pay [a subcontractor] that the sureties will pay for the same, and ... in case suit is brought upon the bond, a reasonable attorney's fee, to be fixed by the court.... [¶] (c) By its terms inure to the benefit of [the subcontractor] so as to give a right of action to such persons or their assigns in any suit brought upon the bond. [¶] (d) Be in the form of a bond and not a deposit in lieu of a bond."[6]
We discern nothing on the face of either section 3247 or 3248 requiring that the surety be an admitted surety insurer or mandating a public entity to investigate the solvency of the surety. Rather, the plain language of those sections requires only that a payment bond be provided where the public contract involves an expenditure over $25,000, and that the bond follow the requirements of section 3248. Here, a payment bond was provided as required by section 3247 because the public contract contemplated an expenditure in excess of $25,000.[7] As required by section 3248, the payment bond provided by Red Sea (1) was for the sum of $238,280, an amount not less than the prescribed amount under subdivision (a)(1);[8] (2) provided that if KLM, the original or general contractor, failed to pay for "any work or labor thereon of any kind...." Red Sea would pay for same and in "case suit is brought upon [the] bond," Red Sea would pay costs and reasonable expenses and fees, including reasonable attorney fees, to be fixed by the Court; (3) by its terms inured to the benefit of Rankin, and (4) was in the form of a bond. The plain language of sections 3247 and 3248 does not require more.

2. The Bond and Undertaking Law, Code of Civil Procedure Section 995.010 et seq.

Rankin, however, contends that "merely" meeting the "bare requirements" for approval under sections 3247 and 3248 is insufficient to protect laborers and materialmen such as itself and that sections 3247 and 3248 must be read in conjunction with certain provisions of the Bond and Undertaking Law, Code of Civil Procedure section 995.010, et seq. According to Rankin, these sections collectively imposed a duty on the City to determine whether *57 Red Sea was an admitted surety insurer and to investigate Red Sea's solvency. The City, on the other hand, maintains there is no duty or requirements beyond those in sections 3247 and 3248.
In order to resolve the dispute over whether sections 3247 and 3248 should be interpreted according to their own plain terms or in conjunction with provisions outside the terms of those sections, we look to well-settled rules of statutory construction. "[O]ur primary task in construing a statute is to determine the Legislature's intent. [Citation.] The court turns first to the words themselves for the answer. [Citation.] When statutory language is ... clear and unambiguous there is no need for construction, and courts should not indulge in it. [Citation.] Where a statute is theoretically capable of more than one construction we choose that which comports with the intent of the Legislature. [Citations.] Words must be construed in context, and statutes must be harmonized, both internally and with each other, to the extent possible. [Citations.]" (Alford v. Department of Motor Vehicles (2000) 79 Cal.App.4th 560, 565-566, 94 Cal. Rptr.2d 222, internal quotation marks omitted.)
"When two statutes relate to the same subject, ordinarily the more specific and particular provision will govern as against the more general provision, although the latter standing alone is broad enough to include the subject addressed by the more particular provision. [Citations.] However, this rule applies only to the extent the two provisions cannot be reconciled. [Citations.] When reconciliation is possible, the two statutes must be construed 'in reference to each other, so as to "harmonize the two in such a way that no part of either becomes surplusage." [Citations.]' [Citation.] It must be presumed that `the Legislature intended "every word, phrase and provision ... in a statute ... to have meaning and to perform a useful function."` [Citation.]" (Gonzalez v. County of Tulare (1998) 65 Cal.App.4th 777, 786-787, 76 Cal.Rptr.2d 707.)
Upon reviewing the statutory scheme in this manner, we conclude sections 3247 and 3248 cannot be read in isolation but must instead be read in conjunction with the Bond and Undertaking Law (Code Civ. Proa, § 995.010 et seq.). This conclusion follows from examination of the statutory scheme.
In 1982, the California Law Revision Commission found that "the codes provide for more than 500 different bonds and undertakings, each governed by similar but not identical procedural statutes. [¶] The proliferation of procedural statutes to govern bonds and undertakings is unnecessary. The rules applicable to such matters as the manner of execution of a bond or undertaking, the number and qualifications of sureties, the giving of a new or additional bond or undertaking if the original bond or undertaking becomes insufficient, the limitation on liability of a surety to the amount of the bond or undertaking, and the ability to give a cash or equivalent deposit in lieu of a bond or undertaking, are the same for all bonds and undertakings. Repetition of such procedural rules in every statute that provides for a bond or undertaking is not only wasteful and adds to the complexity and length of the statutes, but also creates the likelihood of inconsistent wording and interpretation where the rules should be the same. [¶] ... The Law Revision Commission recommends that the procedural bond and undertaking provisions be compiled into one statute and that the duplicative provisions be repealed or deleted from the codes." (Recommendation Relating to Statutory Bonds and Undertakings (Nov. 1982) 16 Cal. Law Revision Com. Rep. (1982) pp. 507-508.) In accordance with the Commission's recommendations, the Bond and Undertaking Law was enacted, and duplicative provisions were deleted from various codes. One of the amended provisions was Civil Code section 3248. It was amended to eliminate duplicative provisions, *58 including the subjects now covered by Code of Civil Procedure sections 995.310 (sureties on bond), 996.460 (judgment of liability), and 996.470 (limitation of liability of surety). (16 Cal. Law Revision Com. Rep., supra, at p. 567.)
The clear legislative intent to consolidate the procedural requirements for surety bonds in one place is expressed in the statute itself: "The provisions of this chapter apply to a bond or undertaking executed, filed, posted, furnished, or otherwise given as security pursuant to any statute of this state, except to the extent the statute prescribes a different rule or is inconsistent." (Code Civ. Proa, § 995.020, subd. (a).) In view of the legislative history, and since the provisions of the Bond and Undertaking Law do not prescribe a different rule and are not inconsistent with those set forth in sections 3247 and 3248, we hold that Civil Code sections 3247 and 3248 must be construed in conjunction with the Bond and Undertaking Law.

3. Waiver of Any Mandatory Duty.

Having so determined, we are faced squarely with the City's contention that if the Bond and Undertaking Law is to be construed with Civil Code sections 3247 and 3248, Rankin waived any recovery by failing to timely object to the bond. According to the City, there is a statutory procedure for objecting to the sufficiency of the bonds "[c]ommencing at Code of Civil Procedure [s]ection 995.910." The City argues that section 995.910 imposed a duty on Rankin to make some investigation as to the sufficiency of the surety and to timely raise the issue. Because Rankin admittedly did not make any investigation as to the payment bond given in this case, the City concludes Rankin's action is barred.[9]
Rankin responds by pointing out that Code of Civil Procedure section 995.910 expressly states that "[t]his article governs objections to a bond given in an action or proceeding." (Italics added.) Rankin asserts the payment bond in question here was not a bond given in an action or proceeding. We agree.
"The Bond and Undertaking Law does not affirmatively define the term bond `given in an action or proceeding.' Rather, it describes this term only by exclusion, stating that `[a] bond provided for or given "in an action or proceeding" does not include a bond provided for, or given as, a condition of a license or permit.' (§ 995.140, subd. (b), italics added.) More generally, a 'Bond' for purposes of the Bond and Undertaking Law includes `[a] surety, indemnity, fiduciary, or like bond' or `undertaking' executed either by both the principal and sureties, or by the sureties alone. (§ 995.140, subd. (a)(1), (2).)" (Grade-Way Construction Co. v. Golden Eagle Ins. Co. (1993) 13 Cal.App.4th 826, 830, 16 Cal.Rptr.2d 649, fn. omitted.) Additionally, "[a]lthough the Bond and Undertaking Law does not define the phrase, `given in an action or proceeding,' the Code of Civil Procedure identifies `actions' and 'proceedings' as the two classes of `judicial remedies' (§ 21), i.e., remedies `administered by the [c]ourts of justice, or by judicial officers empowered for that purpose by the Constitution and statutes of this [s]tate.' (§ 20.) The Code of Civil Procedure further defines an `action' as `an ordinary proceeding in a court of justice by which one party prosecutes another for the declaration, enforcement, or protection of a right, the redress or prevention of a wrong, or the punishment of a public offense.' (§ 22.) In this context, the word 'action' is synonymous with a lawsuit. On the other hand, the word `proceeding' is broader. Under section-23, `[e]very other remedy is a special proceeding.'" (Grade-Way *59 Construction, at p. 832-833, 16 Cal. Rptr.2d 649.)
Based on the above analysis, the payment bond given in this case was not a bond given in an action or proceeding. A payment bond under Civil Code sections 3247 and 3248 is not procured in connection with a lawsuit or related proceeding. To the contrary, it must be obtained as a condition of being awarded a public contract. In this manner, a payment bond under sections 3247 and 3248 is more like a bond given as a condition of a license or permit, which is distinguishable from one given in an action or proceeding. (See Code Civ. Proa, § 995.140, subd. (b) ["A bond provided for or given `in an action or proceeding' does not include a bond provided for, or given as, a condition of a license or permit"].) As such, Rankin did not waive its claim by failing to object under Code of Civil Procedure sections 995.910 to 995.960, as those sections do not apply to payment bonds given pursuant to Civil Code sections 3247 and 3248.
Nor is Rankin's claim waived under Chodos v. Insurance Co. of North America (1981) 126 Cal.App.3d 81, 178 Cal.Rptr. 829, as contended by the City. First, though not an issue considered by the Chodos court, we note that the Chodos case involved a bond given in an action or proceeding, i.e., an appeal, whereas this case does not. Second, the statutory scheme considered in Chodos was amended by the Legislature in a manner we view as intending to eliminate the waiver argument set forth by the Chodos opinion.
In Chodos, the Second Appellate District construed former Code of Civil Procedure sections 1056 (repealed; restated in Code Civ. Proa, §§ 995.120, 995.310, 995.610, 995.630) and 1057b (repealed; restated in Code Civ. Proa, § 995.650). Former section 1057b reads as follows: "A corporate surety, as provided in Section 1057a, shall not be required to justify unless the person excepting to the sufficiency of the surety serves and files: [¶] (1) The county clerk's certificate provided for in Section 1057a stating that the surety has not been certified to him by the Insurance Commissioner as an admitted surety insurer or that the certificate of the surety has been surrendered, revoked, canceled, annulled or suspended and not thereafter renewed; or [¶] (2) An affidavit stating facts which establish the insufficiency of the bond or surety." (Italics added.) Because the plaintiff in Chodos had not timely objected to the bond filed to stay the enforcement of the underlying judgment (Code Civ. Proc., § 917.1), the court held that plaintiff had waived his right to except to the insufficiency of the bond. (Chodos v. Insurance Co. of North America, supra, 126 Cal.App.3d 81, 84-85, 178 Cal.Rptr. 829.)
Former section 1057b is restated in Code of Civil Procedure section 995.650 as follows: "If an objection is made to the sufficiency of an admitted surety insurer, the person making the objection shall attach to and incorporate in the objection one or both of the following: [¶] (a) The certificate of the county clerk of the county in which the court is located stating that the insurer has not been certified to the county clerk by the Insurance Commissioner as an admitted surety insurer or that the certificate of authority of the insurer has been surrendered, revoked, canceled, annulled, or suspended and has not been renewed. [¶] (b) An affidavit stating facts that establish the insufficiency of the insurer."
Significantly, section 995.650 is similar to the former statute in all material respects except that it omits the first sentence of former section 1057b that "[a] corporate surety ... shall not be required to justify unless the person excepting to the sufficiency of the surety serves and files" certain documents. Because we must presume the Legislature was aware of the Chodos opinion when it repealed the former statute and omitted the phrase from Code of Civil Procedure section 995.650 (see White v. Ultramar, Inc. (1999) 21 Cal.4th 563, 572, 88 Cal.Rptr.2d 19, 981 *60 P.2d 944 ["when the Legislature amends a statute, we presume it was fully aware of the prior judicial construction"] ), we view that omission as an intent by the Legislature to no longer require a person to except to the sufficiency of the surety before a corporate surety will be held accountable.
We find no other basis in the statutory scheme for holding Rankin's failure to object to constitute a waiver. Therefore, we turn now to the issue of whether sections 3247 and 3248, when analyzed in conjunction with the Bond and Undertaking Law, impose a mandatory duty on a government entity to determine whether the surety is an admitted surety insurer prior to accepting a payment bond from that surety and to investigate a surety's solvency.

4. Mandatory Duty Under Civil Code Sections 32-7 and 3248 and Code of Civil Procedure Section 995.010 et seq.


a. Code of Civil Procedure section 995.310.

Rankin contends a mandatory duty was imposed on the City by Code of Civil Procedure section 995.310 to ensure that the surety giving the bond was authorized and licensed by the Insurance Commissioner as an "admitted surety insurer." According to Rankin, the City breached this duty by not requiring Red Sea to be an admitted surety insurer.[10]
Code of Civil Procedure section 995.310 states: "Unless the statute providing for the bond requires execution by an admitted surety insurer, a bond shall be executed by two or more sufficient personal sureties or by one sufficient admitted surety insurer or by any combination of sufficient personal sureties and admitted surety insurers."
The plain language of the statute does not per se impose a duty on a public entity. Nevertheless, we are unable to ignore the mandatory language of the statute imposing a duty to ensure that the subject bond be executed by one of the three categories of insurers identified in Code of Civil Procedure section 995.310. As the public entity is the one required to approve the subject bond, it stands to reason that the public entity must be the one to require compliance with Code of Civil Procedure section 995.310. Any other interpretation would render the provision meaningless.
That Code of Civil Procedure section 995.310 imposes a mandatory duty on a public entity to require that the bond be executed by one of the three categories of insurers becomes more apparent when our discussion above regarding the Legislature's amendment of Civil Code former section 3248 to delete provisions duplicated in the Bond and Undertaking Law is added to the analysis. As detailed above (see supra section II.A.2), the portion deleted from section 3248 required the payment bond to "be executed by either two or more good and sufficient sureties or by a corporate surety" in order to be approved. This requirement is now contained in Code of Civil Procedure section 995.310.
In addition, although Civil Code section 3096 defines a "payment bond" as "a bond with good and sufficient sureties," neither section 3096, 3247 nor 3248 defines what constitutes a "sufficient surety." Rather, that term is encompassed by Code of Civil Procedure section 995.310's requirement that a bond be executed by one sufficient admitted surety insurer, two or more sufficient personal sureties, or any *61 combination of sufficient personal sureties and admitted surety insurers.
We conclude Code of Civil Procedure section 995.310 imposed a mandatory duty on the City either to require Red Sea to be an admitted surety insurer or to require two or more sufficient personal sureties or a combination of sufficient personal sureties and admitted surety insurers. Since the City failed to determine that Red Sea was an admitted surety insurer, it failed to perform a mandatory duty. Accordingly the trial court erred in concluding that "The City does not owe a duty to Plaintiff to determine the status of the insurer being an admitted surety insurer."

b. Code of Civil Procedure section 995.660.

Rankin advances the argument that, in addition to determining that the insurer was an admitted surety insurer, the City was required to investigate the solvency of the proposed surety pursuant to Code of Civil Procedure section 995.660. According to Rankin, that section imposed a mandatory duty on the City to investigate the sufficiency of the surety prior to approving the payment bond.
Code of Civil Procedure section 995.660, subdivision (a) provides that "[i]f an objection is made to the sufficiency of an admitted surety insurer on a bond or if the bond is required to be approved, the insurer shall submit to the court or officer the following documents..." (Italics added.)[11]
The second phrase of Code of Civil Procedure section 995.660, subdivision (a) requires the insurer to submit, upon request, the specified documents "if the bond is required to be approved." Civil Code section 3247 requires a payment bond to be filed with and approved by the public entity. Therefore, because a payment bond is required to be approved, an insurer giving a payment bond is obligated to provide the documents listed in section 995.660, subdivision (a), within 10 days of its receipt of a request to submit the document.
Rankin argues that the City ignored these provisions by failing to request these documents in order to determine the sufficiency of the surety. We disagree. The text of the section, as set forth in footnote 11, ante, requires the insurer to submit the documents listed in Code of Civil Procedure section 995.660, subdivision (a)(1), (2) and (4) upon request. Subdivision (a)(3) requires the insurer to submit the county clerk's certificate within 10 days of receipt of the certificate.
The plain implication is that only the county clerk's certificate should normally *62 be submitted. The other documents are only submitted upon request of the approving agency. The issue of whether a request should have been made in any particular case must be resolved under Government Code section 815.6, which, as discussed further below, imposes liability for breach of a mandatory duty "unless the public entity establishes that it exercised reasonable diligence to discharge the duty." In the normal case, the public agency's receipt of the county clerk's certificate sufficiently discharges the agency's duty to use reasonable diligence to determine that the bond is given by a sufficient admitted surety insurer because the Insurance Commissioner has investigated and approved the insurance company's solvency prior to placing the company on the list of admitted surety insurers.
In its amicus brief, and its request for judicial notice, the Insurance Commissioner points out that, if the City had sought such a County Clerk's certificate in this case, it would have been unsuccessful. In other words, if the City had followed the statutory procedure, it would have discovered that Red Sea was not an admitted surety insurer, regardless of the sufficiency issue. The Insurance Commissioner also points out that its Internet web page allows anyone to determine whether a company is an admitted insurer or not.[12]
We therefore hold that the City had a mandatory duty under Code of Civil Procedure section 995.660 subdivision (a)(3) to investigate Red Sea's sufficiency by requiring it to submit a county clerk's certificate showing that it was an admitted surety insurer. It did not do so, and accordingly, it is liable for breach of its mandatory duty under Government Code section 815.6.
In the exercise of reasonable diligence under Government Code section 815.6, the City could have performed its mandatory duty by obtaining a certificate directly from the county clerk, or otherwise verifying that the surety was an admitted surety insurer. However, the City could reasonably rely on the Insurance Commissioner's certification of solvency which is inherent in the approval of an out-of-state insurer as an admitted insurer, and it did not have a duty to take other steps to investigate the financial sufficiency of the insurer under Code of Civil Procedure section 995.660 unless such an investigation was required in the exercise of reasonable diligence.

c. Other Sections of the Bond and Undertaking Law.

In addition to Code of Civil Procedure sections 995.310 and 995.660, other sections of the Bond and Undertaking Law are relevant to the issue of the scope of the City's mandatory duty. We have previously mentioned Code of Civil Procedure section 995.020, which defines the application of the law to statutory bonds or undertakings. Code of Civil Procedure section 995.120 defines the term "admitted surety insurer" to mean "a corporate insurer or a reciprocal or interinsurance exchange to which the Insurance Commissioner has issued a certificate of authority to transact surety insurance in this state, as defined in Section 105 of the Insurance Code." Insurance Code section 105 defines surety insurance and Insurance Code section 700 defines the requirements for admission of an insurance company. Admission under that section requires conformance to all of the requirements of the Insurance Code including requirements designed to assure financial solvency. In effect, the Insurance Commissioner investigates and approves financial solvency before admitting an insurance company. Thus, verification by the City that the surety is an admitted surety insurer under Code of Civil Procedure section 995.310 would have avoided the issues that arose here.
*63 Code of Civil Procedure section 995.410 provides that a bond may be approved or disapproved on the basis of the affidavit of the sureties. This section does not aid the City because the special power of attorney submitted by Red Sea's attorney-in-fact did not represent that Red Sea was an admitted surety insurer.
The submission of a special power of attorney can be one of the conditions of acceptance of the surety under Code of Civil Procedure section 995.630, but this section does not affect the duty of the City to determine that the insurer is an admitted surety insurer.
Code of Civil Procedure section 995.640 is also relevant because it provides for the issuance of a county clerk's certificate attesting that the certificate of authority for an admitted surety insurer is in effect. The section provides that the county clerk shall rely on information provided by the Insurance Commissioner pursuant to Insurance Code section 12070 et seq. Section 12070 requires the Insurance Commissioner to provide a list of admitted surety insurers to the respective county clerks. As discussed above, this system informs interested persons of the admitted status of any foreign insurer, and it provides a basis for an inference of financial solvency.
Finally, Code of Civil Procedure section 995.670 provides that a public agency, acting to approve a bond, or in resolving an objection to the sufficiency of an admitted surety insurer, may not impose other requirements than those stated in Code of Civil Procedure section 660. This section supports the conclusion that Code of Civil Procedure sections 995.660 and 995.670 are limitations upon the public agencies' duty to gather information, rather than sections that require the obtaining of all such information.
In any event, for the reasons stated above, we hold that the City had a mandatory duty under the Bond and Undertaking Law to determine that the surety on the bond was an admitted surety insurer.

B. Did the Enactment Intend to Protect Against the Kind of Risk Suffered by Rankin?

The payment bond required under Civil Code section 3247 inures to the benefit of subcontractors such as Rankin and is intended to provide additional protection against defaulting general contractors. (Pacific Employers Ins. Co. v. State of California (1970) 3 Cal.3d 573, 576, 91 Cal.Rptr. 273, 477 P.2d 129 [discussing former Gov.Code, §§ 4200-210, from which Civ.Code, § 3247 was derived].[13]) As was recently summarized: "The purposes of the stop notice remedy include: to protect subcontractors against defaulting contractors by ensuring payment of moneys due under subcontracts [citations]; to solve the problem created by a senior foreclosure which destroys the value of a junior mechanics' lien [citations]; and to permit a subcontractor to bring an action against the owner and the original contractor to enforce the stop notice. [Citation.] The purposes of the public works payment bond include: providing material suppliers and subcontractors an additional means of compensation [citations]; being a substitute for the mechanics lien remedy [citations]; and creating a primary obligation by the surety whose liability is independent of a contractual relationship with the subcontractor or material supplier. [Citations.] The stop notice and payment bond remedies are cumulative. [Citations.]" (Capitol Steel Fabricators, Inc. v. Mega Construction Co. (1997) 58 Cal.App.4th 1049, 1060-1061, 68 Cal.Rptr.2d 672.)
Given the purpose of the stop notice and payment bond remedies to protect subcontractors from defaulting contractors, there can be little dispute but that the approval scheme contemplated by Civil Code section 3248 and Code of Civil Procedure section 995.310 is likewise intended to inure to the benefit of subcontractors such as Rankin, *64 so as to provide protection against noncompliant general contractors and sureties. In other words, the statutes were intended to protect against the harm suffered by Rankin, i.e., nonpayment by a nonqualified surety.

C. Was the Breach of the Mandatory Duty a Proximate Cause of Rankin's Injuries?

The final question in the threepronged analysis is whether the City's breaches of the mandatory duties contained in Code of Civil Procedure section 995.310, requiring that the surety have been an admitted surety insurer or that additional sureties be supplied, proximately caused Rankin's injuries.
"Proximate cause is legal cause, as distinguished from the laymen's notion of actual cause, and is always, in the first instance, a question of law. [Citations.] Proximate cause is that cause which, in natural and continuous sequence, unbroken by any efficient intervening cause, produced the injury [or damage complained of] and without which such result would not have occurred. [Citation.] ..." (State of California v. Superior Court (1984) 150 Cal.App.3d 848, 857, 197 Cal. Rptr. 914, internal quotation marks omitted.)
The court below found that Rankin had failed to establish causation because it had failed to show that the surety was insolvent at the time the bond was accepted by the City. According to the trial court, "if the insurer was solvent at the time of approval of its bond, a bond claimant would not incur damage by failure of a surety to be an admitted surety insurer."
Rankin argues on appeal that it was not required to prove Red Seas was insolvent at the time the City accepted its payment bond because had Red Sea been an admitted surety insurer as required by Code of Civil Procedure section 995.310, it would have been required to be financially viable as prescribed under the Insurance Code as well as regulated by the Insurance Commissioner. In support of its argument, Rankin cites the following quotation from Huckell v. Matranga (1979) 99 Cal. App.3d 471, 480-481, 160 Cal.Rptr. 177:
"An indemnity agreement by individuals differs markedly from an indemnity bond by a corporate surety. First and foremost is the fact that the life of a signator to an indemnity agreement is uncertain and on his death claims against the estate must be asserted or they may be lost. The party seeking to assert the protection afforded by the agreement would be compelled to maintain a constant vigil on the life of the indemnitor, know his residence and, in the event of his death, obtain the information about any probate proceedings instituted. The life of a corporate surety, on the other hand, continues indefinitely and successors in interest are easily traced, [¶] Second, the financial ability of the individual indemnitor is not always known or established and, even if it were, could change with the fortunes of time. The real value of the agreement may be lost. More importantly, there is no control over the indemnitor to assure his investments will be prudently managed. The corporate surety, on the other hand, must maintain certain paid-in capital and surplus (see Ins. Code, § 12050 et seq.), and is closely regulated in policy matters by the Insurance Commissioner of the State of California (Ins.Code, §1170 et seq.)...." (Fns. omitted.)
We find the above discussion regarding corporate sureties instructive. Although Huckell dealt with indemnity bonds, the Bond and Undertaking Law still applied (see Code Civ. Proa, § 995.020, subd. (a) ["The provisions of this chapter apply to a bond or undertaking executed, filed, posted, furnished, or otherwise given as security pursuant to any statute of this state, except to the extent the statute prescribes a different rule or is inconsistent"] ), and under that law, a "corporate surety" is simply another name for an "admitted surety insurer." (See § 995.120, subd. (b) ["For the purpose of application of this *65 chapter to a bond given pursuant to any statute of this state, the phrase[] ... `corporate surety,' ... mean[s] `admitted surety insurer' as defined in this section"][14])
We agree with Rankin that if Red Sea had been an admitted surety insurer as required by section Code of Civil Procedure 995.310, it would have been required to have maintained certain capital and surplus and would have been regulated by the Insurance Commissioner. On the other hand, if the City had properly determined that Red Sea was not an admitted surety insurer as it had a duty to do, the City would have been required to reject Red Sea as surety and KLM as well unless and until the latter came up with a payment bond properly provided by an admitted surety insurer or by otherwise sufficient sureties. Therefore, because the City did not comply with its duty to determine whether Red Sea was an admitted surety insurer, its breach of that duty proximately resulted in Rankin's injuries, i.e., nonpayment of the remainder due under its subcontract with KLM.

III.

IMMUNITY
The next question is whether the City is entitled to any statutory immunity. Although the City refers to Government Code section 815, subdivision (b),[15] that section only states that the City is entitled to any immunity set forth by statute. The section itself does not provide the City with immunity. The City has not cited any other statutory provision and our own research has failed to disclose any statute under which the City may be entitled to immunity.
The closest immunities we have found are those that assertedly insulate a public entity from liability for damages caused by any activity related to the failure to enforce a law and/or to the granting or revoking, or refusal to grant or revoke, a license, permit, or other authorization. (Gov.Code, §§ 818.2,[16] 818.4.[17]) However, our Supreme Court has held that these immunities were intended to confer immunity only in connection with discretionary activities, and not in connection with mandatory duties that cannot be ignored. (Morris v. County of Marin (1977) 18 Cal.3d 901, 911-917, 136 Cal.Rptr. 251, 559 P.2d 606 [no immunity under Gov.Code, §§ 818.2 and 818.4 where county violated mandatory duty under Lab.Code, § 3800 to require county, before issuing building permit, to ascertain that each application for building permit carries workers' compensation insurance]; see also Trewin v. State of California (1984) 150 Cal.App.3d 975, 198 Cal.Rptr. 263 [no immunity under Gov.Code, section 818.4 where DMV violated mandatory duty to refrain from issuing or renewing driver's license to person whom Department has determined cannot safely operate vehicle]; Young v. City of Inglewood (1979) 92 Cal.App.3d 437, 154 Cal.Rptr. 724 [no immunity under Gov. Code § 818.4 where city violated mandatory duty to ensure that recipient of building permit was duly licensed contractor]; Elson v. Public Utilities Commission (1975) 51 Cal.App.3d 577, 580-582, 124 Cal. Rptr. 305 [no immunity under Government Code section 818.4 where commission violated mandatory duty to revoke license of *66 bus company that did not maintain liability insurance]; Elton v. County of Orange (1970) 3 Cal.App.3d 1053, 84 Cal.Rptr. 27 [no immunity under Gov.Code, §§ 818.2 and 818.4 where county violated mandatory duty under state regulations to inspect conditions in foster home].) Application of Government Code section 818.2 or 818.4 immunity to mandatory liability under Government Code section 815.6 would, in words of the Elton court, "completely eviscerate" section 815.6. (Elton, at p. 1059, 84 Cal.Rptr. 27 [referring to Gov.Code, § 818.2 immunity].)
Having failed to find any statutory basis for granting the City immunity from its failure to discharge its mandatory duties, we must conclude the City is not entitled to immunity.

IV.

ATTORNEY FEES
As a final matter, we address the issue of attorney fees for the underlying action. California follows the "American" rule whereby each party is to bear its own attorney fees in litigation, unless otherwise provided by contract or statute. (Pacific Custom Pools, Inc. v. Turner Construction Co. (2000) 79 Cal.App.4th 1254, 1267, 94 Cal.Rptr.2d 756; Code Civ. Proa, § 1021.) Rankin asserts it is entitled to attorney fees under Civil Code sections 3248 and 3250.
Section 3248, subdivision (b) requires a payment bond to include a provision for attorney fees. The required clause provides for an award of attorney fees "in case suit is brought upon the bond." The subject bond in this case included the required provision.
Section 3250 in turn provides: "The filing of a stop notice is not a condition precedent to the maintenance of an action against the surety or sureties on the payment bond. An action on the payment bond may be maintained separately from and without the filing of an action against the public entity by whom the contract was awarded or any officer thereof. In any action, the court shall award to the prevailing party a reasonable attorney's fee, to be taxed as costs."
The City maintains that sections 3248 and 3250 pertain to an action on a bond and while the present action is an action on a bond as against the contractor and the insurer, it is not an action on a bond as against the City. Rather, the action against the City is for its negligent failure to perform a mandatory duty.
We agree. Section 3248 clearly requires the bond to contain a provision for attorney fees when suit is brought upon the bond. The reference in Section 3250 to fees "in any action" refers, in our view, to any action on the bond, as described in the preceding sentence. The action here was like the separate action referred to in the preceding sentence, and it was not an action on the bond, or an action to enforce payment of the bond. Instead, as the City contends, it is in the nature of a tort action against the City for failure to perform a mandatory duty. Accordingly, Rankin is not entitled to recover its attorney fees.

V.

DISPOSITION
The judgment is reversed. Rankin is to recover its costs on appeal.
RAMIREZ P.J., and GAUT, J., concur.
NOTES
[1]  All further statutory references are to the Civil Code unless otherwise indicated.
[2]  Corporations Code section 2104 declares, in pertinent part, that "Any foreign lending institution which has not qualified to do business in this state and which engages in any of the activities set forth in subdivision (d) of Section 191 shall be considered by such activities to have appointed the Secretary of State as its agent for service of process for any action arising out of any such activities, and, on or before June 30th of each year, shall file a statement showing the address to which any notice or process may be sent in the manner and with the effect provided in Section 2111."
[3]  KLM appeared in pro. per. but did not participate in any pretrial proceedings or respond to Rankin's discovery requests; on April 8, 1998, summary judgment was entered against KLM. Red Sea also appeared in pro. per. (by its president, Mr. Pesnell) and also did not participate in any pretrial proceedings or respond to Rankin's discovery requests; on Rankin's motion, Red Sea's answer was stricken on the ground that a corporation cannot appear in pro. per. Mr. Klimow was dismissed from the action on April 15, 1998.
[4]  Under Government Code section 815, subdivision (b), "The liability of a public entity established by this part (commencing with Section 814) is subject to any immunity of the public entity provided by statute, including this part, and is subject to any defenses that would be available to the public entity if it were a private person."
[5]  However, as recently explained by our Supreme Court in Haggis, supra, 22 Cal.4th 490, 499-500, 93 Cal.Rptr.2d 327, 993 P.2d 983, "liability under section 815.6 [does not] require! ] that the enactment establishing a mandatory duty itself manifest an intent to create a private right of action.... When an enactment establishes a mandatory governmental duty and is designed to protect against the particular kind of injury the plaintiff suffered, section 815.6 provides that the public entity `is liable' for an injury proximately caused by its negligent failure to discharge the duty. It is section 815.6, not the predicate enactment, that creates the private right of action. If the predicate enactment is of a type that supplies the elements of liability under section 815.6if it places the public entity under an obligatory duty to act or refrain from acting, with the purpose of preventing the specific type of injury that occurredthen liability lies against the agency under section 815.6, regardless of whether private recovery liability would have been permitted, in the absence of section 815.6, under the predicate enactment alone. [Citation.]

"[To require that the legislative body enacting the predicate law must have intended to create a private right of action] would reduce section 815.6 to a virtual nullity and, with regard to local enactments, would have the bizarre effect of placing with local governmental entities the decision whether they will be liable or immune under state law. We have previously rejected the notion that a local government can, by its own ordinance, exempt itself from liability under the state's Tort Claims Act, of which section 815.6 is a part. [Citation.]" (Original italics, fn. omitted; see also id., at p. 500, fn. 2, 93 Cal. Rptr.2d 327, 993 P.2d 983 [disapproving Court of Appeal opinions, including Zolin v. Superior Court (1993) 19 Cal.App.4th 1157, 1164-1166, 23 Cal.Rptr.2d 871 and State of California v. Superior Court (1992) 8 Cal. App.4th 954, 958, 10 Cal.Rptr.2d 527, to the extent they hold to the contrary].)
[6]  Section 3248 was amended in 1998 (Stats. 1998, ch. 857, § 1). The amendment provides that it applies only to contracts entered into on or after January 1, 1999. (Id., ch. 857, § 14.) Because the matter arose under the prior version, all references to section 3248 will be to the text applicable at that time, that is, as amended by the Statutes 1982, chapter 517, section 84.
[7]  The contract entered into between KLM and the City contemplated construction of the City's project for the amount of $238,280.
[8]  Under section 3248, subdivision (a)(1), the payment bond was required to be not less than "[o]ne hundred percent of the total amount payable by the terms of the contract...."
[9]  See Code of Civil Procedure section 995.930, subdivision (c): "If no objection is made within the time required by statute, the beneficiary is deemed to have waived all objections except upon a showing of good cause for failure to make the objection within the time required by statute or of changed circumstances."
[10]  An admitted surety insurer is defined in Code of Civil Procedure section 995.120 as "(a) ... a corporate insurer or a reciprocal or interinsurance exchange to which the Insurance Commissioner has issued a certificate of authority to transact surety insurance in this state, as defined in Section 105 of the Insurance Code, [¶] (b) For the purpose of application of this chapter to a bond given pursuant to any statute of this state, the phrases `admitted surety insurer,' `authorized surety company,' 'bonding company,' `corporate surety,' and comparable phrases used in the statute mean `admitted surety insurer' as defined in this section."
[11]  The documents required to be submitted under Code of Civil Procedure section 995.660, subdivision (a) are: "(1) The original, or a certified copy, of the unrevoked appointment, power of attorney, bylaws, or other instrument entitling or authorizing the person who executed the bond to do so, within 10 calendar days of the insurer's receipt of a request to submit the instrument.

"(2) A certified copy of the certificate of authority of the insurer issued by the Insurance Commissioner, within 10 calendar days of the insurer's receipt of a request to submit the copy.
"(3) A certificate from the clerk of the county in which the court or officer is located that the certificate of authority of the insurer has not been surrendered, revoked, canceled, annulled, or suspended or, in the event that it has, that renewed authority has been granted, within 10 calendar days of the insurer's receipt of the certificate.
"(4) Copies of the insurer's most recent annual statement and quarterly statement filed with the Department of Insurance pursuant to Article 10 (commencing with Section 900) of Chapter 1 of Part 2 of Division 1 of the Insurance Code, within 10 calendar days of the insurer's receipt of a request to submit the statements."
Code of Civil Procedure section 995.660, subdivision (b) provides that "[i]f the admitted surety insurer complies with subdivision (a), and if it appears that the bond was duly executed, that the insurer is authorized to transact surety insurance in the state, and that its assets exceed its liabilities in an amount equal to or in excess of the amount of the bond, the insurer is sufficient and shall be accepted or approved as surety on the bond, subject to Section 12090 of the Insurance Code."
[12]  We grant the Insurance Commissioner's request that we take judicial notice of its official website.
[13]  (See Historical and Statutory Notes, 11A West's Ann. Civil Code (1993 ed.) foil. § 3247, p. 502.)
[14]  See footnote 10 for the definition of an "admitted surety insurer."
[15]  For the text of Government Code section 815, subdivision (b), see footnote 4, supra.
[16]  Government Code section 818.2 provides: "A public entity is not liable for an injury caused by adopting or failing to adopt an enactment or by failing to enforce any law."
[17]  Government Code section 818.4 provides: "A public entity is not liable for an injury caused by the issuance, denial, suspension or revocation of, or by the failure or refusal to issue, deny, suspend or revoke, any permit, license, certificate, approval, order, or similar authorization where the public entity or an employee of the public entity is authorized by enactment to determine whether or not such authorization should be issued, denied, suspended or revoked."
