The Code of Criminal Procedure, 1898
Part VIII: SPECIAL PROCEEDINGS
Chapter XXXIV
LUNATICS
Section 464: Procedure in case of accused being lunatic
464.(1) When a Magistrate holding an inquiry or a trial has reason to believe that the accused is of unsound mind and consequently incapable of making his defense, the Magistrate shall inquire into the fact of such unsoundness, and shall cause such person to be examined by the Civil Surgeon of the district or such other medical officer as the Government directs, and thereupon shall examine such Surgeon or other officer as a witness, and shall reduce the examination to writing.
(1A) Pending such examination and inquiry the Magistrate may deal with the accused in accordance with the provisions of section 466.
 
 
(2) If such Magistrate is of opinion that the accused is of unsound mind and consequently incapable of making his defence, he shall record a finding to that effect and shall postpone further proceedings in the case.
Section 465: Procedure in case of person being lunatic before Court of Sessions
465.(1) If at the trial of any person before a Court of Session, it appears to the Court that such person is of unsound mind and consequently incapable of making his defence, the Court shall, in the first instance, try the fact of such unsoundness and incapacity, and if the Court is satisfied of the fact, it shall record a finding to that effect and shall postpone further proceedings in the case.
 
 
(2) The trial of the fact of the unsoundness of mind and incapacity of the accused shall be deemed to be part of his trial before the Court.
Section 466: Release of lunatic pending investigation or trial
466.(1) Whenever an accused person is found to be of unsound mind and incapable of making his defence, the Magistrate or Court, as the case may be, whether the case is one on which bail may be taken or not, may release him on sufficient security being given that he shall be properly taken care of and shall be prevented from doing injury to himself or to any other person, and for his appearance when required before the Magistrate or Court or such officer as the Magistrate or Court appoints in this behalf.
 
 
(2) If the case is one in which, in the opinion of the Magistrate or Court, bail should not be taken, or if sufficient security is not given, the Magistrate or Court, as the case may be, shall order the accused to be detained in safe custody in such place and manner as he or it may think 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.
Section 467: Resumption of inquiry or trial
467.(1) Whenever an inquiry or a trial is postponed under section 464 or section 465, the Magistrate or Court, as the case may be, may at any time resume the inquiry or trial, and require the accused to appear or be brought before such Magistrate or Court.
(2) When the accused has been released under section 466, and the sureties for his appearance produce him to the officer whom the Magistrate or Court appoints in this behalf, the certificate of such officer that the accused is capable of making his defence shall be receivable in evidence.
Section 468: Procedure on accused appearing before Magistrate or Court
468.(1) If, when the accused appears or is again brought before the Magistrate or the Court, as the case may be, the Magistrate or Court considers him capable of making his defence, the inquiry or trial shall proceed.
 
 
(2) If the Magistrate or Court considers the accused to be still incapable of making his defence, the Magistrate or Court shall again act according to the provisions of section 464 or section 465, as the case may be, and if the accused is found to be of unsound mind and incapable of making his defence, shall deal with such accused in accordance with the provisions of section 466.
Section 469: When accused appears to have been insane
469. When the accused appears to be of sound mind at the time of inquiry or trial, and the Magistrate or, as the case may be, the Court is satisfied from the evidence given before him or it that there is reason to believe that the accused committed an act which, if he had been of sound mind, would have been an offence, and that he was, at the time when the act was committed, by reason of unsoundness of mind, incapable of knowing the nature of the act or that it was wrong or contrary to law, the Magistrate or, as the case may be, the Court shall proceed with the case.
Section 470: Judgment of acquittal on ground of lunacy
470. Whenever any person is acquitted upon the ground that, at the time at which he is alleged to have committed an offence, he was, by reason of unsoundness of mind, incapable of knowing the nature of the act alleged as constituting the offence, or that it was wrong or contrary to law, the finding shall state specifically whether he committed the act or not.
(2) The Government may empower the officer in charge of the jail in which a person is confined under the provisions of section 466 or this section, to discharge all or any of the functions of the Inspector General of Prisons under section 473 or section 474.
Section 471: Person acquitted on such ground to be detained in safe custody
471.(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.
Section 473: Procedure where lunatic prisoner is reported capable of making his defence
473. If such person is detained under the provisions of section 466, and in the case of a person detained in a jail, the Inspector General of Prisons, or, in the case of a person detained in a lunatic asylum, the visitors of such asylum or any two of them shall certify that, in his or their opinion, such person is capable of making his defence, he shall be taken before the Magistrate or Court, as the case may be, at such time as the Magistrate or Court appoints, and the Magistrate or Court shall deal with such person under the provisions of section 468; and the certificate of such Inspector General or visitors as aforesaid shall be receivable as evidence.
Section 474: Procedure where lunatic detained under section 466 or 471 is declared fit to be released.
474.(1) If such person is detained under the provisions of section 466 or section 471, and such Inspector General or visitors shall certify that, in his or their judgment, he may be released without danger of his doing injury to himself or to any other person, the Government may thereupon order him to be released or to be detained in custody, to be transferred to a public lunatic asylum if he has not been already sent to such an asylum; and, incase it orders him to be transferred to an asylum, may appoint a Commission, consisting of a judicial and two medical officers.
(2) Such Commission shall make formal inquiry into the state of mind of such person, taking such evidence as is necessary, and shall report to the Government, which may order his release or detention as it thinks fit.
Section 475: Delivery of lunatic to care of relative or friend
475.(1) Whenever any relative or friend of any person detained under the provisions of section 466 or section 471 desires that he shall be delivered to his care and custody, the Government may, upon the application of such relative or friend and on his giving security to the satisfaction of the Government that the person delivered shall-
 
 
(a) be properly taken care of and prevented from doing injury to himself or to any other person, and
 
 
(b) be produced for the inspection of such officer, and at such times and places as the Government may direct, and
 
 
(c) in the case of a person detained under section 466, be produced when required before such Magistrate or Court,
 
 
order such person to be delivered to such relative or friend.
 
 
(2) If the person so delivered is accused of any offence the trial of which has been postponed by reason of his being of unsound mind and incapable of making his defence, and the inspecting officer referred to in sub-section (1), clause (b), certifies at any time to the Magistrate or Court that such person is capable of making his defence, such Magistrate or Court shall call upon the relative or friend to whom such accused was delivered to produce him before the Magistrate or Court; and, upon such production, the Magistrate or Court shall proceed in accordance with the provisions of section 468, and the certificate of the inspecting officer shall be receivable as evidence.