Roy Harris appeals from the trial court’s order transferring his petition for writ of habeas corpus to the Circuit Court, Second Judicial Circuit, in Leon County. We reverse.
Harris alleges he is currently serving a sentence in Miami-Dade County following a revocation of his parole. He filed a petition for a writ of habeas corpus with the Circuit Court in Miami-Dade County, alleging that the Florida Parole Commission issued a warrant and revoked his parole after his term of parole had already expired, that the Commission acted without jurisdiction, and that he is therefore being incarcerated illegally in Miami-Dade County.
The trial court declined to reach the merits of Harris’ claim, determining that the Clerk of the Miami-Dade Circuit Court had already transferred the petition to the Leon County Circuit Court.1 The trial court rendered an order determining that the transfer was proper. However, given the nature of the claim raised by Harris’ petition, we hold that the petition was properly filed in the Miami-Dade County Circuit Court, where Harris is currently incarcerated.
Historically, habeas corpus petitions are filed to test the legality of the petitioner’s detention and to secure immediate release from that detention if it is determined to be illegal. The general rule is that a petition for writ of habeas corpus must be filed in the circuit court of the county where the petitioner is located. See § 79.09, Fla. Stat. (2013) (providing that a petition for writ of habeas corpus “shall be filed with the clerk of the circuit court of the county in which the prisoner is detained.”); Alachua Reg’l Juvenile Det. Ctr. v. T.O., 684 So.2d 814 (Fla.1996); Lewis v. Fla. Parole Comm’n, 697 So.2d 965 (Fla. 1st DCA 1997); Ruiter v. Wainwright, 249 So.2d 67 (Fla. 2d DCA 1971).
1.
The record on appeal reveals that, according to correspondence from the Clerk of Courts in Leon County, the case has not been transferred to, nor the file received by, the Clerk of Courts in Leon County.
2.
One exception to this general rule exists where the petition seeks to challenge the Parole Commission's determination of a petitioner's presumptive parole release date. The proper venue for such a claim is in the Leon County Circuit Court (Tallahassee), where the Commission is headquartered. See Sullivan v. Fla. Parole Comm’n, 920 So.2d 106 (Fla. 2d DCA 2006). A second exception exists where a habeas corpus petition attacks the validity of his underlying conviction by raising issues relating to the trial or the plea; under such circumstances, the petition must be filed in the circuit where the judgment of conviction was imposed. See Coakley v. State, 43 So.3d 790 (Fla. 1st DCA 2010); Collins v. State, 859 So.2d 1244 (Fla. 5th DCA 2003).