Section 379 of the Code of Criminal Procedure

Chapter 26, text as in the 1980 Revised Edition

379. When the accused appears to be of sound mind at the time of the inquiry and the Magistrate's Court is satisfied from the evidence given before the court 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 court shall proceed with the case as directed by Chapter XV. *When accused appears to havebeen of unsound mind.*