(a) As used in this section, “intellectual disability” means:

(1) Significantly subaverage general intellectual functioning;
(2) Deficits in adaptive behavior; and
(3) The intellectual disability must have manifested during the developmental period, or by eighteen (18) years of age.
(b) Notwithstanding any law to the contrary, no defendant with intellectual disability at the time of committing first degree murder shall be sentenced to death.
(c) The burden of production and persuasion to demonstrate intellectual disability by a preponderance of the evidence is upon the defendant. The determination of whether the defendant had intellectual disability at the time of the offense of first degree murder shall be made by the court.
(d) If the court determines that the defendant was a person with intellectual disability at the time of the offense, and if the trier of fact finds the defendant guilty of first degree murder, and if the district attorney general has filed notice of intention to ask for the sentence of imprisonment for life without possibility of parole as provided in § 39-13-208(b), the jury shall fix the punishment in a separate sentencing proceeding to determine whether the defendant shall be sentenced to imprisonment for life without possibility of parole or imprisonment for life. Section 39-13-207 shall govern the sentencing proceeding.
(e) If the issue of intellectual disability is raised at trial and the court determines that the defendant is not a person with intellectual disability, the defendant shall be entitled to offer evidence to the trier of fact of diminished intellectual capacity as a mitigating circumstance pursuant to § 39-13-204(j)(8).
(f) The determination by the trier of fact that the defendant does not have intellectual disability shall not be appealable by interlocutory appeal, but may be a basis of appeal by either the state or defendant following the sentencing stage of the trial.
(g)

(1) A defendant who has been sentenced to the death penalty prior to May 11, 2021, and whose conviction is final on direct review may petition the trial court for a determination of whether the defendant is intellectually disabled. The motion must set forth a colorable claim that the defendant is ineligible for the death penalty due to intellectual disability. Either party may appeal the trial court’s decision in accordance with Rule 3 of the Tennessee Rules of Appellate Procedure.
(2) A defendant shall not file a motion under subdivision (g)(1) if the issue of whether the defendant has an intellectual disability has been previously adjudicated on the merits.