(a) “Habitual felony offender” means a defendant for whom the court may impose an extended term of imprisonment, as provided in paragraph (4)(a), if it finds that:

1. The defendant has previously been convicted of any combination of two or more felonies in this state or other qualified offenses.

2. The felony for which the defendant is to be sentenced was committed:

a. While the defendant was serving a prison sentence or other sentence, or court-ordered or lawfully imposed supervision that is imposed as a result of a prior conviction for a felony or other qualified offense; or

b. Within 5 years of the date of the conviction of the defendant’s last prior felony or other qualified offense, or within 5 years of the defendant’s release from a prison sentence, probation, community control, control release, conditional release, parole or court-ordered or lawfully imposed supervision or other sentence that is imposed as a result of a prior conviction for a felony or other qualified offense, whichever is later.

3. The felony for which the defendant is to be sentenced, and one of the two prior felony convictions, is not a violation of s. 893.13 relating to the purchase or the possession of a controlled substance.

4. The defendant has not received a pardon for any felony or other qualified offense that is necessary for the operation of this paragraph.

5. A conviction of a felony or other qualified offense necessary to the operation of this paragraph has not been set aside in any postconviction proceeding.

(b) “Habitual violent felony offender” means a defendant for whom the court may impose an extended term of imprisonment, as provided in paragraph (4)(b), if it finds that:

1. The defendant has previously been convicted of a felony or an attempt or conspiracy to commit a felony and one or more of such convictions was for:

a. Arson;

b. Sexual battery;

c. Robbery;

d. Kidnapping;

e. Aggravated child abuse;

f. Aggravated abuse of an elderly person or disabled adult;

g. Aggravated assault with a deadly weapon;

h. Murder;

i. Manslaughter;

j. Aggravated manslaughter of an elderly person or disabled adult;

k. Aggravated manslaughter of a child;

l. Unlawful throwing, placing, or discharging of a destructive device or bomb;

m. Armed burglary;

n. Aggravated battery; or

o. Aggravated stalking.

2. The felony for which the defendant is to be sentenced was committed:

a. While the defendant was serving a prison sentence or other sentence, or court-ordered or lawfully imposed supervision that is imposed as a result of a prior conviction for an enumerated felony; or

b. Within 5 years of the date of the conviction of the last prior enumerated felony, or within 5 years of the defendant’s release from a prison sentence, probation, community control, control release, conditional release, parole, or court-ordered or lawfully imposed supervision or other sentence that is imposed as a result of a prior conviction for an enumerated felony, whichever is later.

3. The defendant has not received a pardon on the ground of innocence for any crime that is necessary for the operation of this paragraph.

4. A conviction of a crime necessary to the operation of this paragraph has not been set aside in any postconviction proceeding.

(c) “Three-time violent felony offender” means a defendant for whom the court must impose a mandatory minimum term of imprisonment, as provided in paragraph (4)(c), if it finds that:

1. The defendant has previously been convicted as an adult two or more times of a felony, or an attempt to commit a felony, and two or more of such convictions were for committing, or attempting to commit, any of the following offenses or combination thereof:

a. Arson;

b. Sexual battery;

c. Robbery;

d. Kidnapping;

e. Aggravated child abuse;

f. Aggravated abuse of an elderly person or disabled adult;

g. Aggravated assault with a deadly weapon;

h. Murder;

i. Manslaughter;

j. Aggravated manslaughter of an elderly person or disabled adult;

k. Aggravated manslaughter of a child;

l. Unlawful throwing, placing, or discharging of a destructive device or bomb;

m. Armed burglary;

n. Aggravated battery;

o. Aggravated stalking;

p. Home invasion/robbery;

q. Carjacking; or

r. An offense which is in violation of a law of any other jurisdiction if the elements of the offense are substantially similar to the elements of any felony offense enumerated in sub-subparagraphs a.-q., or an attempt to commit any such felony offense.

2. The felony for which the defendant is to be sentenced is one of the felonies enumerated in sub-subparagraphs 1.a.-q. and was committed:

a. While the defendant was serving a prison sentence or other sentence imposed as a result of a prior conviction for any offense enumerated in sub-subparagraphs 1.a.-r.; or

b. Within 5 years after the date of the conviction of the last prior offense enumerated in sub-subparagraphs 1.a.-r., or within 5 years after the defendant’s release from a prison sentence, probation, community control, or other sentence imposed as a result of a prior conviction for any offense enumerated in sub-subparagraphs 1.a.-r., whichever is later.

3. The defendant has not received a pardon on the ground of innocence for any crime that is necessary for the operation of this paragraph.

4. A conviction of a crime necessary to the operation of this paragraph has not been set aside in any postconviction proceeding.

(d) “Violent career criminal” means a defendant for whom the court must impose imprisonment pursuant to paragraph (4)(d), if it finds that:

1. The defendant has previously been convicted as an adult three or more times for an offense in this state or other qualified offense that is:

g. A felony violation of chapter 790 involving the use or possession of a firearm.

2. The defendant has been incarcerated in a state prison or a federal prison.

3. The primary felony offense for which the defendant is to be sentenced is a felony enumerated in subparagraph 1. and was committed on or after October 1, 1995, and:

a. While the defendant was serving a prison sentence or other sentence, or court-ordered or lawfully imposed supervision that is imposed as a result of a prior conviction for an enumerated felony; or

b. Within 5 years after the conviction of the last prior enumerated felony, or within 5 years after the defendant’s release from a prison sentence, probation, community control, control release, conditional release, parole, or court-ordered or lawfully imposed supervision or other sentence that is imposed as a result of a prior conviction for an enumerated felony, whichever is later.

4. The defendant has not received a pardon for any felony or other qualified offense that is necessary for the operation of this paragraph.

5. A conviction of a felony or other qualified offense necessary to the operation of this paragraph has not been set aside in any postconviction proceeding.

(e) “Qualified offense” means any offense, substantially similar in elements and penalties to an offense in this state, which is in violation of a law of any other jurisdiction, whether that of another state, the District of Columbia, the United States or any possession or territory thereof, or any foreign jurisdiction, that was punishable under the law of such jurisdiction at the time of its commission by the defendant by death or imprisonment exceeding 1 year.

(2) For the purposes of this section, the placing of a person on probation or community control without an adjudication of guilt shall be treated as a prior conviction.

(3)(a) In a separate proceeding, the court shall determine if the defendant is a habitual felony offender or a habitual violent felony offender. The procedure shall be as follows:

1. The court shall obtain and consider a presentence investigation prior to the imposition of a sentence as a habitual felony offender or a habitual violent felony offender.

2. Written notice shall be served on the defendant and the defendant’s attorney a sufficient time prior to the entry of a plea or prior to the imposition of sentence in order to allow the preparation of a submission on behalf of the defendant.

3. Except as provided in subparagraph 1., all evidence presented shall be presented in open court with full rights of confrontation, cross-examination, and representation by counsel.

4. Each of the findings required as the basis for such sentence shall be found to exist by a preponderance of the evidence and shall be appealable to the extent normally applicable to similar findings.

5. For the purpose of identification of a habitual felony offender or a habitual violent felony offender, the court shall fingerprint the defendant pursuant to s. 921.241.

6. For an offense committed on or after October 1, 1995, if the state attorney pursues a habitual felony offender sanction or a habitual violent felony offender sanction against the defendant and the court, in a separate proceeding pursuant to this paragraph, determines that the defendant meets the criteria under subsection (1) for imposing such sanction, the court must sentence the defendant as a habitual felony offender or a habitual violent felony offender, subject to imprisonment pursuant to this section unless the court finds that such sentence is not necessary for the protection of the public. If the court finds that it is not necessary for the protection of the public to sentence the defendant as a habitual felony offender or a habitual violent felony offender, the court shall provide written reasons; a written transcript of orally stated reasons is permissible, if filed by the court within 7 days after the date of sentencing. Each month, the court shall submit to the Office of Economic and Demographic Research of the Legislature the written reasons or transcripts in each case in which the court determines not to sentence a defendant as a habitual felony offender or a habitual violent felony offender as provided in this subparagraph.

(b) In a separate proceeding, the court shall determine if the defendant is a three-time violent felony offender. The procedure shall be as follows:

1. The court shall obtain and consider a presentence investigation prior to the imposition of a sentence as a three-time violent felony offender.

2. Written notice shall be served on the defendant and the defendant’s attorney a sufficient time prior to the entry of a plea or prior to the imposition of sentence in order to allow the preparation of a submission on behalf of the defendant.

3. Except as provided in subparagraph 1., all evidence presented shall be presented in open court with full rights of confrontation, cross-examination, and representation by counsel.

4. Each of the findings required as the basis for such sentence shall be found to exist by a preponderance of the evidence and shall be appealable to the extent normally applicable to similar findings.

5. For the purpose of identification of a three-time violent felony offender, the court shall fingerprint the defendant pursuant to s. 921.241.

6. For an offense committed on or after the effective date of this act, if the state attorney pursues a three-time violent felony offender sanction against the defendant and the court, in a separate proceeding pursuant to this paragraph, determines that the defendant meets the criteria under subsection (1) for imposing such sanction, the court must sentence the defendant as a three-time violent felony offender, subject to imprisonment pursuant to this section as provided in paragraph (4)(c).

(c) In a separate proceeding, the court shall determine whether the defendant is a violent career criminal with respect to a primary offense committed on or after October 1, 1995. The procedure shall be as follows:

1. Written notice shall be served on the defendant and the defendant’s attorney a sufficient time prior to the entry of a plea or prior to the imposition of sentence in order to allow the preparation of a submission on behalf of the defendant.

2. All evidence presented shall be presented in open court with full rights of confrontation, cross-examination, and representation by counsel.

3. Each of the findings required as the basis for such sentence shall be found to exist by a preponderance of the evidence and shall be appealable only as provided in paragraph (d).

4. For the purpose of identification, the court shall fingerprint the defendant pursuant to s. 921.241.

5. For an offense committed on or after October 1, 1995, if the state attorney pursues a violent career criminal sanction against the defendant and the court, in a separate proceeding pursuant to this paragraph, determines that the defendant meets the criteria under subsection (1) for imposing such sanction, the court must sentence the defendant as a violent career criminal, subject to imprisonment pursuant to this section unless the court finds that such sentence is not necessary for the protection of the public. If the court finds that it is not necessary for the protection of the public to sentence the defendant as a violent career criminal, the court shall provide written reasons; a written transcript of orally stated reasons is permissible, if filed by the court within 7 days after the date of sentencing. Each month, the court shall submit to the Office of Economic and Demographic Research of the Legislature the written reasons or transcripts in each case in which the court determines not to sentence a defendant as a violent career criminal as provided in this subparagraph.

(d)1. A person sentenced under paragraph (4)(d) as a violent career criminal has the right of direct appeal, and either the state or the defendant may petition the trial court to vacate an illegal sentence at any time. However, the determination of the trial court to impose or not to impose a violent career criminal sentence is presumed appropriate and no petition or motion for collateral or other postconviction relief may be considered based on an allegation either by the state or the defendant that such sentence is inappropriate, inadequate, or excessive.

2. It is the intent of the Legislature that, with respect to both direct appeal and collateral review of violent career criminal sentences, all claims of error or illegality be raised at the first opportunity and that no claim should be filed more than 2 years after the judgment and sentence became final, unless it is established that the basis for the claim could not have been ascertained at the time by the exercise of due diligence. Technical violations and mistakes at trials and sentencing proceedings involving violent career criminals that do not affect due process or fundamental fairness are not appealable by either the state or the defendant.

3. It is the intent of the Legislature that no funds, resources, or employees of the state or its political subdivisions be used, directly or indirectly, in appellate or collateral proceedings based on violent career criminal sentencing, except when such use is constitutionally or statutorily mandated.

(4)(a) The court, in conformity with the procedure established in paragraph (3)(a), may sentence the habitual felony offender as follows:

1. In the case of a life felony or a felony of the first degree, for life.

2. In the case of a felony of the second degree, for a term of years not exceeding 30.

3. In the case of a felony of the third degree, for a term of years not exceeding 10.

(b) The court, in conformity with the procedure established in paragraph (3)(a), may sentence the habitual violent felony offender as follows:

1. In the case of a life felony or a felony of the first degree, for life, and such offender shall not be eligible for release for 15 years.

2. In the case of a felony of the second degree, for a term of years not exceeding 30, and such offender shall not be eligible for release for 10 years.

3. In the case of a felony of the third degree, for a term of years not exceeding 10, and such offender shall not be eligible for release for 5 years.

(c)1. The court, in conformity with the procedure established in paragraph (3)(b), must sentence the three-time violent felony offender to a mandatory minimum term of imprisonment, as follows:

a. In the case of a felony punishable by life, to a term of imprisonment for life;

b. In the case of a felony of the first degree, to a term of imprisonment of 30 years;

c. In the case of a felony of the second degree, to a term of imprisonment of 15 years; or

d. In the case of a felony of the third degree, to a term of imprisonment of 5 years.

2. Nothing in this subsection shall prevent a court from imposing a greater sentence of incarceration as authorized by law.

(d) The court, in conformity with the procedure established in paragraph (3)(c), shall sentence the violent career criminal as follows:

1. In the case of a life felony or a felony of the first degree, for life.

2. In the case of a felony of the second degree, for a term of years not exceeding 40, with a mandatory minimum term of 30 years’ imprisonment.

3. In the case of a felony of the third degree, for a term of years not exceeding 15, with a mandatory minimum term of 10 years’ imprisonment.

(e) If the court finds, pursuant to paragraph (3)(a) or paragraph (3)(c), that it is not necessary for the protection of the public to sentence a defendant who meets the criteria for sentencing as a habitual felony offender, a habitual violent felony offender, or a violent career criminal, with respect to an offense committed on or after October 1, 1995, sentence shall be imposed without regard to this section.

(f) At any time when it appears to the court that the defendant is eligible for sentencing under this section, the court shall make that determination as provided in paragraph (3)(a), paragraph (3)(b), or paragraph (3)(c).

(g) A sentence imposed under this section shall not be increased after such imposition.

(h) A sentence imposed under this section is not subject to s. 921.002.

(i) The provisions of this section do not apply to capital felonies, and a sentence authorized under this section does not preclude the imposition of the death penalty for a capital felony.

(k)1. A defendant sentenced under this section as a habitual felony offender, a habitual violent felony offender, or a violent career criminal is eligible for gain-time granted by the Department of Corrections as provided in s. 944.275(4)(b).

2. For an offense committed on or after October 1, 1995, a defendant sentenced under this section as a violent career criminal is not eligible for any form of discretionary early release, other than pardon or executive clemency, or conditional medical release granted pursuant to s. 947.149.

3. For an offense committed on or after July 1, 1999, a defendant sentenced under this section as a three-time violent felony offender shall be released only by expiration of sentence and shall not be eligible for parole, control release, or any form of early release.

(5) In order to be counted as a prior felony for purposes of sentencing under this section, the felony must have resulted in a conviction sentenced separately prior to the current offense and sentenced separately from any other felony conviction that is to be counted as a prior felony.

(6) The purpose of this section is to provide uniform punishment for those crimes made punishable under this section, and to this end, a reference to this section constitutes a general reference under the doctrine of incorporation by reference.