Section 13C. If a person comes into this commonwealth in obedience to a summons or order directing him to attend and testify in a criminal proceeding or grand jury investigation or proceeding in this commonwealth he shall not, while in this commonwealth pursuant to such summons or order, be subject to arrest or the service of process, civil or criminal, in connection with matters which arose before his entrance into this commonwealth under the summons or order.
If a person passes through this commonwealth while going to another state in obedience to a summons or order to attend and testify in a criminal proceeding or grand jury investigation or proceeding in that state, or while returning therefrom, he shall not, while so passing through this commonwealth, be subject to arrest or the service of process, civil or criminal, in connection with matters which arose before his entrance into this commonwealth under the summons or order.
Nothing in this section or either of the two preceding sections shall preclude action under sections twelve and thirteen or under similar reciprocal provisions of law in other states.