> For AI agents: read the machine-readable documentation index at [https://corpuslaw.us/llms.txt](https://corpuslaw.us/llms.txt) or the single-file full reference at [https://corpuslaw.us/llms-full.txt](https://corpuslaw.us/llms-full.txt).

# Cal. Code of Civil Procedure - CCP § 1021.7. — Section 1021.7.

- **Citation**: Cal. Code of Civil Procedure - CCP § 1021.7.
- **Node Type**: section
- **Jurisdiction**: California (state)
- **Code Body**: Code of Civil Procedure - CCP (CCP)
- **Official Source**: [https://downloads.leginfo.legislature.ca.gov/pubinfo_2025.zip](https://downloads.leginfo.legislature.ca.gov/pubinfo_2025.zip)
- **Canonical URL**: [https://corpuslaw.us/codes/california/code-of-civil-procedure/part-2/title-14/chapter-6/section-1021-7](https://corpuslaw.us/codes/california/code-of-civil-procedure/part-2/title-14/chapter-6/section-1021-7)
- **Semantic URL**: [https://corpuslaw.us/codes/california/code-of-civil-procedure/part-2/title-14/chapter-6/section-1021-7](https://corpuslaw.us/codes/california/code-of-civil-procedure/part-2/title-14/chapter-6/section-1021-7)

## Hierarchy

Title CCP — Code of Civil Procedure - CCP > Part 2. — PART 2. OF CIVIL ACTIONS [307. - 1062.34.] > Title 14. — TITLE 14. OF MISCELLANEOUS PROVISIONS [989. - 1062.34.] > Chapter 6. — CHAPTER 6. Of Costs [1021. - 1038.]

## Text

In any action for damages arising out of the performance of a peace officer’s duties, brought against a peace officer, as defined in Chapter 4.5 (commencing with Section 830) of Title 3 of Part 2 of the Penal Code, or against a public entity employing a peace officer or in an action for libel or slander brought pursuant to Section 45 or 46 of the Civil Code, the court may, in its discretion, award reasonable attorney’s fees to the defendant or defendants as part of the costs, upon a finding by the court that the action was not filed or maintained in good faith and with reasonable cause.
