
698 So.2d 1380 (1997)
Herbert WILSON, Appellant,
v.
STATE of Florida, Appellee.
No. 97-0197.
District Court of Appeal of Florida, Fourth District.
September 17, 1997.
*1381 Baya Harrison, III, Monticello, for appellant.
Robert A. Butterworth, Attorney General, Tallahassee, and Melynda L. Melear, Assistant Attorney General, West Palm Beach, for appellee.
PER CURIAM.
Appellant Herbert Wilson appeals the summary denial of his rule 3.800(a) motion to correct illegal sentence, challenging a prison sentence imposed for violation of probation, where he alleges the violation occurred after the trial court lost jurisdiction over him. We find his motion may have merit and reverse for further proceedings.
On April 21, 1988, after pleading nolo contendere to one count of grand theft by fraud, in this case a third degree felony for which the statutory maximum is five years, Appellant was placed on five years probation consecutive to a prison sentence previously imposed in another case. He claims to have been released to begin serving his probation on March 21, 1989, a fact which the state has not disputed.
On several occasions thereafter, affidavits of violation of probation were filed against Appellant and each time he was again placed on five years probation, but without being given credit for the time he had already served on probation. It appears from his motion that he was in custody on another offense after a revocation of probation that was filed on December 15, 1992, and was again released to serve a new five-year period of probation on September 20, 1993. After Appellant had served over five years and four months on probation, by his calculations, another affidavit of violation of probation was filed against him on May 11, 1995, ultimately resulting in revocation of probation and a three-and-a-half year prison term. Considering that credit for time served on probation includes the time after an affidavit of revocation is filed until the date of revocation of probation, see Hughes v. State, 667 So.2d 910 (Fla. 4th DCA 1996), approved, Francois v. State, 695 So.2d 695, 697 (Fla.1997), it seems likely that Appellant's calculations are correct, although we are unable to make that determination from the record before this court.
Upon revocation of probation, credit must be given for time previously served on probation against any newly imposed probationary period for the same offense "when necessary to ensure that the total term of probation does not exceed the statutory maximum for that offense." State v. Summers, 642 So.2d 742, 744 (Fla.1994); accord Roundtree v. State, 637 So.2d 325 (Fla. 4th DCA), approved, 644 So.2d 1358 (Fla.1994). Even if sentencing is pursuant to a plea, a defendant cannot acquiesce in the imposition of an illegal sentence. Reed v. State, 616 So.2d 592, 593 (Fla. 4th DCA 1993).
If a probationer is sentenced to an illegal term of probation that exceeds the statutory maximum due to the failure to credit him with prior probation served, and is serving the illegal portion of that term when an affidavit of violation is filed, the affidavit should be dismissed because the trial court's jurisdiction over the probation expired when the maximum probationary term had been served. See Fellman v. State, 673 So.2d 155 (Fla. 5th DCA 1996) (reversing denial of rule 3.850 motion on facts essentially same as the instant case). See also Jackson v. State, 654 *1382 So.2d 234, 236 (Fla. 4th DCA 1995) (reversing order revoking community control because revocation occurred while appellant was serving illegal portion of illegal sentence).
Accordingly, we reverse and remand for the trial court to review the record to determine whether it substantiates Appellant's claim that he had already served the statutory maximum time on probation when the May 11, 1995, affidavit of violation of probation was filed against him, and if it does, then to vacate the prison sentence and discharge him.
We affirm that portion of the trial court's order which summarily denied Appellant's claim that the trial court erred in imposing a sentence consecutive to a future undetermined sentence, as the attached sentencing orders refuted that claim.
Affirmed in part, reversed in part, and remanded for further proceedings.
DELL, GUNTHER and WARNER, JJ., concur.
