
660 So.2d 385 (1995)
John G. WARRINGTON, Appellant,
v.
STATE of Florida, Appellee.
No. 94-1588.
District Court of Appeal of Florida, Fifth District.
September 15, 1995.
*386 James B. Gibson, Public Defender, and M.A. Lucas, Assistant Public Defender, Daytona Beach, for appellant.
Robert A. Butterworth, Attorney General, Tallahassee, and Anthony J. Hall, Assistant Attorney General, Daytona Beach, for appellee.
PETERSON, Chief Judge.
John G. Warrington appeals the sentence imposed after he violated the terms of his community control.
Warrington violated the terms of a previous period of probation (the first "sentence") by committing a new offense. As his second "sentence," Warrington agreed to a sentence of five terms of five years incarceration suspended on the condition he successfully complete two years community control followed by three years probation. He also agreed to a sentence for the new offense of twelve years incarceration suspended on the condition he successfully complete two years community control followed by thirteen years probation. Warrington violated the terms of the new period of community control, and the court finally committed Warrington to five terms of five years incarceration and one term of twelve years incarceration (the third "sentence").
Warrington and the state contend that the second sentence imposed pursuant to a plea agreement was a "true split" sentence, as described in Poore v. State, 531 So.2d 161 (Fla. 1988). However, this sentence appears to us to be an illegal, conditional suspended and alternative sentence. See Bryant v. State, 591 So.2d 1102 (Fla. 5th DCA 1992). Cf. Silva v. State, 602 So.2d 694 *387 (Fla. 2d DCA 1992); Helton v. State, 611 So.2d 1323 (Fla. 1st DCA 1993). Although the second sentence may have been illegal, Warrington agreed to this second sentence, enjoyed the benefit of release on community control, and did not complain until after the community control was revoked. The sentence is "illegal" only in the sense that it is not one of the sentences that may be imposed pursuant to Poore and section 948.01, Florida Statutes. The sentence does not violate a statutory maximum, i.e., the terms of incarceration did not violate the statutory maximums for the crimes.
We agree with the court in Gaskins v. State, 607 So.2d 475 (Fla. 1st DCA 1992), that "once a defendant has enjoyed the benefits of probation without challenging the legality of the sentence, the defendant is thereafter precluded from complaining that the sentence is illegal in an appeal from an order revoking probation." Id. at 476 (citing Bashlor v. State, 586 So.2d 488 (Fla. 1st DCA 1991) (sentences imposed in violation of statutory requirements, which are to benefit of defendant and to which he agreed, may not be challenged after defendant has accepted benefits flowing from the plea, but has failed to carry out the conditions imposed on him)). We also agree with Gaskins that the trial court properly imposed the agreed-upon terms of incarceration.[1]
Usually, a defendant cannot agree to an illegal sentence, but when the illegal alternative and conditional defects which benefited that defendant are no longer in effect, the terms of incarceration that were agreed upon are valid so long as they are not beyond the statutory maximums for the offenses for which the defendant was convicted. Accordingly, the court properly reimposed the terms of incarceration on Warrington in accordance with the plea agreement.
We reverse and remand for resentencing, however, because the court should have given Warrington credit for the time served on community control. Where a court imposes a sentence after having illegally suspended its imposition, the sentence must be imposed nunc pro tunc the date of adjudication. See Bateh v. State, 101 So.2d 869 (Fla. 1st DCA 1958), cert. discharged by 110 So.2d 7 (Fla.), cert. denied, 361 U.S. 826, 80 S.Ct. 74, 4 L.Ed.2d 69 (1959). In the instant case the five year and twelve year sentences were within the statutory maximums for Warrington's offenses; the court erred only by failing to give credit for the time Warrington spent on community control. This error must be corrected. Accordingly, we remand so that the trial court can amend its judgment to award credit for time served on community control.
SENTENCE AFFIRMED, BUT REMANDED TO AWARD CREDIT.
GOSHORN and HARRIS, JJ., concur.
NOTES
[1]  There is no indication in Bryant that the defendant agreed to the illegal sentence.
