
712 So.2d 786 (1998)
Ronald Eugene SIMS, Appellant,
v.
STATE of Florida, Appellee.
No. 98-00845.
District Court of Appeal of Florida, Second District.
June 12, 1998.
PER CURIAM.
Ronald Eugene Sims challenges the trial court's order denying his motion to correct an illegal sentence filed pursuant to Florida Rule of Criminal Procedure 3.800(a). We agree with Sims that the sentence imposed on his conviction for third-degree murder exceeds the statutory maximum; therefore, we vacate the sentence and remand for resentencing.
Sims was charged with burglary of a dwelling and attempted first-degree murder. The information alleged that Sims attempted to kill the victim by stabbing him. The jury convicted Sims of the lesser-included offenses of trespass and attempted third-degree murder. The jury found, on the verdict form, that the attempted third-degree murder conviction was "with a weapon." The trial court, in sentencing Sims on the attempted thirddegree murder conviction, enhanced the degree of felony from a third to a seconddegree felony pursuant to section 775.087(1), Florida Statutes (1987), based on Sims' use of a weapon during the commission of the offense. It found Sims to be a habitual offender and imposed a sentence of twenty years' imprisonment followed by ten years' probation. In his motion Sims claimed that the trial court improperly enhanced his sentence because the use of a weapon was an essential element of the offense of attempted third-degree murder and that his sentence is illegal as it exceeds the statutory maximum. This claim is cognizable in a rule 3.800(a) motion. See Vickers v. State, 630 So.2d 1229 (Fla. 2d DCA 1994).
Third-degree murder is the unpremeditated, unlawful killing of another by a person engaged in the commission of a felony other than certain specifically enumerated felonies. Because Sims was charged with attempted first-degree murder, the information did not specify the underlying felony upon which the attempted third-degree murder conviction was based. The jury was instructed, however, that to find Sims guilty of attempted third-degree murder, it must find the "killing occurred ... while the defendant was engaged in the commission of an *787 aggravated battery." The trial court defined aggravated battery to the jury as an intentional, nonconsensual touching or striking or intentional causing of bodily harm "and in such touching or striking or causing of bodily harm a deadly weapon was used."[1]
Section 775.087(1) mandates that the trial court enhance felonies one degree upward where the defendant used a weapon or firearm, except where the use of the weapon or firearm is an essential element of the offense. In Franklin v. State, 541 So.2d 1227 (Fla. 2d DCA 1989), the defendant was charged with second-degree murder and the jury convicted him of third-degree murder. The trial court enhanced his conviction from a second-degree felony to a first-degree felony based on his use of a weapon during the commission of the third-degree murder. The jury was instructed that the underlying felony on the lesser-included offense of third-degree murder was aggravated battery. The Franklin jury was further instructed, as was the jury in the present case, that to find that the defendant committed aggravated battery it must find that he used a deadly weapon. The court noted that the information for second-degree murder alleged that the defendant stabbed the victim with a broken bottle. It determined that this allegation coupled with the fact that the third-degree murder instruction required the jury to find that he used a deadly weapon to commit the aggravated battery, was "sufficient to reach the conclusion that [the defendant] was charged with a felony for which the use of a weapon was an essential element." Franklin, 541 So.2d at 1229. See also Pinkerton v. State, 534 So.2d 425 (Fla. 5th DCA 1988) (where defendant convicted of third-degree murder based on jury's finding that he committed the underlying felony of aggravated battery with a deadly weapon, trial court could not reclassify the third-degree murder conviction pursuant to section 775.087(1) because the use of a weapon was an essential element of the offense of third-degree murder).
Franklin is on "all fours" with the present case. The information in the present case alleged that Sims stabbed the victim, and his attempted third-degree murder conviction was based on the jury's finding that he committed aggravated battery with a deadly weapon. Accordingly, we vacate Sims' sentence on his attempted third-degree murder conviction and remand for resentencing within the statutory maximum for a third-degree felony.
THREADGILL, A.C.J., and PATTERSON and GREEN, JJ., concur.
NOTES
[1]  We note that this is not the standard jury instruction. Aggravated battery is defined as the intentional causing of great bodily harm; or the use of a weapon during the commission of a battery. See § 784.045, Florida Statutes (1987).

The State has the ability to charge a defendant under either or both theories. The trial court's instruction required the jury to find that Sims used a deadly weapon even if it found that Sims caused great bodily harm to the victim.
