
375 So.2d 1132 (1979)
Edward R. RICHMOND, Appellant,
v.
STATE of Florida, Appellee.
No. OO-165.
District Court of Appeal of Florida, First District.
October 4, 1979.
Rehearing Denied November 7, 1979.
Edward R. Richmond, pro se, for appellant.
No Appearance by appellee.
PER CURIAM.
Appellant pled nolo contendere to attempted burglary, attempted assault, and assault on a police officer. In exchange for his plea, he understood there was an agreement between the state and himself that he would receive concurrent five-year sentences. At the sentencing hearing, the trial judge stated he would impose the agreed upon sentence. At the very end of the hearing, however, the state attorney called the judge's attention to the fact that Section 775.087, Florida Statutes (1977), imposes a minimum three-year sentence for possession of a firearm during the commission of a felony. At that point, the trial judge *1133 said he would impose the concurrent five-year sentences, but that appellant would have to serve a mandatory minimum of three years in prison.
Appellant filed a challenge to his sentence under Rule 3.850, Florida Rules of Criminal Procedure, asserting that he agreed to a five-year sentence, not a five-year sentence with a mandatory three years in prison. His motion was denied and he appealed to this court. We hold that the trial court should have given appellant an opportunity to withdraw his plea. Norris v. State, 343 So.2d 964 (Fla. 1st DCA 1977).
We vacate appellant's plea because the sentence was not what he bargained for, and remand to the trial court for further proceedings consistent with this opinion.
MILLS, C.J., and McCORD and SHIVERS, JJ., concur.
