Below are the statutes that govern criminal trespass.
Criminal trespass in the first degree.
(1) A person is guilty of criminal trespass in the first degree if he knowingly enters or remains unlawfully in a building.
(2) Criminal trespass in the first degree is a gross misdemeanor.
Criminal trespass in the second degree.
(1) A person is guilty of criminal trespass in the second degree if he knowingly enters or remains unlawfully in or upon premises of another under circumstances not constituting criminal trespass in the first degree.
(2) Criminal trespass in the second degree is a misdemeanor.
Criminal trespass – Defenses.
In any prosecution under RCW 9A.52.070 and 9A.52.080, it is a defense that:
(1) A building involved in an offense under RCW 9A.52.070 was abandoned; or
(2) The premises were at the time open to members of the public and the actor complied with all lawful conditions imposed on access to or remaining in the premises; or
(3) The actor reasonably believed that the owner of the premises, or other person empowered to license access thereto, would have licensed him to enter or remain; or
(4) The actor was attempting to serve legal process which includes any document required or allowed to be served upon persons or property, by any statute, rule, ordinance, regulation, or court order, excluding delivery by the mails of the United States. This defense applies only if the actor did not enter into a private residence or other building not open to the public and the entry onto the premises was reasonable and necessary for service of the legal process.