The Code of Criminal Procedure, 1898
Section 471Person acquitted on such ground to be detained in safe custody
Part VIII SPECIAL PROCEEDINGS
Chapter XXXIV LUNATICS
s. 471
471. Person acquitted on such ground to be detained in safe custody (1) Whenever the finding states that the accused person committed the act alleged, the Magistrate or Court before whom or which the trial has been held, shall, if such act would, but for the incapacity found, have constituted an offence, order such person to be detained in safe custody in such place and manner as the Magistrate or Court thinks fit, and shall report the action taken to the Government: Provided that no order for the detention of the accused in a lunatic asylum shall be made otherwise than in accordance with such rules as the Government may have made under the Lunacy Act, 1912.