23A-27A-4. Aggravating circumstance and recommendation of death penalty required for Class A felony death sentencing--Life imprisonment--Bench trial or guilty plea. If, upon a trial by jury, a person is convicted of a Class A felony, a sentence of death shall not be imposed unless the jury verdict at the presentence hearing includes a finding of at least one aggravating circumstance and a recommendation that such sentence be imposed. If an aggravating circumstance is found and a recommendation of death is made, the court shall sentence the defendant to death. If a sentence of death is not recommended by the jury, the court shall sentence the defendant to life imprisonment. The provisions of this section shall not affect a sentence when the case is tried without a jury or when a court accepts a plea of guilty.