
    STATE of Florida, Appellant, v. Navarus Cortez BRYANT, Appellee.
    No. 5D99-3038.
    District Court of Appeal of Florida, Fifth District.
    July 28, 2000.
    
      Robert A. Butterworth, Attorney General, Tallahassee, and Belle B. Schumann, Assistant Attorney General, Daytona Beach, for Appellant.
    Michael W. Johnson, Ocala, for Appellee.
   ON MOTION TO STAY MANDATE

PLEUS, J.

The state moved to stay our issue of the mandate in State v. Bryant, 25 Fla. L. Weekly D1172 (Fla. 5th DCA May 12, 2000). In light of State v. Cotton, 25 Fla. L. Weekly S463, — So.2d -, 2000 WL 766521 (Fla. June 15, 2000), we grant the motion, withdraw our opinion in Bryant, and substitute the following.

In Cotton, the supreme court rejected any notion that the former version of the Prison Releasee Reoffender Punishment Act contained a “victim veto” provision which circumscribed a prosecutor’s discretion to prosecute under the Act. The supreme court held the victim’s input was not, under this version of the Act, a veto, but rather a circumstance which may justify the state’s exercise of discretion not to invoke the Act.

In the instant case, the trial court declined to sentence Bryant as a Prison Re-leasee Reoffender (PRR) solely on the fact that Bryant had obtained a written statement from the victim indicating the victim did not want Bryant sentenced as a PRR. The state objected to Bryant receiving any sentence other than a PRR sentence. The state failed to argue, however, as it did in this appeal, that the trial court did not have the authority to impose a non-PRR sentence based on the victim’s preference. In fact, the prosecutor, Bryant, and the trial court were all under the mistaken impression that the victim’s statement was sufficient to prevent the imposition of the PRR sentence, or that, at least, the trial court had the discretion to prevent the imposition of such a sentence based upon the victim’s statement. This shared misconception of the law, as well as the state’s acquiescence in getting the victim statement signed, are evident from the following exchange that took place at a hearing held just 11 days before the plea and sentencing hearing:

[Prosecutor]: Judge, we’re still trying to resolve Mr. Bryant’s case ... [Bryant’s counsel] is gonna get a letter from the victim in the case, and I’m hoping to get one from [Bryant’s co-defendant] as well.
And once we get both these signed, Judge, we’ll be ready to plea them out; okay?
[Bryant’s Counsel]: If [co-defendant’s counsel] will get that to me, I’ll take them both at the same time, Judge, and we’ll have it when we get back—
The Court: Okay. In the meantime, you’re asking for a continuance.

While the plea that was ultimately entered was open or “straight up,” meaning Bryant was not specifically conditioning his plea on a specific sentence, the state at this earlier hearing seemed to be indicating that the victim statement would have some impact on the sentencing alternatives. Bryant, the prosecutor, and the court each misunderstood the law as allowing or requiring the trial court to impose a non-PRR on the strength of the victim’s statement.

When a defendant pleads guilty with the understanding that the sentence he or she receives in exchange is legal, when in fact the sentence is not legal, the defendant should be given the opportunity to withdraw the plea when later challenging the legality of the sentence.

Forbert v. State, 437 So.2d 1079, 1081 (Fla.1983). See also Williams v. State, 618 So.2d 773 (Fla. 5th DCA 1993) (where there was mutual mistake of defendant and court which resulted in illegal sentence, appellant should have opportunity to agree to the illegality or withdraw plea). Here, the state agreed below that the trial judge could act as it did, failed to put on any evidence that Bryant in fact qualified to be sentenced as a PRR, and acquiesced in the efforts to get the requisite victim statement signed. Under these circumstances, we conclude that any objection to Bryant not receiving a PRR sentence based on the victim’s statement was waived by the state.

Accordingly, we affirm the judgment and sentence of the trial court.

AFFIRMED.

HARRIS and PETERSON, JJ., concur. 
      
      . See McKnight v. State, 727 So.2d 314 (Fla. 3d DCA), rev. granted, 740 So.2d 528 (Fla.1999) (provisions of PRR statute are mandatory on the trial court once the state proves by a preponderance of the evidence that the defendant is a PRR) (emphasis added).
     