Blog

WEAPONs

California Penal Code § 171b – Weapons in Public Buildings

California Penal Code § 171b makes it a crime to bring or possess certain weapons in state or local public buildings or at public meetings. This law is designed to protect public safety in spaces such as courthouses, city halls, libraries, and other government-owned buildings where employees perform official duties.

Weapons Prohibited Under § 171b

The law prohibits six broad categories of weapons in public buildings:

  1. Firearms – any type of gun is generally prohibited unless specifically exempted.

  2. Deadly weapons – as defined under California law, including knives and other items designed to inflict serious injury.

  3. Knives over 4 inches – especially fixed-blade knives or blades that can be locked into place.

  4. Tear gas devices – unauthorized or illegal tear-gas weapons.

  5. Tasers and stun guns – devices designed to incapacitate a person through electric shock.

  6. Projectile-expelling devices – including BB guns, pellet guns, and similar instruments.

By listing these categories, the law aims to prevent potential violence or threats in government facilities.

Defining a “Deadly Weapon”

California law defines “deadly weapon” in several ways. Certain knives, switchblades, and other items designed to cause serious bodily injury fall under this category. Additionally, objects listed as prohibited under California’s weapon statutes, such as metal knuckles or cane guns, are also considered deadly weapons.

What Counts as a “Public Building”?

For § 171b, a public building is any state or local government-owned or leased building where public employees regularly work. This includes courthouses, city halls, libraries, and other civic spaces. Residential areas occupied by public employees are typically excluded.

Penalties for Violating § 171b

Violating this law carries serious consequences. The offense is a “wobbler,” meaning it can be charged as either a misdemeanor or a felony:

  • Misdemeanor: Up to one year in county jail.

  • Felony: Up to three years in state prison.

The specific charge depends on circumstances such as the type of weapon, intent, and the person’s prior criminal history.

Exemptions

Certain individuals and situations are exempt from § 171b:

  1. Peace officers acting in their official capacity.

  2. Transporting weapons as evidence in legal proceedings.

  3. Licensed firearm holders (in some circumstances, such as with a valid concealed carry permit).

  4. Security personnel tasked with protecting the building.

  5. Authorized public exhibitions, such as a legally sanctioned gun show.

These exemptions balance public safety with legitimate and lawful use of weapons.

Enforcement of § 171b

Law enforcement and prosecutors enforce § 171b by proving three main elements:

  1. The individual possessed or brought a prohibited weapon.

  2. The item qualifies as a prohibited weapon under the statute.

  3. The person was in a public building or at a public meeting where the law applies.

Legal Defenses

Possible defenses against a § 171b charge include:

  • Exemption defense – proving that one of the statutory exemptions applies.

  • Not an illegal weapon – demonstrating the item carried does not meet the definition of a prohibited weapon.

  • Unintentional possession – showing the weapon was not knowingly carried into the building.

  • Procedural or constitutional issues – such as an unlawful search or seizure.

A knowledgeable criminal defense attorney can analyze the specific circumstances and help determine the best defense strategy.

Why § 171b Matters

  • Safety: Reduces risk of violence in public spaces.

  • Clarity: Provides clear rules on prohibited weapons for the public and law enforcement.

  • Balance: Allows lawful exemptions while ensuring public safety.

  • Deterrence: Harsh penalties serve as a strong deterrent against carrying weapons into public buildings.

Scenarios

  • A person carrying a large fixed-blade knife into city hall may violate § 171b.

  • A licensed concealed firearm holder may be exempt but should confirm building-specific rules.

  • Carrying a BB gun or stun gun into a courthouse without exemption constitutes a violation.

  • Security personnel or law enforcement acting within their duties may lawfully carry weapons into these spaces.

Key Considerations

  • Unintentional violations can occur because many items, including certain knives and projectile devices, are prohibited.

  • Building policies may impose stricter rules than the statute, including metal detectors or no-weapons signs.

  • Local variations can affect enforcement. Always verify building-specific rules.

  • Criminal consequences can include jail or prison, so caution is essential.

Practical Advice

  1. Know your status – confirm whether you are exempt, licensed, or acting in an official capacity.

  2. Check building policies – even lawful under § 171b, some buildings may have stricter rules.

  3. Secure weapons properly – especially when transporting for evidence or lawfully authorized purposes.

  4. Consult a criminal defense attorney if charged or at risk. Legal guidance is critical.

  5. Stay informed – laws evolve, and staying current is essential for compliance.

Frequently Asked Questions

Q: Can I carry a concealed handgun into a public library with a CCW permit?
A: Possibly, but exemptions depend on additional statutes and building-specific regulations.

Q: Are BB guns included?
A: Yes, projectile-expelling devices like BB or pellet guns are prohibited under § 171b.

Q: What about small foldable knives?
A: Only knives over four inches are specifically prohibited under § 171b, though other deadly weapon statutes may apply.

Q: Can a stun gun be carried for self-defense?
A: No, stun guns are prohibited unless a statutory exemption applies.

Conclusion

California Penal Code § 171b is designed to protect public buildings and meetings from weapons that could pose a threat to safety. It covers firearms, knives, stun guns, and various projectile devices while allowing exemptions for licensed carriers, law enforcement, and authorized activities.

Violating § 171b carries significant criminal penalties, making it essential for anyone entering a public building with a weapon to understand the law and follow legal protocols.

If you are facing legal questions or need assistance regarding weapons in public buildings, contact Southwest Legal today for professional guidance. Our experienced criminal defense attorneys can help you navigate California laws, protect your rights, and ensure the best possible outcome. Don’t wait—reach out now to safeguard your legal future.

Scroll to Top