(a) A person commits the crime of unlawful contact in the first degree if the person
(1) has been ordered
(A) by the court not to contact a victim or witness of the offense
(i) as part of a sentence imposed under AS 12.55.015;
(ii) as a condition of release under AS 12.30 or probation under AS 12.55.101; or
(iii) while under official detention; or
(B) as a condition of parole not to contact a victim or witness of the offense under AS 33.16.150; and
(2) either directly or indirectly, knowingly contacts or attempts to contact the victim or witness in violation of the order.
(b) Unlawful contact in the first degree is a class A misdemeanor.