The Prisoners Act,1900
Section 30. Lunatic prisoners how to be dealt with
(1) Where it appears to the State Government that any per son detained or imprisoned under any order or sentence of any Court is of unsound mind, the State Government may, by a warrant setting forth the grounds of belief that the person is of unsound mind, order his removal to a lunatic asylum Or other place of safe custody within the State, there to be kept and treated as the State Government directs during the remainder 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 others 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 State Government that the prisoner has become of sound mind, the State Government shall by a warrant direct to the person having charge of the prisoner, if still liable to be kept in custody, remand him to the prison, from which he was removed, or to another prison within the State, or, if the prisoner is no longer liable to be kept in custody, order him to be discharged.
(3) The provisions of l[Section 9 of the Lunatic Asylums Act,1859 (36 of 1958)]
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.
(4) In any case in which the State Government is competent under sub-section (1) to order the removal of a prisoner to a lunatic asylum or other place of safe custody within the State, the State Government may order his removal to any such asylum or place within any other State or within any part of India to which this Act does not extend by agreement with the State Government of such other State; and the provisions of this section respecting the custody, detention, remand the discharge of a prisoner removed under subsection (1) shall, so far as they can be made applicable, apply to a prisoner removed under this subsection.
1. See now the Indian Lunacy Act,1912 (4 of 1912).