
741 So.2d 1207 (1999)
Tracy RAINEY, Appellant,
v.
STATE of Florida, Appellee.
No. 96-4908.
District Court of Appeal of Florida, First District.
September 22, 1999.
Nancy A. Daniels, Public Defender; and P. Douglas Brinkmeyer, Assistant Public Defender, Tallahassee, for appellant.
Robert A. Butterworth, Attorney General; and Trina Kramer, Assistant Attorney General, Tallahassee, for appellee.
BROWNING, J.
Tracy Rainey appeals a 20-year habitual felony offender prison sentence imposed by the trial court in accordance with his negotiated plea of guilty. Rainey contends that his sentence is "illegal" under the definition set forth in State v. Mancino, 714 So.2d 429, 433 (Fla.1998), and therefore constitutes fundamental error under Nelson v. State, 719 So.2d 1230, 1233 (Fla. 1st DCA 1998) (gen. div. en banc), and Stanford v. State, 706 So.2d 900 (Fla. 1st DCA 1998). We vacate Rainey's habitual felony offender sentence and remand the case for further proceedings consistent with the principles of fairness to both sides set forth in Williams v. State, 650 So.2d 1054 (Fla. 1st DCA 1995), and Forshee v. State, 579 So.2d 388 (Fla. 2d DCA 1991).
Rainey was charged with knowingly selling, purchasing, manufacturing, delivering, or bringing into the State, or knowingly being in actual or constructive possession of, 28 grams or more of cocaine or a mixture containing cocaine, in violation of section 893.135(1)(b)1.a., Florida Statutes (1995). The State filed notice of intent to seek habitualization. Rainey signed a negotiated written plea of guilty of trafficking in cocaine. At the plea hearing, defense *1208 counsel announced the guilty plea, with the understanding that Rainey would be habitualized and sentenced to 20 years in prison. Rainey verbally acknowledged that he had read and understood everything in the plea agreement, knew what rights he was foregoing, and was aware of the attendant sentence and mandatory fine. The trial court accepted the plea as knowingly, intelligently, and voluntarily entered. The State offered proof of the requisite prior felony convictions, and the trial court adjudicated Rainey guilty and sentenced him, as an habitual felony offender, to 20 years in prison. There was no objection either to the habitualization or to the sentence, and no motion was filed pursuant to Florida Rule of Criminal Procedure 3.800 challenging the sentence.
For the first time on direct appeal, Rainey alleges that his habitual felony offender sentence is "illegal," as that term was defined by the supreme court in Mancino, 714 So.2d at 433, because the sentence "patently fails to comport with statutory or constitutional limitations"; and that the error is fundamental and, thus, need not be preserved. Baker v. State, 724 So.2d 121 (Fla. 1st DCA 1998); Nelson, 719 So.2d at 1233; Stanford, 706 So.2d at 901. Like defendant Stanford, Rainey is covered by the statutory provision governing trafficking in cocaine that states, in pertinent part, that if the quantity of cocaine is 28 grams or more, but less than 200 grams, "such person shall be sentenced pursuant to the guidelines and pay a fine of $50,000." § 893.135(1)(b)1.a., Fla.Stat. Given the fact that Rainey's habitual felony offender sentence is not authorized by the trafficking statute, we conclude, as we did in Nelson, 719 So.2d at 1232-33, that it matters not that the 20-year term lies within the non-habitual statutory maximum for his offense. Concluding that Mancino, Nelson, and Stanford directly support Rainey's argument, we are constrained to vacate his habitual felony offender sentence and remand for further proceedings.
The habitual felony offender sentence was the result of a bargain struck between the parties. The record discloses that Rainey, the State, and the trial court all mistakenly believed that the habitual sentence was legal. "Just as a defendant is not bound by a misconceived bargain, the state likewise is not bound to accept a sentence it did not bargain for." Forshee, 579 So.2d at 389. In granting Rainey the relief that he seeks, we hold also that the trial court should afford the State the opportunity to decide whether the case is appropriate for plea negotiations under the sentencing guidelines or should proceed to trial. Akins v. State, 691 So.2d 587 (Fla. 1st DCA 1997); Patterson v. State, 677 So.2d 961 (Fla. 1st DCA 1996); Williams, 650 So.2d at 1055.
We VACATE the habitual felony offender sentence and REMAND for further proceedings.
MINER and BENTON, JJ., concur.
