
    Austin Page IVEY, Appellant, v. STATE of Florida, Appellee.
    No. BQ-258.
    District Court of Appeal of Florida, First District.
    Dec. 10, 1987.
    
      Michael E. Allen, Public Defender, and Kenneth L. Hosford, Asst. Public Defender, Tallahassee, for appellant.
    Robert A. Butterworth, Atty. Gen., and Patricia Conners, Asst. Atty. Gen., Tallahassee, for appellee.
   WIGGINTON, Judge.

Before us is an appeal from a guidelines sentence imposed pursuant to a plea agreement. We reverse.

By amended information, appellant was charged with armed robbery. A plea hearing was held at which time appellant withdrew his plea of not guilty and agreed to enter a guilty plea in return for the State’s stipulation that victim injury was no greater than slight for purposes of calculating appellant’s sentencing guidelines score. Appellant’s signed plea, waiver, and consent form likewise reflects that appellant agreed to plead guilty in exchange for the State’s stipulation of slight victim injury.

Consequently, seven points were added to appellant’s score which placed him in a category range of five and one-half to seven years’ incarceration. The trial court adjudicated appellant guilty and sentenced him within the recommended range to seven years’ imprisonment to be followed by a 3-year term of probation.

On appeal, appellant argues that the trial court erroneously included seven points for victim injury, thereby shifting appellant to the next higher cell, since victim injury does not constitute an element of the convicted offense of armed robbery. Toney v. State, 456 So.2d 559 (Fla. 2d DCA 1984). On the other hand, the State asserts that since defense counsel initiated the erroneous score by agreeing to allow her client to plead guilty on the condition that the State would stipulate the victim’s injury was slight, appellant may not now argue a position plainly inconsistent with his plea agreement.

Although appellant did not object to this point below, where the sentencing error produces an illegal sentence and is apparent from the record it may be raised on appeal without a contemporaneous objection. State v. Whitfield, 487 So.2d 1045 (Fla.1986) (points improperly added to scoresheet for victim injury was apparent from the record because the defendant had been convicted of aggravated assault, a crime not involving victim injury); Brown v. State, 508 So.2d 776 (Fla. 1st DCA 1987). Moreover, despite the fact that this sentence was imposed pursuant to a plea agreement, it is an illegal sentence and a trial court cannot impose an illegal sentence pursuant to a plea bargain. Williams v. State, 500 So.2d 501 (Fla.1986); see also Hoover v. State, 511 So.2d 629 (Fla. 1st DCA 1987). As the supreme court observed in Williams, “[a] defendant cannot by agreement confer on the court the authority to impose an illegal sentence.” 500 So.2d at 503. In the instant case, it cannot be argued that the error is harmless since absent the seven points scored for slight victim injury appellant would have a score falling within the next lower cell.

Accordingly, we reverse the sentence and remand the cause for resentenc-ing. However, while points for victim injury may not be included on the scoresheet, victim injury in some circumstances may be a legitimate reason for departure from the guidelines. Smith v. State, 507 So.2d 788 (Fla. 1st DCA 1987). Consequently, on remand, as the plea agreement went only to the scoring of victim injury, appellant should be given the opportunity to withdraw his plea and the trial court may consider whether there are clear and convincing reasons to deviate from the sentencing guidelines, provided the dictates of North Carolina v. Pearce, 395 U.S. 711, 89 S.Ct. 2072, 23 L.Ed.2d 656 (1969), are followed. Cf. Thompson v. State, 483 So.2d 1 (Fla. 2d DCA 1985).

BOOTH and THOMPSON, JJ., concur. 
      
      . Alternatively, the State argues that the supreme court has recently approved an amendment to rule 3.701 d.7., Florida Rules of Criminal Procedure, expressly allowing for the assessment of victim injury even where the injury is not an element of the crime for which the defendant has been convicted. The State maintains that this amended rule should apply to appellant. However, the State’s argument lacks merit as the proper rule to be applied is the one in effect at the time of the commission of the crime. State v. Miller, 512 So.2d 198 (Fla.1987).
     