Jerry Sheppard appeals the summary denial of his motion to correct an illegal sentence filed pursuant to Florida Rule of Criminal Procedure 3.800(a). Sheppard was found guilty of attempted second-degree murder with a firearm. By special verdict, the jury also found that Sheppard actually possessed and discharged a firearm, inflicting great bodily harm upon the victim. Sheppard was sentenced to an overall term of thirty-five years in prison with a twenty-five-year mandatory minimum.
Sheppard claims that his conviction for attempted second-degree murder with a firearm, which was reclassified as a first-degree felony under section 775.087(l)(b), Florida Statutes (2006), based upon the jury’s finding regarding the firearm, is subject to a sentence not to exceed thirty years under section 775.082(3)(b). Sheppard argues that his current overall sentence of thirty-five years’ imprisonment *149exceeds the statutory maximum and is illegal. We agree and reverse for resentenc-ing.
Although the trial court had the discretion to impose a mandatory minimum of up to life in prison, the court chose to impose a mandatory minimum term that was less than the thirty-year statutory maximum for Sheppard’s offense. Having done so, the court had no discretion to exceed the statutory maximum of thirty years. The postconviction court’s interpretation of Mendenhall v. State, 999 So.2d 665, 667 (Fla. 5th DCA 2008), approved, 48 So.3d 740 (Fla.2010), in denying the claim is incorrect.
In Mendenhall, the defendant was sentenced to thirty-five years in prison with a thirty-five-year mandatory minimum for second-degree murder with a firearm. Finding the sentence legal, the supreme court held that “the trial court has discretion under section 775.087(2)(a)(3) to impose a mandatory minimum of twenty-five years to life, even if that mandatory minimum exceeds the statutory maximum [of thirty years] provided for in section 775.082.” Mendenhall, 48 So.3d at 742. The court reasoned that although the thirty-five-year sentence for a first-degree felony exceeded the thirty-year maximum under section 775.082, such a sentence was mandated by section 775.087(2)(c). Mendenhall, 48 So.3d at 748 (“Section 775.087(2)(e) makes reference to section 775.082 and states that the mandatory minimum, when it exceeds the statutory maximum, must be imposed.”). Mendenhall’s sentence beyond the statutory maximum was proper because the trial court imposed the mandatory sentence under section 775.087(2)(a)(3), not because the statutory maximum was changed to a range of twenty-five years to life upon the jury’s finding that he discharged a firearm causing great bodily harm. See McLeod v. State, 52 So.3d 784, 786 (Fla. 5th DCA 2010); Wooden v. State, 42 So.3d 837, 837 n. 1 (Fla. 5th DCA), review denied, 51 So.3d 466 (Fla.2010). Section 775.087(2)(a)(3) does not change the statutory maximum to life in prison for all qualifying offenses when a defendant is found to have discharged a firearm causing great bodily harm. See McLeod, 52 So.3d at 786; Wooden, 42 So.3d at 837.
Here, because the jury found that Sheppard’s discharge of a firearm inflicted great bodily harm, the mandatory minimum range under section 775.087(2)(a)(3) was twenty-five years to life. See Mendenhall, 48 So.3d at 742. However, “ ‘once the trial court imposed the minimum mandatory sentence of twenty-five years, it could not exceed the thirty[-]year maximum penalty for a first[-]degree felony under section 775.082(3)(b).’ ” McLeod, 52 So.3d at 786 (quoting Wooden, 42 So.3d at 837) (reversing the defendant’s life sentence with a twenty-five-year mandatory minimum for attempted second-degree murder with a firearm because the sentence improperly exceeded the statutory maximum under section 775.082(3)(b)). The postconviction court incorrectly concluded that the jury’s special verdict exposed Sheppard to an overall maximum sentence of life imprisonment under sections 775.087(2)(a)(3) and 775.082(3)(b). Sheppard’s thirty-five-year sentence im-permissibly exceeds the thirty-year statutory maximum under section 775.082(3)(b) and is therefore illegal.
Accordingly, we reverse the order of the postconviction court and remand for resen-tencing.
Reversed and remanded.
WALLACE, MORRIS, and BLACK, JJ., Concur.