The State of Florida petitions this court for a writ of mandamus pursuant to the granting of bond after a conviction for drug trafficking. We treat the State’s petition as a motion to review bond pending appeal pursuant to rule 9.140(e)(4), Florida Rules of Appellate Procedure. We reverse and remand.
After the denial of a motion to suppress evidence, a criminal defendant agreed to plead nolo contendere to drug trafficking, a violation of section 893.135, Florida Statutes (1989). In exchange for the plea, the defendant was granted bond pending the appeal of the denial of his motion.
The record is not clear on whether the nolo contendere plea was negotiated between the State and the defendant, or between the trial court and the defendant. It is clear, however, that the State was actively and passively involved in allowing the defendant to post a bond pending appeal.
The trial court, after hearing argument from the State and the defendant, set a bond of $5,000 pending appeal. The State neither voiced an objection nor suggested any reason why the bond should not be set. The transcript reveals:
THE COURT: All right. Mr. Galanter [defense counsel], the State is requesting a bond. He should have a bond, originally apparently the bond was $25,000 and the State was requesting an ROR, so he’s not on any bond. So we have some kind of bond.
DEFENSE: What do you have in mind? MS. ROTHENBERG [STATE]: Twenty-five thousand dollars.
DEFENSE: Come on, that’s not right. MS. ROTHENBERG: That’s not right? That’s the bond.
THE COURT: Five thousand dollar bond.
MS. ROTHENBERG: Also, I would like for him to surrender his passport.
THE COURT: All right, I will make that a condition of the plea....
DEFENSE: Would the Court put this on the calendar for tomorrow morning so I can have the bondsman here and have the bond affidavit?
THE COURT: Put it on tomorrow.
THE CLERK: Is there a fine?
DEFENSE: Standard statutory fine.
MS. ROTHENBERG: Yes, $50,000 fine.
The next day, when the defendant attempted to post bond, the State for the first time objected to the bond. The State argued that section 903.133, Florida Statutes (1989), prohibited the release of the defendant on bond after conviction.
Although we note that the State may have previously attempted to waive the statutory requirement against bond in similar circumstances,1 we agree with the State that such bond is prohibited. Section 903.133, Florida Statutes (1989) provides:
[N]o person adjudged guilty of a felony of the first degree for a violation of ... s. 893.135 ... shall be admitted to bail pending review either by post trial motion or appeal.
The statutory provision is mandatory. Where “shall” refers to the imposition of a legislatively-intended penalty, it is held to be mandatory. Allied Fidelity Insurance Company v. State, 415 So.2d 109 (Fla. 3d DCA 1982). Further, in State v. Palmer, 450 So.2d 931 (Fla. 3d DCA), review denied, 459 So.2d 1041 (Fla.1984), this court found the statute’s absolute prohibition against bond to be valid.
Because the statutory provision is mandatory, neither the State nor the defendant can waive it by agreement. See, e.g., Williams v. State, 500 So.2d 501 (Fla.1986). *94Any agreement to that effect constitutes an illegal contract, and is void.
The defendant relied upon the terms of the agreement in entering his plea. Since we find that agreement to be void, the defendant must be allowed to withdraw his plea. See Mikenas v. State, 460 So.2d 359 (Fla.1984); Stocker v. State, 564 So.2d 291 (Fla. 3d DCA 1990).
We understand the frustration of the trial court when the State stands by and either agrees, or acquiesces, to an agreement only to object after the plea and sentence have been entered. However, because the State brought this case to our attention, we feel compelled to reach this result as a matter of law.
What is equally frustrating is that this plea took place immediately prior to jury selection. Thus, this case could have been tried but for the State’s silence, inaction, acquiescence or perhaps ignorance of the law.
THE COURT: I could not feel any stronger that the State stood by while we negotiated the case and pled the case out without one single solitary objection. It’s been done before by the State Attorney’s Office.... It’s been done with the State’s agreement and there was absolutely no objection to the plea.... The entire week was scheduled around trying [the defendant]. We had the jury outside and to come in now the day after and say he got to plea or we have to have a trial is patently absurd and I cannot think of the words to describe it.
We further understand the State may have tied its hands in cases when it does not want its hands to be tied. By this decision, the State may henceforth be precluded from ever agreeing to a post conviction bond after a trafficking conviction, even when such bond may be in the State’s best interest.2
Accordingly, we reverse and remand for the revocation of the bond and to allow the defendant to withdraw his plea and proceed to trial.
NESBITT and GERSTEN, JJ., concur.
JORGENSON, J., concurs in result only.