
11 Cal.App.4th 916 (1992)
14 Cal. Rptr.2d 323
CITY OF SOUTH SAN FRANCISCO et al., Plaintiffs and Appellants,
v.
CYPRESS LAWN CEMETERY ASSOCIATION, Defendant and Respondent.
Docket No. A055829.
Court of Appeals of California, First District, Division Four.
December 14, 1992.
*918 COUNSEL
Michael J. O'Toole, City Attorney, and Richard James Chiozza, Assistant City Attorney, for Plaintiffs and Appellants.
Brobeck, Phleger & Harrison, James H. Quirk and Karen H. Peteros for Defendant and Respondent.
OPINION
POCHE, Acting P.J.
The Bond and Undertaking Law (Code Civ. Proc., § 995.010 et seq.)[1] provides that a governmental entity cannot be required to provide an undertaking in order to obtain a temporary restraining order *919 (TRO). (1a) We hold that the public policy supporting this exemption is sufficiently strong to override a trial court's inherent power to require an undertaking as a condition of issuing that form of interim injunctive relief. In light of this holding, we conclude that no recovery can be had from the undertaking which the trial court had no authority to require.

BACKGROUND
At the start of September of 1990 Cypress Lawn Cemetery Association was about to commence construction of a mausoleum on property situated in the Town of Colma but adjoining the City of South San Francisco (SSF). Alleging that construction and operation of the mausoleum could entail adverse environmental consequences, SSF filed a complaint for various forms of injunctive relief against Colma and Cypress Lawn.
SSF's concurrent application for immediate relief in the form of a TRO was the subject of a contested hearing at which counsel for Cypress Lawn argued that "if Your Honor were to consider issuing a TRO, ... we would request that there be a bond posted.... I don't know what kind of damages might be incurred by a delay, but they could be substantial." In response to an inquiry from the court on the issue of a possible bond, "assuming the restraining order is granted," counsel for SSF stated: "We would hope that we would get it without a bond if it were granted, but we would be willing to provide a bond if that were a requirement of the court."
After the court announced that it would order issuance of the TRO, counsel for Cypress Lawn again requested "that you consider requiring the City to post a bond" in the amount of $70,000 (i.e., approximately 10 percent of the estimated construction costs). The court stated that "I find the suggestion that the City post a bond acceptable and would make such an order and I would find acceptable that suggestion that [the] bond be ten percent." The court then signed an "Order To Show Cause And Temporary Restraining Order" which (1) recited that SSF had filed "a written undertaking ... conforming to the applicable provisions of the California Code of Civil Procedure" (2) set a hearing date for defendants to show cause why a preliminary injunction should not issue as prayed, and (3) restrained Cypress Lawn pending that hearing from performing any further work on the project. An undertaking for $70,000 was then posted on behalf of SSF by United States Fidelity and Guaranty Company (USFG).
This was the high-water mark of the litigation from SSF's standpoint. Ten days later it voluntarily dismissed the Town of Colma as a party. Two weeks later the trial court dissolved the TRO and denied SSF's application for a *920 preliminary injunction. Three days later the litigation concluded when SSF voluntarily dismissed its complaint against Cypress Lawn.
More than nine months later Cypress Lawn noticed a "Motion To Enforce Liability Under Bond" in the amount of approximately $56,000 for construction delay damages and attorney fees allegedly incurred as a result of the litigation and the TRO. SSF responded with an "Application For Order Releasing Surety" on behalf of itself and USFG, asking "to be released from liability on the bond filed in this action ... on the ground that the judge who ordered the filing of the bond acted without authority since no bond could be required of a city by virtue of ... Sections 529(b)(4) and 995.220."
After conducting a hearing on the competing motions, the court denied that of SSF and USFG, and granted that of Cypress Lawn. The court then signed and entered a "Judgment Of Liability On Bond" in the amount requested by Cypress Lawn. A timely notice of appeal was filed jointly by SSF and USFG.

REVIEW
A preliminary injunction ordinarily cannot take effect unless and until the party applying for it provides "an undertaking ... to the effect that the applicant will pay to the party enjoined such damages ... as the party may sustain by reason of the injunction, if the court finally decides that the applicant was not entitled to the injunction." (§ 529, subd. (a).) (2) Notwithstanding that it is "a restraint of the same nature as an injunction" (San Diego W. Co. v. Steamship Co. (1894) 101 Cal. 216, 218 [35 P. 651]), a TRO stands on a different statutory footing and can be valid in the absence of a posted security. (See Biasca v. Superior Court (1924) 194 Cal. 366, 367-368 [228 P. 861]; San Diego W. Co. v. Steamship Co., supra, at pp. 218-219.) The Supreme Court has, however, repeatedly stated that "the better practice would be to require an undertaking upon the granting of such an interim restraining order." (Biasca v. Superior Court, supra, at p. 368; accord, Neumann v. Moretti (1905) 146 Cal. 31, 33 [79 P. 512].)
The same statute expressing the general requirement of an undertaking for a preliminary injunction, also enumerates categories of exempted parties, among which is "[a] public entity... described in Section 995.220." (§ 529, subd. (b)(4).) Section 995.220 is part of the Bond and Undertaking Law, the provisions of which "apply to a bond or undertaking ... given as security pursuant to any statute of this state, except to the extent the statute prescribes a different rule or is inconsistent." (§ 995.020, subd. (a).) Section *921 995.220 provides in pertinent part: "Notwithstanding any other statute, if a statute provides for a bond[[2]] in an action or proceeding, including but not limited to a bond for issuance of a restraining order or injunction, appointment of a receiver, or stay of enforcement of a judgment on appeal, the following public entities [including a city] are not required to give the bond and shall have the same rights, remedies, and benefits as if the bond were given."
The general statutes governing issuance of injunctions and TRO's (§§ 525-534) share common ground with the Bond and Undertaking Law on the subject of posted securities. As there is no facial conflict or overt inconsistency between these two groups of statutes, the provisions of the Bond and Undertaking Law control. (§ 995.020.)
(1b) When section 995.020 speaks to "a bond or undertaking ... given as security pursuant to any statute of this state" (italics added), the italicized language is to be construed as extending the ambit of the Bond and Undertaking Law to any undertaking "given as security in conformity with any statute of this state."[3] (See Samarkand of Santa Barbara, Inc. v. County of Santa Barbara (1963) 216 Cal. App.2d 341, 360 [31 Cal. Rptr. 151].) And when section 995.220 speaks to situations where "a statute provides for a bond," it is not to be construed as restricted to instances where a statute expressly requires an undertaking. (See Mosk v. Superior Court (1979) 25 Cal.3d 474, 493 [159 Cal. Rptr. 494, 601 P.2d 1030]; Levine v. City of Los Angeles (1977) 68 Cal. App.3d 481, 487 [137 Cal. Rptr. 512]; McPhail v. Nunes (1918) 38 Cal. App. 557, 561 [177 P. 193].) Moreover, section 995.220 "continues the substance of former Section 1058" (Cal. Law Revision Com. com., West's Ann. Code Civ. Proc., § 995.220 (1992 pocket supp.) p. 39), which flatly prohibited requiring governmental entities to furnish security.[4]
For present purposes, the net import of sections 995.020 and 995.220 are twofold. First, governmental entities are granted an exemption from the undertaking requirement ordinarily imposed upon private parties. Second, *922 the Bond and Undertaking Law does not limit this exemption to situations where an undertaking is required by a statute.
As previously mentioned, the purpose of requiring security is to afford compensation to the party wrongly enjoined or restrained. (See § 529, subd. (a); Associates Capital Services Corp. v. Security Pac. Nat. Bank (1979) 91 Cal. App.3d 819, 824 [154 Cal. Rptr. 392].) In purely private litigation, damages may be recovered by way of either a simple motion or an independent common law action for malicious prosecution or abuse of process. (See § 996.420; Wallace v. Miller (1983) 140 Cal. App.3d 636, 642-645 [189 Cal. Rptr. 637].) These remedies are not available against governmental entities, however, because they and their employees enjoy statutory immunity. (See Gov. Code, §§ 815.2, 821.6; Kemmerer v. County of Fresno (1988) 200 Cal. App.3d 1426, 1435-1436 [246 Cal. Rptr. 609].) Section 995.220 supplements this immunity, which clearly reflects the deliberate conclusion of the Legislature that the public good is best served by excusing governmental entities from the security requirements otherwise imposed on litigants. One of the benefits fostered by this policy is the reduction of public funds expended in furnishing undertakings,[5] defending against efforts to recover, and responding in damages like private parties. Another advantage promoted is that those responsible for vigorous law enforcement and public administration are not inhibited by fears of personal and institutional liability.
The real issue presented here is the strength of this public policy.
Cypress Lawn defends the judgment by arguing that it allows recovery against an undertaking required by the trial court in the exercise of its inherent equitable powers; therefore, in that the undertaking posted had no reference to any statutory requirement, it stands outside the reach of the Bond and Undertaking Law. In short, Cypress Lawn is contending that the trial court was simply adopting an unorthodox means of implementing the Supreme Court's suggestion that "the better practice would be to require an undertaking" when issuing a TRO (Biasca v. Superior Court, supra, 194 Cal. 366 at p. 368).
It has already been demonstrated that the scope of the Bond and Undertaking Law is greater than its literal language, reaching securities furnished in conformity with its provisions.
(3) A trial court possesses inherent power to issue a TRO (County of Inyo v. City of Los Angeles (1976) 61 Cal. App.3d 91, 101 [132 Cal. Rptr. *923 167]; Davies v. Ramsdell (1919) 40 Cal. App. 432 [183 P. 702]) and to condition its issuance in favor of a private party upon the posting of security. (See Allen v. Pitchess (1973) 36 Cal. App.3d 321, 329-330 [111 Cal. Rptr. 658].) Even so, the Legislature always retains authority to regulate the operation of that power. (Walker v. Superior Court (1991) 53 Cal.3d 257, 267 [279 Cal. Rptr. 576, 807 P.2d 418].) (1c) This is what the Legislature did when it enacted the variety of statutes differentiating between the conditions and consequences attending issuance of preliminary injunctions and TRO's on the basis of the status of the party applying for these forms of relief. In these circumstances, inherent equitable powers must yield to the public policy expressed in statutory law. (See Johnson v. Tago, Inc. (1986) 188 Cal. App.3d 507, 518 [233 Cal. Rptr. 503].)
The concept of "public policy" is inherently imprecise. (Safeway Stores v. Retail Clerks etc. Assn. (1953) 41 Cal.2d 567, 575 [261 P.2d 721].) Accepting that it "is legislative policy in the main" (S. & V.R.R. Co. v. City of Stockton (1871) 41 Cal. 147, 168), courts have traditionally deferred to the Legislature in determining just what constitutes the public policy of this state. (See e.g., Gantt v. Sentry Insurance (1992) 1 Cal.4th 1083, 1094-1095 [4 Cal. Rptr.2d 874, 824 P.2d 680]; McCarthy v. City of Oakland (1943) 60 Cal. App.2d 546, 549 [141 P.2d 4]; Thome v. Macken (1943) 58 Cal. App.2d 76, 81 [136 P.2d 116].) We follow this practice here. In doing so we reject the arguments by Cypress Garden that SSF's actions support an equitable estoppel, amount to a waiver of its right to challenge recovery of damages from the undertaking furnished by USFG, or demonstrate invited error.
(4) It is true that "equitable estoppel may be applied against the government where justice and right require it" (Driscoll v. City of Los Angeles (1967) 67 Cal.2d 297, 306 [61 Cal. Rptr. 661, 431 P.2d 245]), but neither this doctrine "nor any other equitable principle may be invoked against a governmental body where it would operate to defeat the effective operation of a policy adopted to protect the public." (County of San Diego v. Cal. Water etc. Co. (1947) 30 Cal.2d 817, 826 [186 P.2d 124, 175 A.L.R. 747].) In those instances where injustice and public policy collide head-on, the rule is that estoppel may be found in situations where "the injustice which would result from a failure to uphold an estoppel is of sufficient dimension to justify any effect upon public interest or policy which would result from the raising of an estoppel." (City of Long Beach v. Mansell (1970) 3 Cal.3d 462, 496-497 [186 P.2d 124, 175 A.L.R. 747].)
(1d) The situation of Cypress Lawn is exceptional for its novelty, but not for its exemplary injustice. The public policy of California clearly *924 tolerates governmental entities escaping liability in the identical situation where parties erroneously enjoined at the behest of other private parties can obtain compensation. But at the hands of officialdom private parties can suffer injury or detriment which cannot constitute legally compensable damages. (See Wallace v. Miller, supra, 140 Cal. App.3d 636 at p. 643; cf. Civ. Code, §§ 3281-3282.) The position of Cypress Lawn does not warrant different treatment. Section 529 would leave Cypress Lawn without remedy had its project been halted by a preliminary injunction. It would be a logical anomaly to give Cypress Lawn that remedy for having endured the briefer interruption of a TRO.
Although it was certainly unfortunate that SSF did not raise the matter of its exemption until after the undertaking had been posted, this circumstance is not consequential.[6] Section 995.220 gave SSF the privilege against being required to post an undertaking. Enacted for the public good, its benefits cannot lightly be deemed surrendered by an official's errors or omissions. (5) Then too, by incurring the cost of an undertaking it could not be required to provide, a governmental entity would be committing waste  i.e., "`improvident and completely unnecessary public spending'" (Sundance v. Municipal Court (1986) 42 Cal.3d 1101, 1139 [232 Cal. Rptr. 814, 729 P.2d 80])  which it is forbidden to do. (See § 526a.) (1e) Measured against these public policy considerations, the fact of its belated discovery does not estop SSF from invoking the benefit of the exemption given it by the Legislature. (See e.g., Magruder v. City of Redwood (1928) 203 Cal. 665, 673-675 [265 P. 806]; Western Surgical Supply Co. v. Affleck (1952) 110 Cal. App.2d 388, 392-393 [242 P.2d 929].) (6) The same considerations defeat the claims of invited error  which is essentially appellate estoppel (see 9 Witkin, Cal. Procedure (3d ed. 1985) Appeal, § 301, p. 313)  and waiver.[7] (See e.g., Civ. Code, § 3513; Strong v. County of Santa Cruz (1975) 15 Cal.3d 720, 727 [125 Cal. Rptr. 896, 543 P.2d 264]; Magruder v. City of Redwood, supra, at p. 675.)
(1f) Finally, Cypress Lawn appears to argue that even if the undertaking cannot be deemed provided pursuant to statute, it is nevertheless good as a *925 common law undertaking, and Cypress Lawn is its third party beneficiary. The undertaking was given to secure a statutory privilege. This was contrary to the public policy that SSF should enjoy that privilege without the burden of an undertaking. The undertaking was therefore void, and could not be valid as a common law undertaking. (See e.g., Powers v. Chabot (1892) 93 Cal. 266, 269 [28 P. 1070]; Morgan v. Menzies (1882) 60 Cal. 341, 348; Mark Briggs & Associates, Inc. v. Kinestar, Inc. (1983) 143 Cal. App.3d 483, 487 [192 Cal. Rptr. 21].) (7) In that SSF, as the principal on the obligation, cannot be liable, neither can USFG as SSF's surety. (See Civ. Code, §§ 2809-2810; U.S. Leasing Corp. v. DuPont (1968) 69 Cal.2d 275, 290 [70 Cal. Rptr. 393, 444 P.2d 65].)
The judgment is reversed, and the cause is remanded to the trial court with directions to make appropriate orders (1) granting the "Application for Order Releasing Surety" filed by SSF and USFG, and (2) denying the "Motion To Enforce Liability Under Bond" filed by Cypress Lawn. The parties shall bear their respective costs of appeal.
Perley, J., and Reardon, J., concurred.
NOTES
[1]  Statutory references are to this code unless otherwise indicated.
[2]  The Bond and Undertaking Law treats the two forms of security as pretty much synonymous. (See §§ 995.140, 995.210; Cal. Law Revision Com. coms., West's Ann. Code Civ. Proc., §§ 995.190, 995.210 (1992 pocket supp.) pp. 38-39.)
[3]  The TRO expressly recites that SSF had filed "a written undertaking ... conforming to the applicable provisions of the California Code of Civil Procedure."
[4]  At the time it was repealed in the same year the Bond and Undertaking Law was enacted (Stats. 1982, ch. 517, § 175, p. 2361), former section 1058 provided in pertinent part: "In any civil action or proceeding wherein ... any ... city ... is a party plaintiff or defendant, no bond, written undertaking, or security can be required of the ... city...."
[5]  Here, the premium charged SSF for the undertaking was $1,400 per year.
[6]  Nevertheless, we are not insensitive to the expenses incurred by Cypress Lawn which SSF could have obviated had it raised the exemption issue at an earlier stage of the proceedings. Not wishing to aggravate this situation further, we have determined that the interests of justice shall be best served by not awarding SSF its costs on this appeal. (Cal. Rules of Court, rule 26(a).)
[7]  In support of these claims Cypress Lawn relies upon statements made at the time the TRO application, which, Cypress Lawn submits, establish that SSF was in effect inducing the alleged error of which it now complains by volunteering to post an undertaking. A more reasonable reading of the record is that SSF merely acceded to the trial court's requirement of an undertaking, a requirement which clearly came at the instigation of Cypress Lawn.
