
28 So.3d 929 (2010)
Gregory Lewis JORDAN, Appellant,
v.
The STATE of Florida, Appellee.
No. 3D09-831.
District Court of Appeal of Florida, Third District.
February 10, 2010.
*930 Gregory Lewis Jordan, in proper person.
Bill McCollum, Attorney General, and Nicholas A. Merlin, Assistant Attorney General, for appellee.
Before SHEPHERD, ROTHENBERG, and LAGOA, JJ.
ROTHENBERG, J.
Gregory Lewis Jordan appeals the denial of his motion under Florida Rule of Criminal Procedure 3.800(a), alleging that the sentences he received as a result of a negotiated plea were illegal because they exceeded the maximum sentences allowed under section 775.082, Florida Statutes (1987). Because we agree with Jordan, we reverse and remand for further proceedings consistent with this opinion.
Pursuant to a negotiated plea agreement, Jordan pled guilty in 1990 to a reduced charge of second degree murder with a deadly weapon (Count I), attempted robbery with a firearm (Count II), and attempted first degree murder (Count III) for crimes committed in 1988. He was sentenced to sixty years for Count I, thirty years for Count II, and sixty years for Count III. The sentences were ordered to be served concurrently, along with a three-year mandatory minimum sentence for possession of a firearm. In 2009, Jordan filed a rule 3.800 motion to correct illegal sentence alleging that the sentences he received for Counts I, II, and III are illegal because they exceed the statutory maximums allowed at the time. The trial court erred in denying Jordan's motion.
Section 775.082, Florida Statutes (1987), provides that a person may be punished as follows: for a life felony, "by a term of imprisonment for life or by a term of imprisonment not exceeding 40 years"; for a second degree felony, "by a term of imprisonment not exceeding 15 years"; and for a first degree felony, "by a term of imprisonment not exceeding 30 years." Accordingly, the maximum sentence Jordan could have received on Count I, a life felony, was forty years, and on Count II, a second degree felony, was fifteen years. The State properly concedes that Jordan's sentence for Count I should not have exceeded forty years and that his sentence for Count II "may not have been authorized."
Regarding Count III, we agree with Jordan that the sixty year sentence imposed by the trial court exceeded the statutory maximum. However, we disagree that the maximum sentence that could be imposed in Count III is thirty years, as Jordan contends. Attempted first degree murder with a firearm is a life felony. Section 782.04(1)(a) provides that first degree murder "constitutes a capital felony." Section 777.04 provides that if the attempted crime is a capital felony, "the person convicted is guilty of a felony *931 of the first degree." Based on the use of a firearm, the first degree felony is reclassified to a life felony pursuant to section 775.087. Accordingly, the maximum sentence allowable for Count III is forty years.
In summary, we find that the sentences that Jordan received for Counts I, II, and III are illegal. We, therefore, reverse the trial court's order denying Jordan relief. Upon remand, the State may elect whether to agree to the reduction of Jordan's sentences to the legal maximum sentences permitted by law or to allow Jordan to withdraw his plea and proceed to trial. See Tucker v. State, 864 So.2d 580, 581 (Fla. 2d DCA 2004) (holding that when a sentence is illegal, the State has the option of approving a corrected sentence or "going back to `square one' in the plea bargain process"); Bruno v. State, 837 So.2d 521, 522 (Fla. 1st DCA 2003) (quoting Williams v. State, 650 So.2d 1054, 1055 (Fla. 1st DCA 1995)) ("When a sentence is illegal, and such a sentence was the product [as here] of a negotiated plea agreement, the state has the option of either agreeing to the appellant's resentencing, or withdrawing from the plea agreement and proceeding to trial on the original charges."); Ford v. State, 595 So.2d 266, 266 (Fla. 5th DCA 1992) ("[T]he State shall not be bound by its plea bargain and may seek other sanctions" that reduce the sentence to a legal term, . . . "[o]r, the State may decline to accept the plea bargain, and both parties will approach the plea stage of this case at `square one.'").
Accordingly, we reverse the trial court's order denying Jordan relief under rule 3.800(a). Upon remand, the State has the option of allowing Jordan's sentences on each count to be reduced to the legal maximum or allowing Jordan to withdraw his plea and to proceed to trial on the original charges.
Reversed and remanded with instructions.
