This appeal is before us from the trial court’s amended order granting in part and denying in part appellant’s “Motion to Set Aside Judgment and Sentence and Plea of No Contest.” We affirm.
The convoluted history of this cause begins with appellant’s conviction, pursuant to a plea of nolo contendere, for sexual battery and burglary. On April 16, 1980, the plea bargain was accepted by the court and appellant was sentenced in accordance with the bargain to ten years in Florida State Prison, suspended after his serving 195 days, the balance of nine years to be unsupervised probation with the condition that appellant leave the State of Florida and not return while on probation.
Appellant filed his first motion for post-conviction relief under rule 3.850, Florida Rules of Criminal Procedure, alleging, among other things, that his plea was not voluntarily given. The trial court entered an order denying the motion and appellant filed an appeal. On May 13, 1981, this Court affirmed the portion of the order finding that appellant’s plea was not unlawfully induced, but remanded to the trial court for correction of the judgment and sentence, holding the unsupervised probation portion of appellant’s sentence to be illegal. See Lynn v. State, 398 So.2d 977 (Fla. 1st DCA 1981).
On September 11, 1981, the trial court entered its order correcting the sentence by placing appellant on supervised probation for the period of time set forth in the *9original sentence. Shortly thereafter, appellant filed his second rule 3.850 motion alleging that the corrected sentence violated the plea bargain agreement and was therefore illegal. Appellant argued that the court could not impose a harsher sentence than that originally imposed, i.e. the supervised as opposed to unsupervised probation, and that he was entitled to withdraw his plea and to pursue a jury trial. The trial court denied the motion on February 3, 1982, and on February 10, appellant filed his second notice of appeal. Thereafter, on June 17, 1982, appellant, represented by counsel, filed a motion to vacate and set aside the judgment and sentence, arguing the probation issue.
This Court filed its opinion in the second appeal on September 8, 1982, remanding the cause to the trial court for either an evidentiary hearing or for attachment to the order denying appellant’s 3.850 motion that portion of the files and records which would conclusively show that he was entitled to no relief. See Lynn v. State, 418 So.2d 1276 (Fla. 1st DCA 1982). The opinion specifically referred to appellant’s allegation of a plea agreement violation. Unfortunately, the mandate in that cause inadvertently did not issue until July 13, 1983.
Meanwhile, unaware that the mandate had not issued, the trial court set for hearing for January 19, 1983, the June 17 motion to vacate. After hearing argument of counsel, the court took the matter under advisement and, on May 19, granted the motion only to the extent of correcting the September, 1981, order by striking that portion of the sentence placing appellant on supervised probation, while correcting the original sentence of April 16,1980, by striking the portion placing appellant on unsupervised probation. Since the court was under the impression that it was not imposing a harsher sentence than that originally agreed upon, it held that to vacate and set aside the entire judgment and sentence would be improper. Appellant filed his third notice of appeal.
Once it was determined that the May 19 order was entered before the mandate had issued from the prior appeal, and once the mandate did issue, in order to perfect the present appeal the trial court, on October 27, 1983, entered an amended order in which the above events were recounted, and the May 19 order was reentered in its entirety and incorporated therein.
In the present appeal, the argument is again made that appellant received a sentence violative of his original plea agreement, and, since the sentence is harsher, that he should have been given the opportunity to withdraw his plea. We disagree with this contention. The ramification of the combined May 19 and October 27 orders is that appellant is no longer on probation. Thus, the sentence is legal and not harsher.1
In any event, appellant was not automatically entitled to withdraw his plea. ’Vifhen an illegal sentence has been imposed by the trial court pursuant to a plea agreement, the correct procedure to be followed by the court on remand is, first, to give the state the opportunity to accept the original plea with the sentence reduced to a legal status. If the state declines to elect that option, the trial court should allow the defendant to withdraw his plea and go to trial on the charges or to resentence him within the parameters of the plea agreement. See Forbert v. State, 437 So.2d 1079 (Fla.1983); and Chaney v. State, 452 So.2d 1148 (Fla. 5th DCA 1984).
In the instant case, when correcting its action taken pursuant to our original remand and striking both probation provisions, the trial court imposed a sentence well within the parameters of the plea agreement. While the record does not indicate whether the state was present to exer*10cise its option to accept the corrected sentence, neither does it reflect any objection made by the state as to that action, and it would appear from appellee’s brief that the state is in accord with the court’s decision.
Accordingly, the amended order entered October 27, 1983 is AFFIRMED.
JOANOS and BARFIELD, JJ., concur.. As a result, it would appear that appellant has served the requisite 195 day incarceration imposed under the original sentence. Also, since the condition prohibiting appellant's returning to the State of Florida ran with his term of probation, and since appellant is no longer on probation, that condition is no longer in effect.