
994 So.2d 450 (2008)
Lorenzo ETIENNE, Appellant,
v.
The STATE of Florida, Appellee.
No. 3D08-508.
District Court of Appeal of Florida, Third District.
October 29, 2008.
*451 Lorenzo Etienne, in proper person.
Bill McCollum, Attorney General, and Richard Polin, Assistant Attorney General, for appellee.
Before GERSTEN, C.J., and SUAREZ and SALTER, JJ.
PER CURIAM.
Lorenzo Etienne appeals the trial court's denial of his petition for writ of habeas corpus. Defendant argues that the intention behind the plea agreement into which he entered was thwarted when he was not given credit for prison time previously served. We reverse the denial and remand with instructions.
In 1997, defendant was sentenced to ten years in prison, followed by five years of probation. He was released in 2003, having earned 880 days of gain time, and started the probationary portion of his sentence. He was arrested in 2007 on charges that he violated his probation. At the hearing, the court revoked defendant's probation and imposed a four-year sentence with seventy days credit for jail time pending the hearing. The court announced, "you will serve three years and ten months in the state prison as a result of these charges." There were no objections to this sentence.
Upon inquiring with the Department of Corrections about his presumptive release date, defendant was informed that his prior credit for prison time had been forfeited, and his release would be in six-and-a-half years. Thereafter, defendant sought habeas relief, asserting that he was entitled to the credit for time served and that the sentence he would serve violated the terms of the plea agreement. The court denied the habeas petition. Defendant appealed.
We agree with the State's argument that defendant is not entitled to credit for all time previously served. The transcript shows that defendant pled to the seventy days of credit he was awarded. To award additional credit would mean that defendant would "receive the `windfall' of immediate release." Fulcher v. State, 875 So.2d 647, 648 (Fla. 3d DCA 2004). This would be an absurd result. Rivera v. State, 954 So.2d 1216 (Fla. 3d DCA), review granted, 968 So.2d 557 (Fla. 2007); Fulcher, 875 So.2d at 648.
*452 However, the defendant is correct that the forfeiture of gain time earned on the original prison sentence thwarts the intention of the plea agreement. Here, as in Williams v. Department of Corrections, 734 So.2d 1132 (Fla. 3d DCA 1999), the transcript shows that all parties to the plea agreement intended for defendant to serve just short of four years. The gain time forfeiture means defendant is facing a longer sentence than agreed. Defendant is entitled to relief on this basis. See Devoid v. State, 987 So.2d 219 (Fla. 5th DCA 2008); Dellofano v. State, 946 So.2d 127 (Fla. 5th DCA 2007); State v. Jackson, 842 So.2d 1040 (Fla. 3d DCA 2003); Dellahoy v. State, 816 So.2d 1253 (Fla. 5th DCA 2002); Wallace v. State, 793 So.2d 78 (Fla. 2d DCA 2001).
We, therefore, reverse the trial court's denial of the habeas petition. We remand to the trial court with instructions that it treat the petition as a Florida Rule of Criminal Procedure 3.850 motion. The court shall either resentence defendant in a manner that effectuates the plea agreement in view of the gain time forfeiture, or allow defendant to withdraw his plea.
Reversed and remanded with instructions.
