
976 So.2d 639 (2008)
Adam Free SOUSA, Appellant,
v.
STATE of Florida, Appellee.
No. 2D07-2664.
District Court of Appeal of Florida, Second District.
March 7, 2008.
Adam Free Sousa, pro se.
Bill McCollum, Attorney General, Tallahassee, and John M. Klawikofsky, Assistant Attorney General, Tampa, for Appellee.
ALTENBERND, Judge.
Adam Free Sousa appeals the trial court's order denying his motion to correct illegal sentences pursuant to Florida Rule of Criminal Procedure 3.800(a). We reverse the order and remand with instructions to reduce Mr. Sousa's two consecutive sentences of fifty years' imprisonment to two consecutive terms of no more than thirty years' imprisonment.
Mr. Sousa shot and seriously wounded two men at a dog track in Bonita Springs, Florida, on December 14, 1999. As a result, he was charged with two counts of attempted second-degree murder and aggravated assault with a firearm. He was *640 found guilty as charged in 2001. The trial court sentenced Mr. Sousa to two consecutive sentences of fifty years' imprisonment, each containing a twenty-five-year mandatory minimum term, for the two counts of attempted second-degree murder, and an additional consecutive five years' imprisonment with a three-year mandatory minimum term for the aggravated assault.
When Mr. Sousa appealed to this court, he raised six issues on appeal. This court's opinion affirmed on all issues except for the argument claiming that the fifty-year terms under the 10/20/life statute needed to be concurrent rather than consecutive. Sousa v. State, 868 So.2d 538, 540 (Fla. 2d DCA 2003).[1] On review by the supreme court, this court's opinion was reversed as to this sentencing issue. State v. Sousa, 903 So.2d 923, 927 (Fla. 2005). Accordingly, on remand, Mr. Sousa's total sentence of 105 years' imprisonment with a fifty-three-year mandatory minimum term was reinstated.
Mr. Sousa then filed a motion to correct an illegal sentence pursuant to rule 3.800(a), arguing that his fifty-year terms of imprisonment for attempted second-degree murder were illegal. As explained later in this opinion, the trial court denied this motion. Despite this denial, Mr. Sousa has solid support for his argument. Second-degree murder is a first-degree felony, punishable by life imprisonment. § 782.04(2), Fla. Stat. (1999). Attempted second-degree murder is thus a second-degree felony, punishable by no more than fifteen years' imprisonment. §§ 777.04(4)(c), 775.082(3)(c), Fla. Stat. (1999). Because Mr. Sousa was charged with committing these crimes while using a firearm, the offense was reclassified as a first-degree felony. § 775.087(1)(b). The maximum term of imprisonment for a reclassified first-degree felony, without some special sentencing enhancement, is thirty years' imprisonment. § 775.082(3)(b).
Because Mr. Sousa clearly discharged his firearm during the commission of both of these crimes, causing great bodily harm to his victims,[2] he was subject to section 775.087(2)(a)(3) of the 10/20/life statute, which required that he be sentenced "to a minimum term of imprisonment of not less than 25 years and not more than a term of imprisonment of life in prison." It could be argued that the language of this statute overrides the language in section 775.082(3)(b) that provides for a thirty-year sentence. The case law, however, interprets these statutes in favor of the defendant, so that the maximum term of years is thirty. See Yasin v. State, 896 So.2d 875 (Fla. 5th DCA 2005); Badia v. State, 770 So.2d 300 (Fla. 3d DCA 2000); see also Sanders v. State, 912 So.2d 1286, 1292 (Fla. 2d DCA 2005) (describing maximum penalty in appendix to opinion).
In his direct appeal, Mr. Sousa argued that his fifty-year terms of imprisonment were illegal and cited the Third District's decision in Badia. In response, the State argued that the issue was unpreserved and that Mr. Sousa should have filed a motion pursuant to rule 3.800(b) to correct this error. Although this court's prior opinion in Sousa, 868 So.2d 538, contains no discussion of this issue, lack of preservation *641 was the only ground upon which we could have affirmed the fifty-year sentences. It is clear that this court never ruled on the merits of Mr. Sousa's unpreserved sentencing error and that we did not intend to foreclose postconviction review of these sentences if the error rendered them illegal.
When the trial court was considering Mr. Sousa's motion to correct illegal sentence, it entered an order that granted his motion. The State then filed a motion to reconsider the order, arguing that Mr. Sousa could not raise this issue by motion under rule 3.800(a) because he had raised and lost the issue on direct appeal in this court. The State filed a copy of Mr. Sousa's brief on direct appeal to demonstrate that he had raised the issue, but it neglected to file its own brief arguing that the issue was not preserved for review on direct appeal. Thus, the trial court denied Mr. Sousa's motion because it understandably believed that this court had already reviewed and rejected his argument.
We conclude that the merits of this issue were never addressed by this court or the supreme court. Under the controlling law, Mr. Sousa's fifty-year sentences are illegal. Accordingly, we reverse the order on appeal and remand with instructions to the trial court to resentence Mr. Sousa to a term of years for each of these offenses that does not exceed the statutory maximum of thirty years' imprisonment. Nothing in this opinion should be interpreted to affect the mandatory minimum terms, totaling fifty-three years' imprisonment, or the sentence for aggravated assault.
Reversed and remanded.
SILBERMAN and LaROSE, JJ., Concur.
NOTES
[1]  See § 775.087(2)(a)(3), Fla. Stat. (1999) (requiring sentence of no less than twenty-five years and not more than life if defendant discharges a firearm and causes great bodily harm during commission of an enumerated felony).
[2]  Although the information in this case could have alleged the great bodily harm basis for enhanced sentencing in greater detail, there is no question that his offenses qualified for treatment under these statutory provisions and that any question about the application of the statute to this case cannot be raised at this late stage in these proceedings under a theory that his sentences are illegal.
