
559 So.2d 1304 (1990)
STATE of Florida, Appellant,
v.
Dwight VIELE, Appellee.
No. 89-1701.
District Court of Appeal of Florida, Fourth District.
April 25, 1990.
*1305 Robert A. Butterworth, Atty. Gen., Tallahassee, and Sylvia H. Alonzo, Asst. Atty. Gen., West Palm Beach, for appellant.
R.H. Bo Hitchcock of Hitchcock & Cunningham, P.A., Fort Lauderdale, for appellee.
PER CURIAM.
The issue which we address is whether a trial court can modify a negotiated sentence and resentence contrary to an agreed upon plea bargain. The defendant acquiesced to a seven-year term because he thought he would receive gain time. He relied on his trial attorney for this assumption. Since his plea was based on a material mistake of law, the plea was invalid and the trial judge modified it. The state maintains that Jolly v. State, 392 So.2d 54 (Fla. 5th DCA 1981) controls and the modified judgment and sentence should be set aside. We agree and reverse.
In Jolly, the defendant pleaded guilty to shooting into an occupied vehicle upon the understanding that the other counts would be nolle prossed and a minimum three-year sentence would be imposed. However, shooting into an occupied vehicle is not one of the enumerated offenses for imposition of the three-year minimum sentence, so the plea was invalid. Notwithstanding, the appellate court stated that the trial court erred in resentencing the defendant without the state's approval. The Fifth District remarked:
Only a new plea negotiation or a trial can remedy the problem at this point. To let the plea and judgment stand would give the defendant the benefits of his bargain  i.e., a three-year sentence cap and dismissal of the other charge  and would deny the state what it bargained for: a mandatory three-year sentence.
* * * * * *
If the plea negotiation is not binding upon the defendant, then it is not binding upon the state.
Id. at 56.
Despite the foregoing authority, the defendant cites Keller v. State, 432 So.2d 672 (Fla. 5th DCA 1983); however, Keller does not stand for the proposition that, without the state's approval, a trial court can resentence in contravention of a plea bargain.
REVERSED AND REMANDED.
HERSEY, C.J., and LETTS and GUNTHER, JJ., concur.
