(a) A person commits criminal trespass if he or she purposely enters or remains unlawfully in or upon:
(1) A vehicle of another person; or
(2) The premises owned or leased by another person.
(b) Criminal trespass is a:
(1) Class D felony if the person has two (2) or more convictions for a Class A misdemeanor violation of this section or § 5-39-305;
(2) Class A misdemeanor if:
(A) At the time of the criminal trespass, the person is in possession of one (1) or more of the following:
(i) A killing device;
(ii) A harvesting device;
(iii) A device primarily used for the location and unearthing of buried or submerged artifacts; or
(iv) A tool designed to gain entry into a structure by breaking a lock or breaking through a fence, including without limitation a boltcutter;
(B) The person is on premises containing a commercial fishing or fish breeding operation and at that time is in possession of a fishing pole or net designed to capture fish; or
(C) The person has a prior conviction for a violation of this section;
(3) Class B misdemeanor if:
(A) The vehicle or premises involved is an occupiable structure; or
(B) The conduct involves the removal of a posted sign, a fence, or a portion of a fence as defined in § 2-39-102; or
(4) Class C misdemeanor if otherwise committed.
(c) It is a defense to prosecution under this section that:
(1) The person was a guest or invitee;
(2) The person was required to enter upon the premises of the other person for a business reason or for health and safety reasons;
(3) The person was authorized by law to enter upon the premises;
(4) The privately owned premises were made open to the public; or
(5) The person owns or is employed by a person or entity that owns property adjoining the premises and is traveling over the premises with good faith or for a legitimate reason.
(d) This section does not apply to the following persons who are acting in the line of duty or within the scope of their employment:
(1) A law enforcement officer;
(2) A firefighter;
(3) An emergency first responder;
(4) An employee of a state agency, court, or school who is tasked with monitoring, supervising, or making direct contact with a minor or the parents of a minor concerning the well-being of the minor; or
(5) An employee of a federal, state, or local agency, commission, board, political subdivision, school district, or municipality who has entered onto or remains on the premises for a purpose directly relating to the employee's employment with the federal, state, or local agency, commission, board, political subdivision, school district, or municipality.
(e) (1) It is an affirmative defense to prosecution under this section if the person who enters the premises of another person is:
(A) Temporarily on the premises of the other person for the sole purpose of recovering livestock, a dog, or any other domesticated animal; and
(B) Either:
(i) The owner of the livestock, dog, or other domesticated animal; or
(ii) An employee or agent of the owner of the livestock, dog, or other domesticated animal.
(2) A person who enters the premises of another person as described in subdivision (e)(1) of this section is subject to civil liability for any property damage that occurs in the course of recovering the livestock, dog, or other domesticated animal.
(f) A person aggrieved by a violation of this section is granted a private cause of action against the person who violated this section and is entitled to recover:
(1) Actual damages caused by the violation;
(2) Reasonable attorney's fees; and
(3) Punitive damages.