Prisoners Act, 1900
30. Lunatic prisoners how to be dealt with.
(1) Where it appears to the 4[State Government] that any person detained or imprisoned under any order or sentence of any Court is of unsound mind, the 4[State Government] may, by a warrant setting forth the grounds of belief t hat the person is unsound mind, order his removal to a lunatic asylum or other place of safe custody within the 14[State], there to be kept and treated as the 4[State Government] directs during the reminder of the term for which he has been ordered or sentenced to be detained or imprisoned, or if on the expiration of that term it is certified by a medical officer that it is necessary for the safety of the prisoner or other that he should be further detained under medical care or treatment then until he is discharged according to law.
(2) Where it appears to the 4[State Government] that the prisoner has become of sound mind, in the 4[State Government] shall, by a warrant directed to the person having charge of the prisoner, if still liable to kept in custody, remand him to the prison from which he was removed, or to another prison within the 14[State] or, if the prisoner is no longer liable to be kept in custody, order him to be discharged.
(3) The provisions of section 9 of the Lunatic Asylum Act, 1858 shall apply to every person confined in a lunatic asylum under sub-section (1) after the expiration of the term for Which he was ordered or sentenced to be detained or imprisoned; and the time during which a prisoner is confined in a lunatic asylum under that sub-section shall be reckoned as part of the term of detention or imprisonment which he may have been ordered or sentenced by the Court to undergo.
21[(4) In any case in which the 4[State Government] is competent under sub-section (1) to order the removal of a lunatic asylum or other place of safe custody within the 14[State], the 4[State Government] may order his removal to any such asylum or place within any other 4[State] or within any 22[Part B State] by agreement with 4[State Government] of such other 14[State] or with 23[such State or the Ruler thereof], as the case may be; and the provisions of this section respecting the custody, detention, remand and discharge of a prisoner removed under sub-section (1) shall, so far as they can made applicable, apply to a prisoner removed under this sub-section.]