
    Stanley Lynn SEDELL, Appellant, v. STATE of Florida, Appellee.
    Case No. 2D16-428
    District Court of Appeal of Florida, Second District.
    Opinion filed August 18, 2017.
    
      Ita M. Neymotin, Regional Counsel, Second District, and Joseph Thye Sexton, Assistant Regional Counsel, Office of Criminal Conflict and Civil Regional Counsel, Bartow, for Appellant.
    Pamela Jo Bondi, Attorney General, Tallahassee, and Tonja Rene Vickers, Assistant Attorney General, Tampa, for Appel-lee.
   SILBERMAN, Judge.

Stanley Lynn Sedell appeals the order denying his motion to correct his illegal sentence filed pursuant to Florida Rule of Criminal Procedure 3.800(a) and (b). Based on this court’s opinion in Parks v. State, 223 So.3d 380, 2017 WL 2615844 (Fla. 2d DCA June 16, 2017) (en banc), which recedes from the cases that the trial court relied upon in denying relief, we reverse the trial court’s order and remand for further proceedings.

Pursuant to a negotiated plea agreement Sedell was sentenced on three counts, with the charges reduced on counts two and three. He now challenges his sentences on counts two and three to thirteen years in prison to be followed by ten years of probation. Sedell and the State agree that Sedell’s sentences for the second-degree felonies in counts two and three are illegal because they exceed the statutory maximum of fifteen years.

In its order denying the motion, the postconviction court acknowledged that Se-dell cannot agree to an illegal sentence pursuant to a negotiated plea. See McDuffie v. State, 946 So.2d 99, 100 (Fla. 2d DCA 2006). But the postconviction court determined that the motion was improperly filed under either rule 3.800(a) or (b) and that the motion should have been filed pursuant to rule 3.850, concluding that Se-dell must seek to withdraw from the plea agreement. In doing so, the postconviction court relied upon Dominguez v. State, 98 So.3d 198 (Fla. 2d DCA 2012), and Nedd v. State, 855 So.2d 664 (Fla. 2d DCA 2003). In Parks, this court receded from those cases “to the extent that they can be read as requiring a challenge to a sentence that was imposed pursuant to a plea agreement and exceeds the statutory maximum to be brought only under rule 3.850.” Parks, 223 So.3d at 383.

Like the defendant in Parks, Sedell had entered into a negotiated plea agreement and sought relief from an illegal sentence via rule 3.800(a) when the time to file a motion under rule 3.850 had expired. See 223 So.3d at 381. The Parks opinion relies upon another line of cases to grant relief under rule 3.800. See Armstrong v. State, 145 So.3d 952 (Fla. 2d DCA 2014); McDuffie, 946 So.2d 99; Lang v. State, 931 So.2d 922 (Fla. 2d DCA 2005). Based on these cases, a defendant is entitled to re-lief on a rule 3.800(a) motion when an illegal sentence results from a negotiated plea. See Armstrong, 145 So.3d at 952; McDuffie, 946 So.2d at 100; Lang, 931 So.2d at 922. In that situation, the postcon-viction court should resentence the defendant within the statutory maximum if the State agrees to the resentencing; if the State does not agree, then the court must allow the defendant to withdraw his plea. See Parks, 223 So.3d at 382-83; Armstrong, 145 So.3d at 952; McDuffie, 946 So.2d at 100; Lang, 931 So.2d at 922.

Therefore, based on Parks, we reverse the postconviction court’s order. On remand, the court should impose sentences on counts two and three within the; statutory maximum of fifteen years if the State agrees to resentencing. If the State does not agree, then Sedell should be permitted to withdraw his plea.

Reversed and remanded.

CRENSHAW and SLEET,' JJ., Concur. 
      
      . Because no appeal was pending and the motion was filed outside the time to file a notice of appeal, rule 3.800(b) is not applicable.
     