
599 So.2d 179 (1992)
Tracy Bernard WRIGHT, Appellant,
v.
STATE of Florida, Appellee.
No. 91-00847.
District Court of Appeal of Florida, Second District.
April 29, 1992.
*180 James Marion Moorman, Public Defender, Bartow, and Allyn Giambalvo, Asst. Public Defender, Clearwater, for appellant.
Robert A. Butterworth, Atty. Gen., Tallahassee, and Sue R. Henderson, Asst. Atty. Gen., Tampa, for appellee.
PARKER, Judge.
Tracy Wright appeals his habitual offender sentence, alleging that his constitutional right against double jeopardy has been violated. We agree and direct the trial court to reinstate its original sentence.
The state charged Wright with arson. The state filed a notice of intent to seek enhancement as a habitual violent felony offender. Following a jury verdict of guilty, the state prepared a sentencing guidelines scoresheet which showed a permitted range of seven to seventeen years. The trial court decided not to treat Wright as a habitual offender and imposed a sentence of twelve years which was consecutive to Wright's other sentences.
Subsequently, the state filed a motion to correct an illegal sentence and, relying upon State v. Allen, 573 So.2d 170 (Fla. 2d DCA 1991), argued that habitualization was mandatory in every case where the defendant met the statutory criteria. The trial court agreed with the state's interpretation of Allen, vacated Wright's original sentence, and ordered a presentence investigation. The new guidelines scoresheet reflected a permitted range of twenty-seven years to life. The trial court orally adjudged Wright to be a habitual violent felony offender[1] and sentenced Wright to life.
The issue in this appeal is whether Wright's first sentence was a legal sentence. If it was, double jeopardy prevents the trial court from imposing a harsher sentence at a subsequent hearing. See Williams v. State, 553 So.2d 729 (Fla. 2d DCA 1989); Daniels v. State, 513 So.2d 244 (Fla. 2d DCA 1987).
Allen held that if a defendant is adjudged to be a habitual offender, then the trial court must impose the sentence set forth in the habitual offender statute. This court, however, receded from Allen in King v. State, 597 So.2d 309 (Fla. 2d DCA 1992) (en banc). King concluded that if the defendant's prior record qualified the defendant as a habitual offender, the trial court must, as a ministerial function, declare the defendant to be a habitual offender. As to sentencing, King stated:
We, therefore, conclude that a trial judge retains the discretion to exercise leniency in regard to habitual felony offenders in two ways. First, using subsection 775.084(4)(c),[[2]] the trial judge may simply decide not to sentence the defendant as an habitual felony offender. Second, having determined to sentence the defendant as an habitual felony offender, the trial judge has the discretion to sentence ... an habitual violent felony offender to any term of years not less *181 than the minimum mandatory nor more than the maximum sentence provided in subsections 775.084(4)(b)(1), (2) and (3).[[3]]
King, 597 So.2d at 314-15 (emphasis in original) (footnotes added).
Applying King to this situation, the trial court was required to declare Wright a habitual violent felony offender because it was conceded that Wright met the statutory criteria. Then the trial court had the discretion of whether to impose a habitual violent felony offender sentence. It is clear from the trial court's statements at the original sentencing hearing that it did not desire to sentence Wright as a habitual violent felony offender; therefore, the trial court could sentence Wright pursuant to subsection 775.084(4)(c), Florida Statutes (1989). Under this alternative, the trial court was required to impose a sentence in compliance with the sentencing guidelines or departure rules. See King, 597 So.2d at 315-16. The trial court's original sentence of twelve years was within the permitted sentencing range and, thus, was not illegal. The trial court, therefore, erred in vacating the legal sentence and then imposing a harsher sentence. See Williams.
We reverse and remand to the trial court to vacate Wright's sentence of life with directions to declare Wright a habitual violent felony offender, to show this designation on the judgment and sentence, and to sentence him to the initial sentence of twelve years' imprisonment.
Reversed and remanded with directions.
CAMPBELL, A.C.J., and McDONALD, RANDALL G., Associate Judge, concur.
NOTES
[1]  We note that the trial judge did not check the habitual offender box on the judgment and sentence.
[2]  This subsection provides:

If the court decides that imposition of sentence under this section is not necessary for the protection of the public, sentence shall be imposed without regard to this section. At any time when it appears to the court that the defendant is a habitual felony offender or a habitual violent felony offender, the court shall make that determination as provided in subsection (3).
§ 775.084(4)(c), Fla. Stat. (1989).
[3]  These subsections provide:

(b) The court, in conformity with the procedure established in subsection (3), may sentence the habitual violent felony offender as follows:
1. In the case of 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.
§ 775.084(4)(b)(1)-(3), Fla. Stat. (1989).
