
    David BELL, Appellant, v. STATE of Florida, Appellee.
    No. 1D00-3895.
    District Court of Appeal of Florida, First District.
    Oct. 9, 2001.
    
      Appellant, pro se.
    Robert A. Butterworth, Attorney General, Tallahassee, and James W. Rogers, Assistant Attorney General, for Appellee.
   PER CURIAM.

The appellant challenges an order of the trial court summarily denying his motion to correct an illegal sentence pursuant to Florida Rule of Criminal procedure 3.800(a). We conclude the summary denial was improper and reverse.

On March 19, 1997, the appellant pled guilty to one count of second-degree murder with a firearm. He was sentenced to 30 year’s’ incarceration. The appellant argues that his 30-year sentence was illegally imposed under the 1995 guidelines for an offense committed on November 13, 1996. He further alleges that under the 1994 guidelines, his sentencing range would have been limited to 156.3 months to 260.5 months’ incarceration. The appellant sought resentencing under the 1994 sentencing guidelines pursuant to Heggs v. State, 759 So.2d 620 (Fla.2000). The trial court denied the motion because the appellant was sentenced pursuant to a negotiated term in accordance with a plea agreement whereby the appellant escaped prosecution for first-degree murder in exchange for a lesser included offense of second-degree murder with a firearm.

When a negotiated plea agreement is not conditioned upon the imposition • of a sentence within a specific guideline range, improper scoring of the defendant’s scoresheet will not render the plea illegal unless the sentence exceeds the statutory maximum. See Dunenas v. Moore, 762 So.2d 1007 (Fla. 3d DCA 2000). However, if a plea agreement is conditioned upon receiving a sentence calculated with reference to the guidelines, and the sentence exceeds the 1994 guideline range, then the defendant is entitled to relief under Heggs. See Jones v. State, 781 So.2d 447 (Fla. 4th DCA 2001).

In this case, the appellant’s plea agreement states that “on the lesser charge of second-degree murder, I will be adjudicated guilty. There will be a sentencing hearing. My sentence will be within my guidelines which are 20.5 years to 34.2 years.... ” (Emphasis supplied.) Thus, the appellant’s agreement reflects that his sentence was conditioned upon the guidelines.

We thus conclude that the appellant has stated a facially sufficient claim for relief. However, the appellant is not entitled to simply be resentenced because his present sentence was the result of a plea bargain in which the appellant was permitted to plea to a lesser charge. On remand, the state shall have the option of agreeing to the resentencing, or else the plea will be vacated and trial will proceed on the original charges. See Williams v. State, 650 So.2d 1054 (Fla. 1st DCA 1995).

REVERSED and REMANDED.

MINER, WOLF and WEBSTER, JJ., concur. 
      
      . The window period in which the offense must have been committed runs from October 1, 1995, to May 24, 1997. See Trapp v. State, 760 So.2d 924 (Fla.2000).
     