Where:
(a) a State order of transfer of a State is made under a State transfer law for the transfer of a State prisoner or a joint prisoner between that State and another State; and
(b) a person is authorized in accordance with a State transfer law (whether or not that law is a law of that State) to keep that prisoner in custody in a State for the purpose of so transferring the prisoner; and
(c) in the course of so transferring the prisoner, the person brings the prisoner into a Territory;
then:
(d) the person may keep the prisoner in custody in the Territory for purposes in connection with the transfer of the prisoner; and
(e) the prisoner may be detained in the Territory in a prison or in a police station or other premises in which persons awaiting trial may lawfully be detained for such time as is reasonably necessary to facilitate the transfer.