Quick summary
California Penal Code 171.5 makes it a misdemeanor to knowingly have a firearm anywhere on airport property, including its parking areas, or to carry knives, box cutters, stun guns, ammunition and other listed items past an airport security checkpoint.
- Penalties: up to 6 months in county jail, a fine of up to $1,000, or both.
- Exceptions: you may bring an unloaded gun in a locked, hard-sided case to check it, and concealed carry license holders may keep a gun in a lock box in their car.
- Defenses: you didn’t know the item was there, or one of the law’s exceptions applies.
- Example: Sam forgets a hunting knife with a 5-inch fixed blade in his carry-on. TSA finds it at screening at SFO. He can be charged under PC 171.5 only if the prosecutor proves he knew it was there.
California weapon laws are strict in general, and they are especially strict at airports. Since January 1, 2024, Penal Code 171.5 PC has two parts:1
- Firearms anywhere on airport property: it is a crime to knowingly possess any firearm in any building, real property or parking area under the control of an airport, unless an exception applies.
- Other weapons past security: it is a crime to knowingly possess certain items, such as large knives, box cutters, stun guns, replica grenades and ammunition, in the “sterile area” of an airport or passenger ship terminal (the part you can enter only after security screening).
A conviction is a misdemeanor. The key part of the statute reads:
“(b) It is unlawful for any person to knowingly possess any firearm in any building, real property, or parking area under the control of an airport, except as provided for in subdivision (b), (c), or (e) of Section 26230.
(c) It is unlawful for any person to knowingly possess, within any sterile area of an airport or a passenger vessel terminal, any of the following items: …”
Penal Code 171.5(b)-(c) (as of November 2026; the full text is in note 1). In plain terms: no guns anywhere on airport grounds, and a longer list of banned items once you pass the security checkpoint.
Examples
- Marco tries to bring a concealed 9mm handgun through a security checkpoint at LAX.
- Jack sneaks a stun gun into the sterile area of an airport under his overcoat.
- Juan carries a replica hand grenade into a TSA checkpoint as a joke.
Defenses
There are several legal defenses you can raise if you’re accused of violating Penal Code 171.5. These include showing that:
- you did not know you had the gun or prohibited item,
- one of the law’s exceptions applies, such as bringing an unloaded gun in a locked case to check it, or
- you acted under duress.
Penalties
A violation of PC 171.5 is a misdemeanor in California (not a felony or an infraction). It is punishable by:
- up to six months in county jail, and/or
- a fine of up to $1,000.
Instead of jail, a judge may grant misdemeanor (summary) probation.
In this article, our California criminal defense attorneys answer 4 common questions about Penal Code 171.5:
- 1. What is prohibited under California Penal Code 171.5 PC?
- 2. What are the legal defenses?
- 3. What are the penalties?
- 4. What are the related offenses?

1. What is prohibited under California Penal Code 171.5 PC?
In California, Penal Code 171.5 makes it a crime to knowingly possess certain weapons at an airport. What’s banned depends on where you are.
Firearms anywhere on airport property
Under PC 171.5(b), you may not knowingly possess any firearm in a building, on land or in a parking area controlled by an airport.2 This rule was added by Senate Bill 2 (SB 2), effective January 1, 2024. Before then, the ban on guns applied only in the sterile area past security.
The main exceptions are:
- Checking a gun for your flight: you may carry an unloaded firearm in a hard-sided, locked container, as federal rules require for checked baggage, as long as you don’t take it into the sterile area.3 See our page on transporting firearms in California.
- Concealed carry license holders: a licensee may keep a firearm locked in a lock box in their vehicle, including in an airport parking area.4
- Peace officers: on-duty and certain retired peace officers, and people helping them, are exempt.5
Example: Dana flies out of San Diego for a hunting trip. She brings her unloaded rifle to the ticket counter in a locked, hard-sided case and checks it with the airline. That is allowed. If she had left a loaded handgun in her glove box in the airport garage, and she has no concealed carry license, she could be charged under PC 171.5(b).
Other weapons in the sterile area
Under PC 171.5(c), you may not knowingly possess any of these items in the sterile area of an airport or a passenger ship terminal:6
- a knife with a fixed or locking blade longer than 4 inches,
- a box cutter or straight razor,
- a metal military practice grenade, or a metal or plastic replica grenade,
- an imitation firearm,
- any frame, receiver, barrel or magazine of a firearm,
- an unauthorized tear gas weapon,
- a taser or stun gun,
- a BB, pellet, paint or spot marker gun, or
- any ammunition.
A “sterile area” is the part of an airport you can enter only after you pass the security screening run by the TSA.7 People with written permission from the airport’s security coordinator are exempt.
Federal law also applies
Having a weapon at a TSA checkpoint or in the sterile area also breaks federal rules, which can bring federal charges or civil fines on top of a state case.8
2. What are the legal defenses?
If you are accused of violating Penal Code 171.5, you can fight the charge with a legal defense. A good defense can often get the charge reduced or dismissed. Common defenses include:
You did not know the weapon was there
PC 171.5 applies only if you knowingly possessed the gun or item.9 So it is a defense that you didn’t know it was there. For example, someone else may have packed your bag or left a knife in a jacket pocket you borrowed.
An exception applies
You may not be guilty if you fit one of the law’s exceptions: you were bringing an unloaded gun in a locked, hard-sided case to check it, you have a concealed carry license and kept the gun locked in a lock box in your car, or you had written authorization from the airport’s security coordinator.
You acted under duress
Duress is a legal defense in which you basically say: “Someone made me do it.” It applies only in the rare case where you committed the crime because someone threatened you with immediate harm if you didn’t.
The search or arrest was illegal
Security screening at a TSA checkpoint is generally lawful. But an unlawful detention, search or arrest elsewhere at the airport, such as in a parking garage, still needs a legal basis under the Fourth Amendment. If police lacked one, the evidence they found may be excluded, which can lead to a dismissal or a reduced charge.

3. What are the penalties?
In California, a violation of PC 171.5 is a misdemeanor. It is punishable by:10
- up to six months in county jail, and/or
- a fine of up to $1,000.
Instead of jail, a judge may grant misdemeanor (summary) probation. If the same act also breaks another California law, you can be punished under only one of them.11
4. What are the related offenses?
Three California crimes are closely related to having a weapon at an airport:
- weapons at public transit facilities – PC 171.7,
- weapons in public buildings and at public meetings – PC 171b, and
- firearms at the Governor’s Mansion and lawmakers’ homes – PC 171d.
Weapons at public transit facilities – PC 171.7
Penal Code 171.7 PC makes it a crime to knowingly possess certain weapons in a public transit facility, such as a train or bus station with controlled access.12 The banned items include:
- firearms and imitation firearms,
- BB, pellet, paint and spot marker guns,
- military practice and replica hand grenades,
- unauthorized tear gas weapons, and
- undetectable knives and firearms.
A violation of PC 171.7 is a misdemeanor punishable by up to six months in county jail, a fine of up to $1,000, or both.13
Weapons in public buildings and at meetings – PC 171b
Penal Code 171b PC makes it a crime to bring or possess a firearm, certain knives, a stun gun, a BB gun or other listed weapons in a state or local public building or at a public meeting.
It is a wobbler, which means it can be charged as either a misdemeanor or a felony. As a misdemeanor, it carries up to one year in county jail. As a felony, it carries 16 months, two years or three years in prison.14
Firearms at the Governor’s Mansion – PC 171d
Penal Code 171d makes it a crime to bring or possess any firearm in, or on the grounds of:15
- the Governor’s Mansion or any other residence of the Governor,
- the residence of any other constitutional officer, or
- the residence of any Member of the Legislature.
Before 2024, this law covered only loaded firearms on the grounds. A violation is a wobbler, punishable:
- as a misdemeanor, by up to one year in county jail and/or up to a $1,000 fine, or
- as a felony, by 16 months, or two or three years, in county jail.
Additional resources
For more information, see these pages on the TSA’s official website:
- Transporting Firearms and Ammunition – how to travel with guns and ammunition.
- Toy Guns and Weapons – how to travel with toy guns and weapons.
- Parts of Guns and Firearms – how to travel with gun parts.
- How is my item considered a weapon, explosive, or incendiary? – whether an object counts as a weapon.
- What can I bring? – items you can or can’t pack for a flight.
Legal references:
- California Penal Code 171.5 PC (amended by SB 2, Stats. 2023, ch. 249, effective January 1, 2024). Full text (as of November 2026): “(a) For purposes of this section: (1) ‘Airport’ means an airport, with a secured area, that regularly serves an air carrier holding a certificate issued by the United States Secretary of Transportation. (2) ‘Passenger vessel terminal’ means only that portion of a harbor or port facility, as described in Section 105.105(a)(2) of Title 33 of the Code of Federal Regulations, with a secured area that regularly serves scheduled commuter or passenger operations. (3) ‘Sterile area’ means a portion of an airport defined in the airport security program to which access generally is controlled through the screening of persons and property, as specified in Section 1540.5 of Title 49 of the Code of Federal Regulations, or a portion of any passenger vessel terminal to which, pursuant to the requirements set forth in Sections 105.255 and 105.260(a) of Title 33 of the Code of Federal Regulations, access is generally controlled in a manner consistent with the passenger vessel terminal’s security plan and the maritime security level in effect at the time. (b) It is unlawful for any person to knowingly possess any firearm in any building, real property, or parking area under the control of an airport, except as provided for in subdivision (b), (c), or (e) of Section 26230. (c) It is unlawful for any person to knowingly possess, within any sterile area of an airport or a passenger vessel terminal, any of the following items: (1) Any knife with a blade length in excess of four inches, the blade of which is fixed, or is capable of being fixed, in an unguarded position by the use of one or two hands. (2) Any box cutter or straight razor. (3) Any metal military practice hand grenade. (4) Any metal replica hand grenade. (5) Any plastic replica hand grenade. (6) Any imitation firearm as defined in Section 417.4. (7) Any frame, receiver, barrel, or magazine of a firearm. (8) Any unauthorized tear gas weapon. (9) Any taser or stun gun as defined in Section 244.5. (10) 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. (11) Any ammunition as defined in Section 16150. (d) Subdivisions (b) and (c) shall not apply to, or affect, any of the following: (1) A duly appointed peace officer as defined in Chapter 4.5 (commencing with Section 830) of Title 3 of Part 2, 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, a full-time paid peace officer of another state or the federal government who is carrying out official duties while in California, or any person summoned by any of these officers to assist in making arrests or preserving the peace while they are actually engaged in assisting the officer. (2) A person who has authorization to possess a weapon specified in subdivision (c), granted in writing by an airport security coordinator who is designated as specified in Section 1542.3 of Title 49 of the Code of Federal Regulations, and who is responsible for the security of the airport. (3) A person, including an employee of a licensed contract guard service, who has authorization to possess a weapon specified in subdivision (c) granted in writing by a person discharging the duties of Facility Security Officer or Company Security Officer pursuant to an approved United States Coast Guard facility security plan, and who is responsible for the security of the passenger vessel terminal. (e) Subdivision (b) shall not apply to, or affect, any person possessing an unloaded firearm being transported in accordance with Sections 1540.111(c)(2)(iii) and 1540.111(c)(2)(iv) of Title 49 of the Code of Federal Regulations, which require a hard-sided, locked container, so long as the person is not within any sterile area of an airport or a passenger vessel terminal. (f) 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. (g) 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. (h) Nothing in this section is intended to affect existing state or federal law regarding the transportation of firearms on airplanes in checked luggage or the possession of the items listed in subdivision (c) in areas that are not ‘sterile areas.'”
- California Penal Code 171.5(b) PC (see note 1 above).
- California Penal Code 171.5(e) PC (see note 1 above): the ban “shall not apply to, or affect, any person possessing an unloaded firearm being transported in accordance with Sections 1540.111(c)(2)(iii) and 1540.111(c)(2)(iv) of Title 49 of the Code of Federal Regulations, which require a hard-sided, locked container, so long as the person is not within any sterile area.”
- California Penal Code 26230(b), (c), (e) PC: “a licensee may transport a firearm and ammunition within their vehicle so long as the firearm is locked in a lock box.”
- California Penal Code 171.5(d) PC (see note 1 above).
- California Penal Code 171.5(c) PC (see note 1 above).
- California Penal Code 171.5(a)(3) PC (see note 1 above): a “sterile area” is the part of an airport “to which access generally is controlled through the screening of persons and property.”
- 49 C.F.R. 1540.111(a): “an individual may not have a weapon, explosive, or incendiary, on or about the individual’s person or accessible property … When performance has begun of the inspection of the individual’s person or accessible property before entering a sterile area.”
- California Penal Code 171.5(b), (c) PC (see note 1 above): “It is unlawful for any person to knowingly possess …”
- California Penal Code 171.5(f) PC (see note 1 above).
- California Penal Code 171.5(g) PC (see note 1 above).
- California Penal Code 171.7(a)-(b) PC (as amended by AB 1078, Stats. 2025, ch. 570, effective January 1, 2026).
- California Penal Code 171.7(d) PC (see note 12 above): “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.”
- California Penal Code 171b(a) PC: “punishable by imprisonment in a county jail for not more than one year, or in the state prison.” See also Penal Code 18 PC (16 months, 2 or 3 years when no other felony term is specified).
- California Penal Code 171d PC (amended by SB 2, effective January 1, 2024): “imprisonment in a county jail for not more than one year, by a fine of not more than one thousand dollars ($1,000), or by both the fine and imprisonment, or by imprisonment pursuant to subdivision (h) of Section 1170.”