CA Penal Code § 171.7 (2021)
2021 California Code|Penal Code - PEN|PART 1 - OF CRIMES AND PUNISHMENTS|TITLE 7 - OF CRIMES AGAINST PUBLIC JUSTICE|CHAPTER 7 - Other Offenses Against Public Justice|Section 171.7.

171.7.  (a) For purposes of this section:(1) “Public transit facility” means any land, building, or equipment, or any interest therein, including any 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) “Sterile area” means any portion of a public transit facility that is generally controlled in a manner consistent with the public transit authority’s security plan.(3) “Firearm” has the same meaning as specified in subdivision (a) of Section 16520.(b) It is unlawful for any person to knowingly possess within any sterile area of a public transit facility any of the following, if the sterile area is posted with a statement providing reasonable notice that prosecution may result from possession of these items:(1) Any firearm.(2) Any imitation firearm as defined in Section 417.4.(3) Any instrument that expels a metallic projectile, such as a BB or pellet, through the force of air pressure, CO2 pressure, or spring action, or any spot marker gun or paint gun.(4) Any metal military practice hand grenade.(5) Any metal replica hand grenade.(6) Any plastic replica hand grenade.(7) Any unauthorized tear gas weapon.(8) Any undetectable knife, as described in Section 17290.(c) (1) Subdivision (b) shall 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) Any person summoned by any of the officers listed in subparagraphs (A) to (C), inclusive, to assist in making arrests or preserving the peace while he or she is 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).(2) Paragraph (1) of subdivision (b) does not apply to or affect a person who is exempt from the prohibition against carrying a handgun pursuant to Section 25400 if the carrying of that handgun is in accordance with the terms and conditions of the exemption specified in Article 2 (commencing with Section 25450) of Chapter 2 of Division 5 of Title 4 of Part 6 or Sections 25615 to 25655, inclusive.(3) Paragraph (7) of subdivision (b) shall 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.(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 shall not be construed as restricting 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.(Amended by Stats. 2011, Ch. 285, Sec. 11. (AB 1402) Effective January 1, 2012.)