
734 So.2d 1132 (1999)
Jacob WILLIAMS, Appellant,
v.
The DEPARTMENT OF CORRECTIONS, Appellee.
No. 97-3497.
District Court of Appeal of Florida, Third District.
May 21, 1999.
Jacob Williams, in proper person.
Susan Schwartz, Assistant General Counsel, for appellee.
Before NESBITT, GODERICH and SHEVIN, JJ.
*1133 PER CURIAM.
Jacob Williams appeals from the denial of his writ of mandamus. We affirm, in part, and remand, in part.
Williams violated his community control and entered into a negotiated plea agreement wherein his community control was revoked, and he was sentenced to fifteen years imprisonment with six years and six months credit for time previously served. The award of six years and six months, or 2,372.5 days, credit for time previously served included 1204 days of gain time previously earned.
Upon Williams' return to the Department of Corrections [DOC], pursuant to section 944.28(1), Florida Statutes (1995), the DOC declared a forfeiture of the 1204 days of gain time he had previously earned. After exhausting all of the administrative remedies provided by the DOC, Williams filed a petition for writ of mandamus in the trial court requesting that the DOC be compelled to award him gain time in accordance with the negotiated plea. In addition, Williams alleged that because of the DOC's forfeiture of the previously awarded gain time, he was being illegally detained, and that had the gain time been properly credited, he should have been released in 1996.
The trial court denied the writ of mandamus finding that the DOC had acted within its discretion in forfeiting Williams' gain time pursuant to section 944.28(1). Forbes v. Singletary, 684 So.2d 173, 174-75 (Fla.1996); Bradley v. State, 631 So.2d 1096, 1098 (Fla.1994). We agree with the trial court's finding because any attempt to compel enforcement of the negotiated plea agreement would be a usurpation of the DOC's executive authority. Singletary v. Evans, 676 So.2d 51, 52 (Fla. 5th DCA 1996); Davis v. Singletary, 659 So.2d 1126, 1127 (Fla. 2d DCA 1995).
However, we also agree with Williams' contention that all parties to the negotiated plea agreement contemplated that, of the fifteen-year sentence, he would only serve eight and a half years, and that the DOC's forfeiture of his gain time thwarted the intent of the negotiated plea agreement. Therefore, the trial court should have treated the petition as a motion to enforce the plea agreement and transferred the cause to the sentencing court[1] for resentencing in a manner that effectuates the intent of the plea agreement and takes into account the effect of the DOC's forfeiture of Williams' gain time or allows Williams to withdraw his plea. Davis, 659 So.2d at 1127.
Because Williams contends that he is entitled to immediate release, we remand this cause for expedited proceedings. Additionally, rehearing is dispensed with and the mandate will issue immediately.
Affirmed, in part, and remanded, in part.
NOTES
[1]  Williams was sentenced for the violation of community control in the Palm Beach County Circuit Court. However, because Williams is incarcerated at the Everglades Correctional Institution in Miami-Dade County, he properly filed his petition for writ of mandamus in Dade County Circuit Court and the subsequent appeal is properly before this Court. Green v. State, 698 So.2d 575, 576 (Fla. 5th DCA), review dismissed, 705 So.2d 901 (Fla. 1997). On remand, this cause should be transferred to the sentencing court, namely, the Palm Beach County Circuit Court. Davis, 659 So.2d at 1127.
