
28 So.3d 70 (2009)
Gary Kenneth WILLIAMS, Appellant,
v.
STATE of Florida, Appellee.
No. 1D09-3384.
District Court of Appeal of Florida, First District.
December 8, 2009.
Rehearing Denied February 12, 2010.
Gary Kenneth Williams, pro se, Appellant.
Bill McCollum, Attorney General, Tallahassee, for Appellee.
PER CURIAM.
The appellant appeals the denial of his motion to correct illegal sentence filed pursuant to Florida Rule of Criminal Procedure 3.800(a). For the reasons discussed below, we affirm.
The appellant was convicted of aggravated battery on a person over 65 years of age and sentenced to an upward departure sentence of 30 years' imprisonment. The appellant filed a rule 3.800(a) motion asserting that his 30-year upward departure sentence is illegal because the trial court was required to sentence him within the guidelines range. He bases his argument on section 784.08(1), Florida Statutes (1997), which states in pertinent part: "A person convicted of an aggravated battery upon a person 65 years of age or older shall be sentenced pursuant to the sentencing guidelines."[1] (emphasis added). He *71 also relies on Wright v. State, 992 So.2d 911 (Fla. 2d DCA 2008), which held that under the plain meaning of that section, a trial court cannot impose an habitual felony offender (HFO) or habitual violent felony offender (HVFO) sentence; it must impose a guidelines sentence. Wright was based on cases which held that pursuant to section 893.135(1)(b)1.a, Florida Statutes, which included the same language as italicized above, a defendant convicted of trafficking in more than 28 grams but less than 200 grams of cocaine must be sentenced pursuant to the guidelines and could not be sentenced as an HFO. See, e.g., Clay v. State, 750 So.2d 153 (Fla. 1st DCA 2000).
It is clear that the appellant could not receive an HFO sentence for the crime of aggravated assault on a person over 65 years of age as the 1997 version of section 784.08 requires that the defendant be sentenced "pursuant to the guidelines." See Wright, 992 So.2d at 912; Clay v. State, 750 So.2d 153 (Fla. 1st DCA 2000) (HFO sentence for trafficking in cocaine illegal where statute requires that defendant convicted of trafficking "shall be sentenced pursuant to the sentencing guidelines"). However, in this case the appellant was not sentenced as an HFO, but rather, was given an upward departure sentence. The issue here is whether an upward departure sentence is still a "guidelines sentence" as that term is used in section 784.08, Florida Statutes (1997).
The legislature permitted upward departures from the guidelines if the trial court found certain aggravating factors. See § 921.0016, Fla. Stat. (1997). The legislature gave the trial court that power in the section pertaining to the guidelines. Id. Therefore, a "departure" sentence is still a "guidelines sentence," as it is governed by the guidelines.[2] Upward departure sentences are distinguishable from an HFO or HVFO sentences because the latter are specifically exempted from the guidelines. Cf. § 775.084(4)(g), Fla. Stat. (1997) (a habitual offender sentence is not subject to the guidelines provisions of section 921.001). Thus, we hold that the trial court could properly impose an upward departure sentence in this case.
AFFIRMED.
BARFIELD, CLARK, and ROWE, JJ., concur.
NOTES
[1]  Section 784.08 no longer requires that the appellant be sentenced pursuant to the guidelines or the Criminal Punishment Code. See 1999 Fla. Laws, ch. 99-188, § 5, 1051. However, the appellant committed his crime in July of 1998. Thus, the 1997 version of the statute applies. Green v. State, 907 So.2d 489, 502 (Fla.2005) (holding that a defendants sentence is controlled by the law in effect at the time he committed the offense).
[2]  The statute does not require a sentence "within" the guidelines.
