The sentencing court may impose a sentence other than that required by §§ 22-24A-35 to 22-24A-37, inclusive, if the court finds that mitigating circumstances exist that require a departure from the mandatory sentence imposed by §§ 22-24A-35 to 22-24A-37, inclusive. The court shall file, in writing, its finding of mitigating circumstances and the factual basis relied upon by the court.
SDCL 22-24A-42