
652 So.2d 431 (1995)
Emmet W. BAKER, Appellant,
v.
STATE of Florida, Appellee.
No. 94-00202.
District Court of Appeal of Florida, Second District.
March 17, 1995.
James Marion Moorman, Public Defender and John S. Lynch, Asst. Public Defender, Bartow, for appellant.
Robert A. Butterworth, Atty. Gen., Tallahassee, and Ron Napolitano, Asst. Atty. Gen., Tampa, for appellee.
RYDER, Acting Chief Judge.
Emmet Baker seeks review of the sentence the trial court imposed after he violated his probation. He contends it exceeds the statutory maximum sentence because he was not awarded credit for time previously served on probation and in jail. We agree, reverse and remand for resentencing.
In May 1988, Baker pleaded no contest to a charge of lewd and lascivious assault on a child under the age of sixteen, a second degree felony. § 800.04, Fla. Stat. (1987). The trial court withheld adjudication and placed him on five years' probation. Three years later, Baker violated his probation. The court imposed a sentence of three and one-half years' imprisonment, to be followed by eleven and one-half years' probation. Baker appealed this sentence.[1] On May 21, 1993, while the appeal was pending, he moved the lower court to correct an illegal sentence, asserting the victim injury points assessed on his sentencing guidelines scoresheet were improper under Karchesky v. State, 591 So.2d 930 (Fla. 1992). The state agreed that Baker's motion had merit. At the resentencing hearing, the court deleted the previously imposed sentence of imprisonment and again placed Baker on eleven and one-half years' probation. Baker had been imprisoned while his appeal and motion to correct illegal sentence were pending.
*432 The statutory maximum sentence for a second degree felony is fifteen years. § 775.082(3)(c), Fla. Stat. (1987). Baker apparently spent more than three years on probation before his 1991 violation. He then served approximately two years in prison on the 1991 sentence before he was resentenced in 1993. When the new eleven and one-half-year probation term is added to his previous terms of imprisonment and probation, his period of supervision exceeds fifteen years. The combined terms of incarceration and probation may not exceed the statutory maximum sentence. State v. Holmes, 360 So.2d 380 (Fla. 1978). Moreover, upon revocation of probation, the trial court must credit the time previously spent on probation toward a new term of probation when necessary to ensure that the total term of supervision does not exceed the statutory maximum. State v. Summers, 642 So.2d 742, 743 (Fla. 1994).
The state concedes that, because Baker's original offense occurred prior to October 1, 1989, he would also be entitled to credit for gain time under State v. Green, 547 So.2d 925 (Fla. 1989), when computing whether a sentence exceeded the statutory maximum. See also Alvarez v. State, 626 So.2d 265 (Fla. 2d DCA 1993), approved, 644 So.2d 1360 (Fla. 1994). On remand, the trial court shall credit Baker with the time he previously spent on probation and the time he previously served in prison, including gain time, and resentence him to a term within the statutory maximum sentence for a second degree felony.
Reversed and remanded for resentencing.
ALTENBERND and QUINCE, JJ., concur.
NOTES
[1]  This court reversed and remanded for the trial court to conform the written sentence to its oral pronouncement and to delete a condition of probation. Baker v. State, 619 So.2d 411 (Fla.2d DCA 1993). These issues are not germane to this appeal.
