
536 So.2d 364 (1988)
William E. GOLDBERG, Appellant,
v.
STATE of Florida, Appellee.
No. 88-1450.
District Court of Appeal of Florida, Second District.
December 28, 1988.
*365 James Marion Moorman, Public Defender and Andrea Steffen, Asst. Public Defender, Bartow, for appellant.
Robert A. Butterworth, Atty. Gen., Tallahassee, and Robert J. Landry, Asst. Atty. Gen., Tampa, for appellee.
THREADGILL, Judge.
Appellant contends that the trial court erred in sentencing him beyond the terms of his plea agreement without giving him an opportunity to withdraw his plea. We agree.
When a negotiated plea agreement cannot be honored, the defendant may withdraw his plea and the trial court has an affirmative duty to so advise the defendant. Perry v. State, 510 So.2d 1083 (Fla. 2d DCA 1987); Ben v. State, 440 So.2d 501 (Fla. 2d DCA 1983); Kiefer v. State, 295 So.2d 688 (Fla. 2d DCA 1974).
Here, all parties anticipated a guidelines sentence of probation based on the appellant's representation that he had no substantial prior criminal record. When a presentence investigation revealed an extensive prior record, the court refused to honor the plea agreement for probation and sentenced the appellant to the presumptive guidelines sentence of five years on each count. The appellant should have been informed that he could withdraw his guilty plea. Because he was not given an opportunity to do so, we reverse and remand with directions that he be allowed to withdraw the plea.
REVERSED AND REMANDED.
SCHEB, A.C.J., and PARKER, J., concur.
