23A-10A-3. Hearing on mental condition--Mental examination and report. At any time after the commencement of a prosecution for an offense and prior to the sentencing of the defendant, the defendant or the prosecuting attorney may file a motion for a hearing to determine the mental competency of the defendant. The court shall grant the motion, or shall order such a hearing on its own motion, if there is reasonable cause to believe that the defendant may presently be suffering from a mental disease or developmental disability, or other conditions set forth in § 23A-10A-1, rendering the defendant mentally incompetent to the extent that the defendant is unable to understand the nature and consequences of the proceeding against the defendant or to assist properly in the defendant's defense. Prior to the date of hearing, the court may order that a psychiatric or psychological examination of the defendant be conducted, and that a psychiatric or psychological report be filed with the court, pursuant to the provisions of §§ 23A-46-1 and 23A-46-2. The examination shall be completed within twenty-one days of the court order, unless for good cause the court grants a continuance. The hearing shall be conducted pursuant to the provisions of § 23A-46-3.
Source: SL 1978, ch 175, § 4; SDCL Supp, § 23-38-2.1; SL 1985, ch 192, § 38; SL 1991, ch 199, § 4; SL 2017, ch 109, § 16.