(2)(a) Except as otherwise provided in paragraph (b) of this subsection, a person who intentionally possesses:
(A) A firearm in a court facility is guilty, upon conviction, of a Class C felony. A person who intentionally possesses a firearm in a court facility shall surrender the firearm to a law enforcement officer.
(B) A weapon, other than a firearm, in a court facility may be required to surrender the weapon to a law enforcement officer or to immediately remove it from the court facility. A person who fails to comply with this subparagraph is guilty, upon conviction, of a Class C felony.
(C) A firearm in a local court facility is guilty, upon conviction, of a Class C felony if, prior to the offense, the presiding judge of the local court facility entered an order prohibiting firearms in the area in which the court conducts business and during the hours in which the court operates.
(b) The presiding judge of a judicial district or a municipal court may enter an order permitting the possession of specified weapons in a court facility.
(c) Within a shared court facility, the presiding judge of a municipal court or justice of the peace district may not enter an order concerning the possession of weapons in the court facility that is in conflict with an order entered by the presiding judge of the circuit court.
(3) Subsection (1) of this section does not apply to:
(a) A police officer or reserve officer, as those terms are defined in ORS 181A.355.
(b) A parole and probation officer, as defined in ORS 181A.355, while the parole and probation officer is acting within the scope of employment.
(c) A federal officer, as defined in ORS 133.005, or a certified reserve officer or corrections officer, as those terms are defined in ORS 181A.355, while the federal officer, certified reserve officer or corrections officer is acting within the scope of employment.
(d) A person summoned by an officer described in paragraph (a), (b) or (c) of this subsection to assist in making an arrest or preserving the peace, while the summoned person is engaged in assisting the officer.
(e) An honorably retired law enforcement officer.
(f) An active or reserve member of the military forces of this state or the United States, when engaged in the performance of duty.
(g) A person who is licensed under ORS 166.291 and 166.292 to carry a concealed handgun.
(h) A person who is authorized by the officer or agency that controls the public building to possess a firearm or dangerous weapon in that public building.
(i) An employee of the United States Department of Agriculture, acting within the scope of employment, who possesses a firearm in the course of the lawful taking of wildlife.
(j) Possession of a firearm on school property if the firearm:
(A) Is possessed by a person who is not otherwise prohibited from possessing the firearm; and
(B) Is unloaded and locked in a motor vehicle.
(4)(a) The exceptions listed in subsection (3)(d) to (j) of this section constitute affirmative defenses to a charge of violating subsection (1) of this section.
(b) A person may not use the affirmative defense described in subsection (3)(e) of this section if the person has been convicted of an offense that would make the person ineligible to obtain a concealed handgun license under ORS 166.291 and 166.292.
(5)(a) Any person who knowingly, or with reckless disregard for the safety of another, discharges or attempts to discharge a firearm at a place that the person knows is a school shall upon conviction be guilty of a Class C felony.
(b) Paragraph (a) of this subsection does not apply to the discharge of a firearm:
(A) As part of a program approved by a school in the school by an individual who is participating in the program;
(B) By a law enforcement officer acting in the officer’s official capacity; or
(C) By an employee of the United States Department of Agriculture, acting within the scope of employment, in the course of the lawful taking of wildlife.
(6) Any weapon carried in violation of this section is subject to the forfeiture provisions of ORS 166.279.
(7) Notwithstanding the fact that a person’s conduct in a single criminal episode constitutes a violation of both subsections (1) and (5) of this section, the district attorney may charge the person with only one of the offenses.
(8) As used in this section, "dangerous weapon" means a dangerous weapon as that term is defined in ORS 161.015. [1969 c.705 §§2,4; 1977 c.207 §2; 1979 c.398 §2; 1989 c.839 §22; 1989 c.982 §5; 1991 c.67 §39; 1993 c.625 §1; 1999 c.782 §7; 1999 c.1040 §4; 2001 c.666 §§24,36; 2003 c.614 §6; 2009 c.556 §6; 2015 c.351 §2; 2015 c.709 §4]