
    Robert J. WHITFIELD, Jr., Appellant, v. STATE of Florida, Appellee.
    No. 96-1998.
    District Court of Appeal of Florida, Fifth District.
    Nov. 15, 1996.
    Robert J. Whitfield, Jr., Crestview, pro se.
    Robert A. Butterworth, Attorney General, Tallahassee, and Wesley Heidt, Assistant Attorney General, Daytona Beach, for Appellee.
   DAUKSCH, Judge.

Appellant, Robert Whitfield, timely appeals the trial court’s order denying his petition for writ of habeas corpus.

Appellant was sentenced to a twelve-year term of imprisonment for the offenses of principal to sexual battery, uttering a false or forged instrument and two counts of forgery. The sentence was to be followed by ten years probation for the separate offense of dealing in stolen property. Following appellant’s violation of probation, the trial court adjudicated him guilty of the underlying offense and sentenced him to serve five years imprisonment with credit for 166 days. Appellant filed a petition for writ of habeas corpus in which he alleged that he was entitled to immediate release based upon the trial court’s failure to credit him with the twelve years previously served for the offenses of principal to sexual battery, uttering a false or forged instrument and two counts of forgery. The trial court denied appellant’s petition.

Relying upon Tripp v. State, 622 So.2d 941 (Fla.1993), appellant correctly contends on appeal that upon his violation of probation he was entitled to credit for the twelve years previously served on the first ease for which he was sentenced. In Tripp, the supreme eourt held that the trial court’s imposition of a term of probation on one offense, consecutive to a sentence of incarceration on another offense, entitles a defendant to credit for time served on the first offense on the sentence imposed following a revocation of probation on the second offense. See also Cook v. State, 645 So.2d 436 (Fla.1994). Appellant also correctly contends that his argument is cognizable as a 3.800(a) motion to correct illegal sentence because an illegal sentence can be corrected at any time. See Dock v. State, 671 So.2d 297 (Fla. 5th DCA 1996). Accordingly, the order appealed is reversed and the cause remanded to the trial court with directions to credit appellant for all time previously served in the first case. See Tripp; Dock. If he is entitled to release then that should be done.

REVERSED and REMANDED.

COBB and HARRIS, JJ., concur.  