
80 So.3d 413 (2012)
James Edward OSBORNE, Petitioner,
v.
Kenneth S. TUCKER, Secretary, Florida Department of Corrections, Respondent.
No. 1D11-4351.
District Court of Appeal of Florida, First District.
February 14, 2012.
James Edward Osborne, pro se, Petitioner.
Jennifer Parker, General Counsel, and Michael T. Kennett, Assistant General Counsel, Florida Department of Corrections, Tallahassee, for Respondent.
PER CURIAM.
James Osborne seeks certiorari review of an order dismissing his petition for writ of habeas corpus as failing to establish any entitlement to immediate release. Osborne's petition for writ of habeas corpus, as filed with the trial court, sought review of the Department of Corrections' final agency action denying Osborne's administrative appeal, in which Osborne alleged that the Department of Corrections had miscalculated Osborne's release date by failing to properly credit him for time served. In dismissing Osborne's petition, the trial court wrote:
The Petitioner maintains that the DOC has failed to take into account four years, four months, and twenty-three days of gain time. However, even assuming that the Petitioner's allegations are true, and the Petitioner was in fact entitled to this credit, the Petitioner's sentence would still not be complete. Accordingly, the Petitioner has failed to *414 establish entitlement to immediate release.
Because the trial court dismissed Osborne's petition without reaching the merits of his claim, the instant petition is hereby converted to an appeal, and the petition and response are treated as the initial and answer briefs. See Green v. Moore, 777 So.2d 425, 426 (Fla. 1st DCA 2000), (because "the circuit court proceeding [was] concluded on grounds other than the merits, the order may be appealed").
The Department of Corrections concedes, correctly, that the trial court erred in dismissing Osborne's petition for writ of habeas corpus, rather than redesignating it as a petition seeking mandamus relief. See Fla. R.App. P. 9.040(c); Ashley v. Moore, 732 So.2d 498, 499 (Fla. 1st DCA 1999). Furthermore, the Department of Corrections correctly concedes that the proper venue for Osborne's mandamus petition, challenging the DOC's final agency action, was in the Second Circuit Court in and for Leon County. See, e.g., Reeves v. State, 987 So.2d 779 (Fla. 3d DCA 2008). Thus, after redesignating Osborne's petition as one seeking mandamus, the trial court should have transferred the petition to the Leon County Circuit Court.
Accordingly, the order dismissing the petition for writ of habeas corpus is reversed, and the matter is remanded to the circuit court for further proceedings consistent with this opinion.
VAN NORTWICK, THOMAS, and ROBERTS, JJ., concur.
