
576 So.2d 441 (1991)
Torance A. EDWARDS, Appellant,
v.
STATE of Florida, Appellee.
No. 90-2008.
District Court of Appeal of Florida, Fourth District.
March 27, 1991.
Richard L. Jorandby, Public Defender, and Anthony Calvello, Asst. Public Defender, West Palm Beach, for appellant.
Robert A. Butterworth, Atty. Gen., Tallahassee, and Sylvia H. Alonso, Asst. Atty. Gen., West Palm Beach, for appellee.
PER CURIAM.
Appellant appeals his sentence of fifty years under the habitual offender statute. We reverse and remand.
Appellant, a drug addict with no history of participation in any drug program, was charged by information with robbery, battery on a police officer, and resisting arrest with violence. He was also charged by information with attempted robbery for a separate incident. On May 8, 1990, appellant negotiated a settlement in which he was to be sentenced to nine years as an habitual felony offender.
The record shows that appellant was advised by the trial court that whether he would be favorably considered for pre-detention release would be considered after appellant's plea; so appellant understood his plea was in no way dependent upon the trial court's granting his request for such release.
On the other hand, it was made very clear to appellant that if he was favorably considered for pre-detention release and failed to appear, the trial court would maximize the sentences to fifty years.
Appellant's status as an habitual offender was clearly discussed at the May 8 hearing; but the required written notice for sentencing as an habitual offender was not provided to him at that time. Thus, any sentencing over the nine years to which he agreed was not noticed as required by the habitual offender statute.
Appellant failed to appear at the sentencing hearing on May 22, 1990. He had been arrested for loitering and resisting arrest *442 without violence on May 20, 1990. Although released on May 21, 1990, one day prior to the hearing at which his attendance was mandated, appellant thought he had already missed the hearing because he confused the date of the hearing.
Appellant surrendered himself on May 29, 1990. At a hearing on June 21, 1990, the state provided appellant with a written notice of intent to habitualize. The trial court sentenced him at that time to a total of fifty years under the habitual offender statute. Appellant appeals this sentence.
Section 775.084(3)(b), Florida Statutes (Supp. 1988), provides that written notice must be served on the defendant and his counsel a sufficient time prior to imposition of a sentence so as to allow preparation of a submission on the defendant's behalf. If no advance written notice is provided, a sentence as an habitual offender is illegal. Grubbs v. State, 412 So.2d 27 (Fla. 2d DCA 1982). See also Nunziata v. State, 561 So.2d 1330 (Fla. 5th DCA 1990) (no advance written notice of state's intent to seek enhancement of sentence in accordance with statute, any subsequent habitual offender enhancement is illegal; lack of harm to defendant not the test).
The state's contention that appellant was not surprised by the classification is irrelevant because lack of harm to the defendant is not the test used. Nunziata, 561 So.2d at 1331; see also Sweat v. State, 570 So.2d 1111 (Fla. 5th DCA 1990) (failure to serve advance written notice of state's intent to seek enhanced sentencing constitutes reversible error; defendant need NOT demonstrate harm). Accordingly, we agree with appellant that the written notice provided him was legally insufficient as to any term over nine years.
To sum up, if the trial court sentenced appellant to fifty years as an habitual offender, such sentence was illegal because he did not receive the required advance written notice. If the fifty years is considered a departure sentence, it is also illegal because no clear and convincing reason for departure supports it. First, habitual offender status is an insufficient ground for departure from the guidelines. Allowing it to be sufficient would be a way of circumventing due process requirements of the habitual offender statute as amended in 1988. Second, failing to appear, in and of itself, does not constitute a clear and convincing reason to depart from the guidelines. See Williams v. State, 500 So.2d 501 (Fla. 1986). Cf. Quarterman v. State, 527 So.2d 1380 (Fla. 1988) (departure permissible where failure to appear is legitimate and uncoerced condition of plea).
Further, we note that at the June 21 hearing, appellant was not advised by counsel of any right to try to withdraw his plea; thus this case is distinguishable from Brimmer v. State, 462 So.2d 29 (Fla. 1st DCA 1984).
On remand, given all of the circumstances, appellant shall have the opportunity to withdraw his plea. Should appellant elect not to do so, the trial court is not restricted to the negotiated nine-year sentence; but any sentence in excess thereof must comply with all requirements of the habitual offender statute and those affecting departure from the guidelines. The trial court is also not restricted from considering, adjudicating and sentencing appellant for contempt, arising out of his failure to appear on May 22.
DOWNEY, GLICKSTEIN and GARRETT, JJ., concur.
