6. Officer in charge of prison when to abstain from carrying out order.-
Where the person in respect of whom an order is made under section 3-
(a) is, in accordance with the rules made in this behalf, declared to be unfit to be removed from the prison where he is confined by reason of sickness or other infirmity; or
(b) is under committal for trial; or
(c) is under remand pending trial or pending a preliminary investigation; or
(d) is in custody for a period which would expire before the expiration of the time required for removing him under this Act and for taking him back to the prison in which he is confined,
the officer in charge of the prison shall abstain from carrying out the order and shall send to the court from which the order had been issued a statement of reasons for so abstaining: Provided that such officer as aforesaid shall not so obstain where-
(i) the order has been made by a criminal court; and
(ii) the person named in the order is confined under committal for trial or under remand pending trial or pending a preliminary investigation and is not declared in accordance with the rules made in this behalf to be unfit to be removed from the prison where he is confined by reason of sickness or other infirmity; and
(iii) the place, where the evidence of the person named in the order is required, is not more than five miles distant from the prison in which he is confined.