
    Dino LEWIS, Appellant, v. The STATE of Florida, Appellee.
    No. 92-978.
    District Court of Appeal of Florida, Third District.
    March 9, 1993.
    Bennett H. Brummer, Public Defender, and Marti Rothenberg, Asst. Public Defender, for appellant.
    Robert A. Butterworth, Atty. Gen., and Francine Thomas, Asst. Atty. Gen., for ap-pellee.
    Before BARKDULL, HUBBART and LEVY, JJ.
   PER CURIAM.

This is an appeal by the defendant Dino Lewis from a trial court order denying the defendant’s motion to correct an illegal sentence under Fla.R.Crim.P. 3.800(a). We affirm the order under review, without prejudice to the defendant to file a motion to vacate judgment and sentence under Fla.R.Crim.P. 3.850 in the trial court, based on the following holdings. (1) The three-year mandatory minimum sentence imposed upon the defendant for armed robbery pursuant to Section 775.-087(2), Florida Statutes (1989), was illegal because the factual basis for the nolo contender e plea made at the time of the plea clearly shows, without dispute, that the defendant did not possess, either actually or constructively, the firearm which was used in the robbery, Whitehead v. State, 446 So.2d 194, 197 (Fla. 4th DCA 1984), rev. denied, 462 So.2d 1108 (Fla.1985); Reynolds v. State, 429 So.2d 1331, 1333 (Fla. 5th DCA 1983); Lawson v. State, 400 So.2d 1053, 1055 (Fla. 2d DCA 1981). (2) The three-year mandatory minimum sentence was, nonetheless, a vital part of a plea negotiation agreement entered into at trial between the defendant and the state. (3) Accordingly, the appropriate remedy for this illegal sentence is for the entire plea agreement to be set aside as having been based on an illegal term, the conviction and sentence for the two charged armed robberies vacated under Fla.R.Crim.P. 3.850, and the defendant’s not guilty plea reinstated [rather than the illegal portion of the plea agreement stricken as requested by the defendant under Fla.R.Crim.P. 3.800(a)], because the removal of this crucial term in the plea agreement vitiates the state’s consent to the remaining terms of the agreement. This is the appropriate result unless, of course, the state, at its option, consents to the original plea agreement without the three-year mandatory minimum sentence; in that event, only the sentence should be vacated under Fla.R.Crim.P. 3.850 and the defendant should then be resentenced to the originally imposed sentence, but without the illegal three-year mandatory minimum sentence. See Ford v. State, 595 So.2d 266 (Fla. 5th DCA 1992); Ruiz v. State, 537 So.2d 682 (Fla. 3d DCA 1989); Daniels v. Smith, 478 So.2d 110, 111 (Fla. 2d DCA 1985).

Affirmed as modified.  