We find no merit in appellant’s challenges to his conviction for possession of cocaine. However, the State concedes that the trial court erroneously applied the amended habitual offender statute, chapter 88-131, Laws of Florida, to an offense committed before its effective date.
The State points out that this error was not brought to the attention of the sentencing judge, who apparently considered this to be a case in which the sentencing guidelines did not apply because of the amended statute, and requests that the case be remanded to the trial court for resentencing, citing Roberts v. State, 547 So.2d 129 (Fla.1989).
Appellant’s conviction is AFFIRMED, but his sentence is REVERSED and the case is REMANDED to the trial court for resentencing. If the court finds it appropriate, it may sentence appellant as an habitual offender under section 775.084, Florida Statutes (1987), and may impose a sentence beyond the sentencing guidelines recommended range if valid contemporaneous written reasons for departure are given.
BOOTH and JOANOS, JJ., concur.