§61-11-18. Punishment for second or third offense of felony.
(a) For purposes of this section, “qualifying offense” means any offenses or an attempt or conspiracy to commit any of the offenses in the following provisions of this code:
(1) §60A-4-401(i) and §60A-4-401(ii);
(3) §60A-4-409(b)(1), §60A-4-409(2), and §60A-4-409(3);
(12) §61-2-9a(d) and §61-2-9a(e);
(16) §61-2-10b(b) and §61-2-10b(c);
(17) Felony provisions of §61-2-10b(d);
(19) Felony provisions of §61-2-13;
(21) §61-2-14a(a) and §61-2-14a(d);
(23) §61-2-14d(a) and §61-2-14d(b);
(25) §61-2-14h(a), §61-2-14h(b), and §61-2-14h(c);
(26) §61-2-16a(a) and §61-2-16a(b);
(27) Felony provisions of §61-2-16a(c);
(29) §61-2-29(d) and §61-2-29(e);
(43) §61-5-17(b), §61-5-17(f), §61-5-17(h), and §61-5-17(i);
(46) Felony provisions of §61-7-7;
(71) §61-14-2; and
(72) §17C-5-2(b), driving under the influence causing death.
(b) Except as provided by subsection (c) of this section, when any person is convicted of a qualifying offense and is subject to imprisonment in a state correctional facility therefor, and it is determined, as provided in §61-11-19 of this code, that such person had been before convicted in the United States of a crime punishable by imprisonment in state or federal correctional facility, the court shall, if the sentence to be imposed is for a definite term of years, add five years to the time for which the person is or would be otherwise sentenced. Whenever in such case the court imposes an indeterminate sentence, the minimum term shall be twice the term of years otherwise provided for under such sentence.
(c) Notwithstanding any provision of this code to the contrary, when any person is convicted of first degree murder or second degree murder or a violation of §61-8B-3 of this code and it is determined, as provided in §61-11-19 of this code, that such person had been before convicted in this state of first degree murder, second degree murder, or a violation of §61-8B-3 of this code, or has been so convicted under any law of the United States or any other state for an offense which has the same or substantially similar elements as any offense described in this subsection, such person shall be punished by imprisonment in a state correctional facility for life and is not eligible for parole.
(d) When it is determined, as provided in §61-11-19 of this code, that such person shall have been twice before convicted in the United States of a crime punishable by imprisonment in a state or federal correctional facility which has the same or substantially similar elements as a qualifying offense, the person shall be sentenced to imprisonment in a state correctional facility for life: Provided, That prior convictions arising from the same transaction or series of transactions shall be considered a single offense for purposes of this section: Provided, however, That the most recent previous qualifying offense which would otherwise constitute a qualifying offense for purposes of this subsection may not be considered if more than 20 years have elapsed between: (1) The release of the person from his or her term of imprisonment or period of supervision resulting from the most recent qualifying offense or the expiration of a period of supervised release resulting from such offense; and (2) the conduct underlying the current charge.