Skip to main content

Pen. Code, § 171.7 · Chapter 7. Other Offenses Against Public Justice

Pen. Code, § 171.7

Verbatim from the official edition

Text — As published in the Legislative Counsel's database, tables dated October 18, 2026 (pubinfo_2025.zip)

(a) For purposes of this section:

(1) “Public transit facility” means any land, building, or equipment, or an interest therein, including a station on a public transportation route, to which access is controlled in a manner consistent with the public transit authority’s security plan, whether or not the operation thereof produces revenue, that has as its primary purpose the operation of a public transit system or the providing of services to the passengers of a public transit system. A public transit system includes the vehicles used in the system, including, but not limited to, motor vehicles, streetcars, trackless trolleys, buses, light rail systems, rapid transit systems, subways, trains, or jitneys, that transport members of the public for hire.

(2) “Firearm” has the same meaning as specified in subdivisions (a) and (b) of Section 16520.

(b) It is unlawful for a person to knowingly possess any of the following in a public transit facility:

(1) A firearm.

(2) An imitation firearm as defined in subdivision (a) of Section 16700.

(3) An instrument that expels a metallic projectile, such as a BB or pellet, through the force of air pressure, CO2 pressure, or spring action, or a spot marker gun or paint gun.

(4) A metal military practice hand grenade.

(5) A metal replica hand grenade.

(6) A plastic replica hand grenade.

(7) An unauthorized tear gas weapon.

(8) An undetectable knife, as described in Section 17290.

(9) An undetectable firearm, as described in Section 17280.

(c) (1) Subdivision (b) does not apply to, or affect, any of the following:

(A) A duly appointed peace officer as defined in Chapter 4.5 (commencing with Section 830) of Title 3 of Part 2.

(B) A retired peace officer with authorization to carry concealed weapons as described in Article 2 (commencing with Section 25450) of Chapter 2 of Division 5 of Title 4 of Part 6.

(C) A full-time paid peace officer of another state or the federal government who is carrying out official duties while in California.

(D) A qualified law enforcement officer of another state or the federal government, as permitted under the Law Enforcement Officers Safety Act pursuant to Section 926B or 926C of Title 18 of the United States Code.

(E) A person summoned by an officer listed in subparagraphs (A) to (C), inclusive, to assist in making arrests or preserving the peace while they are actually engaged in assisting the officer.

(F) A person who is responsible for the security of the public transit system and who has been authorized by the public transit authority’s security coordinator, in writing, to possess a weapon specified in subdivision (b).

(G) A person possessing an unloaded firearm while traveling on a public transit system that offers checked baggage services, so long as the firearm is stored in accordance with the public transit system’s checked baggage policies.

(2) Paragraph (7) of subdivision (b) does not apply to or affect the possession of a tear gas weapon when possession is permitted pursuant to Division 11 (commencing with Section 22810) of Title 3 of Part 6.

(3) Paragraph (1) of subdivision (b) does not apply to a person transporting an unloaded firearm locked in a lock box in compliance with paragraph (8) of subdivision (a) of Section 26230.

(d) A violation of this section is punishable by imprisonment in a county jail for a period not exceeding six months, or by a fine not exceeding one thousand dollars ($1,000), or by both that fine and imprisonment.

(e) The provisions of this section are cumulative and do not restrict the application of any other law. However, an act or omission that is punishable in different ways by this and any other provision of law shall not be punished under more than one provision.

(f) This section does not prevent prosecution under any other provision of law that may provide a greater punishment.

(g) This section shall be interpreted so as to be consistent with Section 926A of Title 18 of the United States Code.

Notes and commentary — not statutory text

History

Amended by Stats. 2025, Ch. 570, Sec. 1. (AB 1078) Effective January 1, 2026.

Formatting

sub: 2

Source of truth

Edition
As published in the Legislative Counsel's database, tables dated October 18, 2026 (pubinfo_2025.zip)
Official file
https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=PEN&sectionNum=171.7.
Text hash
sha256 083945d6fee6acc3ab001b0d12932e9aeb00307cec7e025dbbf18d3f27392498
Composed by
compose_ca.py 2026-10-22: the Legislative Counsel's CAML content files read by a tokenizer (caml_readers.reader_a); an independent xml.etree reading (caml_readers.reader_b) agrees on every section

This section cites

Provisions in this library that the text above cites, as it prints each citation. A range cited as “ss. 61.13-61.16” links its first and last provisions.

Cited by 3 provisions

Provisions in this library whose text cites Pen. Code, § 171.7. Each shows the citation as that text prints it.

Procedural information only. Not legal advice and not a substitute for the advice of an attorney. Confirm the current text with the official publisher before relying on it.