
991 So.2d 980 (2008)
Jermaine ATTERBURY, Appellant,
v.
STATE of Florida, Appellee.
No. 4D07-4167.
District Court of Appeal of Florida, Fourth District.
September 24, 2008.
Rehearing Denied October 29, 2008.
Jermaine Atterbury, Belle Glade, pro se.
Bill McCollum, Attorney General, Tallahassee, and Mark J. Hamel, Assistant Attorney General, West Palm Beach, for appellee.
WARNER, J.
Jermaine Atterbury appeals the denial of his motion to correct an illegal sentence. He claims that his habitual offender sentence is illegal because the state failed to prove that he committed the offense for which he was sentenced as a habitual offender within five years of his prior conviction or release from prison or probation. We agree with appellant and reverse.
Atterbury was convicted of sale of cocaine and sentenced to two years of drug offender probation on January 10, 1997. Subsequently, Atterbury violated the terms of his probation. The trial court revoked his probation and imposed a fourteen-month term of incarceration commencing on November 20, 1998. Atterbury appealed, and this court reversed the revocation of probation, finding that it was based solely on hearsay. Atterbury v. State, 740 So.2d 600 (Fla. 4th DCA 1999). We remanded for further proceedings. On November 1, 1999, the trial court entered an order which stated:
This matter having come before the Court on a mandate from the Fourth Court of Appeal which reversed the Defendant's *981 conviction for violation of probation and having been verified that the sentence imposed in this matter will run as of October 31, 1999 and the parties having reviewed the file and determined no further sanctions can be imposed, it is hereby
ORDERED AND ADJUDGED

That the adjudication and sentence imposed by the Court on November 20, 1998 are vacated and set aside. The probation is terminated and the case is closed.
(emphasis supplied).
Atterbury committed a carjacking, robbery, and grand theft on June 4, 2004, less than five years from the November 1, 1999 order but more than five years from the original revocation of the probation. The state brought two cases on these charges. Relying on the 1997 cocaine conviction and November 1, 1999, release from probation, the trial court sentenced Atterbury to five years in prison as a habitual felony offender in one case and eleven years in prison as a HFO with a ten-year minimum mandatory pursuant to the 10-20-Life statute in the other case. The sentences would run concurrently. It does not appear that Atterbury appealed his judgment and sentence in either case.
Atterbury filed a rule 3.800(a) motion, alleging that the trial court erred by using his previous conviction in the 1997 case to qualify him as a HFO because that conviction was reversed on appeal. The trial court denied Atterbury's motion, and we affirmed finding Atterbury's conviction in the 1997 case was not vacated even though the revocation of probation, adjudication of guilt, and prison sentence had been vacated. Atterbury v. State, 940 So.2d 498 (Fla. 4th DCA 2006). We affirmed without prejudice for Atterbury to raise in a subsequent rule 3.800(a) motion, the issue of whether his probationary term ended within five years of committing the current offenses. Id.
He then filed the current motion to correct an illegal sentence, arguing that the trial court illegally imposed his HFO sentence because he did not commit the current offenses within five years of his last release from probation or prison. He explained that although the state presented evidence that his most recent release from prison occurred on October 31, 1999, that prison sentence was "null and void," because the trial court had vacated his conviction and sentence for the VOP and terminated his probation in the 1997 case upon remand from our reversal of the revocation of probation. The trial court denied the motion, and Atterbury appeals.
Sentencing statutes "must be strictly construed according to their letter." Perkins v. State, 576 So.2d 1310, 1312 (Fla.1991); Gordon v. State, 745 So.2d 1016, 1019 (Fla. 4th DCA 1999). This fundamental principle guides our resolution of this case.
Section 775.084(1)(a)2.b., Florida Statutes, permits the imposition of a habitual offender sentence when the necessary predicate convictions are established and the felony for which the defendant is being convicted was committed:
Within 5 years of the date of the conviction of the defendant's last prior felony or other qualified offense, or within 5 years of the defendant's release from a prison sentence, probation, community control, control release, conditional release, parole or court-ordered or lawfully imposed supervision or other sentence that is imposed as a result of a prior conviction for a felony or other qualified offense, whichever is later.
Since the trial court vacated the prison sentence it had imposed upon revocation of Atterbury's probation after this court reversed *982 the revocation, Atterbury was not released from a prison sentence imposed as a result of a qualifying felony. When it vacated its November 20, 1998 adjudication and sentence, the court imposed no prison sentence as a result of the prior felony.
The state contends, however, that Atterbury was released from his probation in the same order through which adjudication of guilt and prison sentence were vacated. The order terminating probation was within five years of the commission of the offense on which Atterbury was habitualized. We disagree that his probation release date is calculated from the date of the order terminating probation because the probation would have expired earlier.
Probation is terminated by a valid order of revocation or by the expiration of the probationary term. Watson v. State, 497 So.2d 1294 (Fla. 1st DCA 1986). Here the order of revocation was reversed and the sentence vacated. The state did not pursue revocation of probation, and the court never properly revoked his probation. Therefore, his term of probation should have terminated on its original date of January 10, 1999. See, e.g., Morgan v. State, 757 So.2d 618, 620 (Fla. 2d DCA 2000).
We conclude that Atterbury's habitual felony offender sentence is illegal, as the record shows that he did not commit the current offenses within five years of his release from a prison sentence or release from probation imposed on a prior qualifying felony conviction. Atterbury's habitual offender sentences, however, were the result of a negotiated plea. Because of this, upon remand the state must either agree to the correction of the sentence by removing the habitual offender designation on his current sentences, or the state can proceed to trial on all of the charges. See Kelly v. State, 957 So.2d 108 (Fla. 4th DCA 2007).
Reversed and remanded for further proceedings consistent with this opinion.
SHAHOOD, C.J., and KLEIN, J., concur.
