If a person passes through this state while going to another state in obedience to a subpoena to attend and testify in that state or while returning therefrom, the person shall not, while so passing through this state, be subject to arrest or the service of process, civil or criminal, in connection with matters which arose before entering this state under the subpoena.
AS 12.50.040