A public entity that defeats an untenable lawsuit at the pleading stage may still incur substantial legal expenses securing that dismissal. Beginning January 1, 2027, California Senate Bill 577 expands the circumstances under which those expenses may be recovered. The legislation adds qualifying demurrers and motions for judgment on the pleadings to the dispositions that can support an award under Code of Civil Procedure § 1038, bringing the statute's defense-cost remedy into an earlier phase of litigation.

Governor Gavin Newsom signed SB 577 into law on September 30, 2026. Although much of the legislation concerns childhood sexual assault claims and public agency accountability, its amendment to §1038 has broader application. It reaches proceedings within that statute's existing scope, including civil proceedings under the Government Claims Act and actions for express or implied indemnity or contribution. The amendment is addressed in paragraph (9) of the Legislative Counsel's Digest and enacted in section 7 of the bill. (Stats. 2026, ch. 971, section 7.)

Recovery After a Pleading-Stage Dismissal

Before the amendment, section 1038 conditioned relief on specific dispositions such as summary judgment, a directed verdict, judgment under Code of Civil Procedure 631.8, or nonsuit. Although those routes remain available, SB 577 adds pleading-stage dispositions, allowing qualifying public entity defendants to seek defense costs without first obtaining summary judgment or reaching trial. The amended section 1038(a)(3) adds two new triggering events:

  • A demurrer sustained without leave to amend, and
  • A motion for judgment on the pleadings.

The distinction matters where a lawsuit fails because of a dispositive legal defect apparent from the pleadings or matters properly subject to judicial notice, such as government tort claim notices. A public entity that establishes such a defect through demurrer or motion for judgment on the pleadings will now have a statutory route to seek reasonable and necessary defense costs.

The demurrer provision has an express limit. The demurrer must be sustained without leave to amend as to every cause of action alleged against the moving defendant or cross-defendant. A ruling that permits amendment, or eliminates only some claims against that defendant but not all claims, does not satisfy that requirement. The amended statute also expressly includes a successful motion for judgment on the pleadings and provides for qualifying motions granted as to one or more plaintiffs Code Civ. Pro. §1038(a)(3), (d), as amended.

Counsel seeking recovery after a demurrer should ensure the ruling accurately identifies the claims that are completely resolved, the defendant to whom the ruling applies, and the denial of leave to amend. A favorable ruling must meet these statutory conditions before the court reaches the separate question of whether the proceeding lacked reasonable cause or good faith in order to trigger recovery of fees.

A Successful Motion Does Not Automatically Entitle the Defendant to Costs

Winning the dispositive motion does not, by itself, establish entitlement to defense costs. Section 1038 continues to require the court to examine whether the proceeding was brought "with reasonable cause and in the good faith belief that there was a justifiable controversy". A defendant seeking recovery must address those requirements separately from the grounds supporting dismissal.

A complaint may be legally insufficient even though the plaintiff had a reasonable basis to pursue it. Therefore, an unsuccessful legal theory, standing alone, does not establish that the action was frivolous. The attorney fee motion should therefore explain why the proceeding lacked reasonable cause or good faith, rather than simply rearguing the grounds on which the demurrer or motion for judgment on the pleadings succeeded.

As a practical matter, counsel should develop that record during the early evaluation of the case. Where an immunity or another dispositive defect applies, a focused written meet and confer explanation to opposing counsel may clarify whether a tenable basis exists to continue the action. Correspondence identifying the defect, the controlling authority, and that the defendant will seek recovery of its attorney's fees and costs is prudent. Such correspondence is not an independent statutory prerequisite, and it does not guarantee an award, but it may provide useful evidence for the court's separate section 1038 analysis.

Preserving the Request and Identifying the Plaintiffs

The timing of filing such a fee motion requires equal attention. The amendment retains subdivision (c), which makes section 1038 applicable only on a motion made before discharge of the jury or entry of judgment. Subdivision (a)(3) addresses when the court makes its determination and preserves a reference to a later time authorized by Judicial Council rule. Counsel should coordinate the defense-cost request with the dispositive proceedings and proposed judgment, rather than assume that the ordinary post judgment process for recovering costs preserves the request. The statute also requires notice in the moving papers and an opportunity to be heard.

SB 577 imposes an additional requirement in actions filed on behalf of multiple plaintiffs. The motion must identify the specific plaintiffs for whom determination is sought. This calls for a record supporting relief against the identified claimants. A defect affecting one plaintiff's proceeding should not be treated as establishing the basis for recovery against everyone joined in the action. subd. (a)(2)

The Potential Exposure of Counsel

The amended language expressly authorizes judgment against the opposing litigants or their attorneys. It further prohibits an attorney against whom defense costs are awarded from charging those amounts to the client as a litigation cost or expense. Requests directed at counsel should identify that requested relief clearly provide notice and an opportunity to respond. (Code Civ. Proc §1038, subd. (a) (4-5).)

It is also critical to note the amendment reverses settled California appellate law. Under the pre-amendment statute, courts uniformly held that section 1038 did not authorize awards against attorneys. In Settle v. State of California (2014) 228 Cal. App. 4th 215,  the Court of Appeal found that section 1038 does not authorize the imposition of defense costs against counsel. Suarez v. City of Corona (2014) 229 Cal. App. 4th 325 reached the same conclusion, reasoning that because section 1038 makes no express provision for an award of defense costs against counsel as sanctions or otherwise, and without statutory authorization, defense costs under section 1038 could not be imposed against a party's attorney.

Now, SB 577 directly overrides these holdings by adding express statutory authorization for awards against attorneys and pairing that authorization with the client-protection prohibition.

What Defense Costs May Be Recovered?

Recoverable defense costs extend beyond ordinary prevailing-party costs. Section 1038 includes reasonable attorney fees, expert witness fees, and consultants reasonably and necessarily incurred in defending the proceeding. Once the statutory grounds are established, the court must determine the recoverable amount and enter judgment for the reasonable and necessary defense costs in addition to normally recoverable costs. The provision does not make every expenditure reimbursable. Billing records and supporting declarations should explain the work performed, its connection to the defense, and the reasonableness of the amounts requested. (Code Civ. Proc., §1038, subds. (a)(4), (b).)

Practical Implications for Public Entity Defendants

For public entities and their counsel, the practical change begins with the initial case assessment. A potentially dispositive pleading challenge should now prompt consideration of whether section 1038 relief may also be warranted, what evidence would support it, and when the request must be presented. SB 577 gives qualifying defendants an earlier opportunity to recover the expense of defending an unjustifiable proceeding. Realizing that opportunity will depend on satisfying the statutory requirements and building a persuasive record on reasonable cause, good faith, and the costs actually incurred.

Logo Cookie Preference Center

Your Privacy

When you visit our website, we use cookies on your browser to collect information. The information collected might relate to you, your preferences, or your device, and is mostly used to make the site work as you expect it to and to provide a more personalized web experience. For more information about how we use Cookies, please see our Privacy Policy.

Strictly Necessary Cookies

Always Active

Necessary cookies enable core functionality such as security, network management, and accessibility. These cookies may only be disabled by changing your browser settings, but this may affect how the website functions.

Functional Cookies

Always Active

Some functions of the site require remembering user choices, for example your cookie preference, or keyword search highlighting. These do not store any personal information.

Form Submissions

Always Active

When submitting your data, for example on a contact form or event registration, a cookie might be used to monitor the state of your submission across pages.

Performance Cookies

Performance cookies help us improve our website by collecting and reporting information on its usage. We access and process information from these cookies at an aggregate level.

Powered by Firmseek