166.370 Possession of firearm or dangerous weapon in public building or court facility; exceptions; discharging firearm at school. (1) Any person who intentionally possesses a loaded or unloaded firearm or any other instrument used as a dangerous weapon, while in or on a public building, shall upon conviction be guilty of a Class C felony.
(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.
(b) The presiding judge of a judicial district may enter an order permitting the possession of specified weapons in a court facility.
(3) Subsection (1) of this section does not apply to:
(a) A sheriff, police officer, other duly appointed peace officers or a corrections officer while acting within the scope of employment.
(b) A person summoned by a peace officer to assist in making an arrest or preserving the peace, while the summoned person is engaged in assisting the officer.
(c) An active or reserve member of the military forces of this state or the United States, when engaged in the performance of duty.
(d) A person who is licensed under ORS 166.291 and 166.292 to carry a concealed handgun.
(e) 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.
(f) 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) The exceptions listed in subsection (3)(b) to (f) of this section constitute affirmative defenses to a charge of violating subsection (1) of this section.