If the warden notifies the sentencing court that a defendant under a sentence of death does not appear to be mentally competent to be executed, or if the prosecuting attorney or the defense attorney moves for a determination of whether the defendant is mentally competent to be executed, and the sentencing court determines that there is a substantial threshold showing of incompetence to be executed, the sentencing court shall conduct hearings and order mental examinations pursuant to this section and §§ 23A-27A-22.2 to 23A-27A-22.5, inclusive. Prior to the date of the hearing, the court may order that a psychiatric examination of the defendant be conducted pursuant to § 23A-27A-22.2, and that a psychiatric report be filed with the court, pursuant to § 23A-27A-22.3. The state has the burden of proving the mental competence of the defendant by a preponderance of the evidence. A defendant is mentally competent to be executed if the defendant is aware of the impending execution and the reason for it. If the defendant has previously been determined to be competent to be executed under this chapter and there is a subsequent motion to the sentencing court that the defendant no longer appears to be mentally competent to be executed, there shall be a prima facie showing of a substantial change in circumstances raising a significant question of the defendant's competence to be executed before the sentencing court conducts any further hearing.
SDCL 23A-27A-22.1