
15 So.3d 879 (2009)
William Cecil BAXTER, Appellant,
v.
STATE of Florida, Appellee.
No. 5D08-3965.
District Court of Appeal of Florida, Fifth District.
July 31, 2009.
William C. Baxter, Carabelle, pro se.
No Appearance for Appellee.
LAWSON, J.
William Cecil Baxter appeals from the denial of his motion to correct an illegal sentence filed pursuant to Florida Rule of Criminal Procedure 3.800(a). We affirm the denial order in all respects except one. Baxter's seventeen-year sentence on the charge of possession of a firearm while engaged in a criminal offense[1] appears to exceed the maximum penalty allowed by law for this charge. The offense is a second degree felony. See § 790.07(2), Fla. Stat. (2006). As such, the penalty should not exceed fifteen years. See § 775.082(3)(c), Fla. Stat. (2006). Even though Baxter signed a plea agreement indicating that he would be sentenced on this charge as if it was a first degree felony, he could not legally agree to this sentence unless the charge was somehow enhanced or reclassified to a first degree felony, which does not appear to be the case on this limited record. See, e.g., Robbins v. State, 413 So.2d 840 (Fla. 3d DCA 1982).
Accordingly, we reverse that portion of the order on appeal addressing Baxter's *880 seventeen-year sentence for a violation of section 790.07(2), Florida Statutes, and remand with directions that the trial court either resentence Baxter on this charge or attach portions of the record demonstrating how the charge was legally enhanced or reclassified to a first degree felony. In all other respects, the trial court's order is affirmed.
REVERSED IN PART; AFFIRMED IN PART.
GRIFFIN and ORFINGER, JJ., concur.
NOTES
[1]  See § 790.07(2), Fla. Stat. (2006).
