The Law Offices of Ty Martinez Criminal Defense

Penal Code 166 PC: Contempt of Court in California

Lawyer for PC 166 contempt and protective order charges in Riverside, San Bernardino, Los Angeles, Orange and Ventura counties.

We have 40+ years of combined experience providing criminal defense in Southern California. Tilting the Scales of Justice in your favor.

See how we defend restraining order cases.

Reviewed by Ty Martinez, criminal defense attorney, on November 13, 2026.

Penal Code 166 makes contempt of court a misdemeanor, including willfully disobeying a court order. It is most often charged under 166(c)(1) for willfully and knowingly violating a criminal protective order or stay-away order, such as one issued in a domestic violence case, with up to 364 days in county jail and a fine of up to $1,000. A repeat violation within seven years involving violence or a credible threat can be charged as a felony.

At a glance
Code sectionCalifornia Penal Code 166
Most common chargeViolating a criminal protective or stay-away order (PC 166(c)(1))
PenaltyMisdemeanor: up to 364 days in county jail and up to $1,000
Violation causing physical injuryAt least 48 hours in county jail
Repeat within 7 years with violence or a credible threatUp to 364 days in county jail, or 16 months, 2 or 3 years in state prison
Other contemptMisdemeanor (PC 166(a))
GunsHaving a gun a protective order prohibits is a separate crime (PC 166(d), 29825)
Law changeFrom January 1, 2027, some violations can be charged as a felony (AB 1877)
Jury instructionCALCRIM 2700, 2701

Charged under PC 166 in Riverside or San Bernardino County?
Calls are answered 24/7, and the consultation is free.

Call Now: (888) 348-7288

What PC 166 means

PC 166(a) lists several kinds of contempt of court, all misdemeanors, including disorderly or insolent behavior in court, disturbances that interrupt court proceedings, willful disobedience of a court order or process, resisting a court's lawful order, refusing to be sworn or to answer as a witness, publishing a false report of court proceedings, and willfully disobeying a gang injunction (PC 166(a)).

Subdivision (c)(1) covers the orders most people are charged under: criminal protective orders issued during a criminal case (PC 136.2), orders issued as a condition of domestic violence probation (PC 1203.097), orders issued after a domestic violence conviction (PC 273.5(j)), orders after a conviction for elder or dependent adult abuse, and certain family court orders (PC 166(c)(1), (c)(3)).

The violation must be willful and knowing. Contact the order forbids, such as a call, a text, a social media message or coming within a set distance, can be a violation even if the protected person started it or agreed to it.

For violating a protective or stay-away order, the prosecutor must prove each of these beyond a reasonable doubt (CALCRIM 2701):

  1. A court lawfully issued a written order that you not do something, such as contact or go near the protected person
  2. You knew about the order
  3. You had the ability to follow the order
  4. You willfully violated the order

PC 166 penalties

  • Violating a protective or stay-away order: up to 364 days in county jail, a fine of up to $1,000, or both (PC 166(c)(1), 18.5)
  • A violation that causes physical injury: at least 48 hours in county jail, even if the sentence is suspended (PC 166(c)(2))
  • A second or later conviction within seven years of a prior protective order conviction, involving an act of violence or a credible threat of violence: up to 364 days in county jail, or 16 months, two or three years in state prison (PC 166(c)(4))
  • Other contempt under PC 166(a): a misdemeanor with up to six months in county jail, a fine of up to $1,000, or both (PC 19)

The 2027 change

A new law, AB 1877, takes effect January 1, 2027. It allows a violation of a criminal protective order to be charged as a felony when the case the order was issued in was charged as a felony. Violations before that date are charged under the current law.

PC 166 or PC 273.6?

Both cover violating a court order. PC 166(c)(1) is usually used for criminal protective orders issued in a criminal case, while PC 273.6 is usually used for restraining orders issued by a family or civil court. The penalties are similar.

Guns and protective orders

A person who owns, possesses, buys or receives a gun knowing that a protective order prohibits it is punished under PC 29825 (PC 166(d)).

Common defenses to PC 166

It depends on the evidence. Common defenses include:

  • You did not know about the order, or did not know its terms
  • The order was not lawfully issued, or had expired
  • The contact was allowed by the order, for example a peaceful custody exchange
  • The contact was accidental, not willful, for example you ran into the person in a public place and left
  • The accusation is false or exaggerated

We get the order itself, the proof of service or court minutes, and the messages or call logs, because the exact wording of the order often decides the case.

Related charges

PC 166 cases in Riverside and San Bernardino counties

Protective order violations are prosecuted by the District Attorney's Office in each county. In San Bernardino County, cases from Rancho Cucamonga, Ontario, Upland, Chino, Chino Hills, Montclair, Fontana and Rialto are heard at the West Valley courthouse in Rancho Cucamonga; cases from San Bernardino, Colton, Highland, Redlands, Loma Linda and Yucaipa at the San Bernardino Justice Center; and cases from Victorville, Hesperia and Apple Valley at the Victorville courthouse. In Riverside County, criminal cases are heard at five courthouses: the Riverside Hall of Justice, the Southwest Justice Center in Murrieta, the Banning Justice Center, the Larson Justice Center in Indio and the Blythe courthouse.

A protective order violation can affect the original case, bail and any family court matter, so it is worth acting early. Our office is in Riverside, and Yvonne Todd began her career as a Public Defender in San Bernardino.

Frequently asked questions

Is violating a protective order a felony in California?

Usually it is a misdemeanor. A second or later violation within seven years involving violence or a credible threat can be a felony (PC 166(c)(4)), and from January 1, 2027, some violations can be charged as a felony under AB 1877.

What if the protected person contacted me first?

It can still be a violation. The order restricts you, not the protected person, so contact the order forbids can be charged even if the other person started it or agreed to it.

Can the protected person cancel the order?

No. Only the court can change or end a criminal protective order. The protected person can ask the court to modify it.

What is the difference between PC 166 and PC 273.6?

PC 166(c)(1) is usually charged for criminal protective orders from a criminal case; PC 273.6 for restraining orders from family or civil court. The penalties are similar.

Can I have a gun while a protective order is in effect?

Not if the order prohibits it. Owning, possessing, buying or receiving a gun knowing the order bans it is a separate crime (PC 166(d), 29825).

Read the official text of PC 166 on the California Legislative Information site.

This page is general information about California law, not legal advice about your case. Reading it does not create an attorney-client relationship.

Browse the California Criminal Code

Looking for a different charge? Type a code number or a few words, or jump to a code on the California Criminal Code page.

Facing PC 166 charges? Calls are answered 24/7, and the consultation is free.

Why clients hire us

  • 25+ years defending criminal cases. Ty Martinez started in criminal law as a deputy public defender.
  • 40+ years of combined experience between Ty Martinez and Yvonne Todd.
  • Calls are answered 24/7, and your first consultation is free.

Meet Your
Lawyers

Let us help you!

    * Required

    OK to leave a voicemail? *

    Read our Privacy Policy to see how we handle what you send.

    Attorney advertising. This website is published by The Law Offices of Ty Martinez, 7121 Magnolia Ave, Riverside, CA 92504. Ty Martinez, a California-licensed attorney, is responsible for its content.

    The information on this site is general information, not legal advice about your situation. Contacting us through this site or by phone does not create an attorney-client relationship, so please do not send confidential details until we have agreed to represent you.

    Reviews and testimonials describe individual clients' experiences. They are not a guarantee, warranty, or prediction regarding the outcome of your legal matter. Any result described on this site depended on the facts of that case, and results will differ if based on different facts.