
907 So.2d 1261 (2005)
Anthony W. BROOM, Appellant,
v.
The STATE of Florida, Appellee.
No. 3D03-3029.
District Court of Appeal of Florida, Third District.
August 3, 2005.
*1262 Anthony W. Broom, in proper person.
Charles J. Crist, Jr., Attorney General, and Jennifer Falcone Moore, Assistant Attorney General, for appellee.
Before COPE, C.J., and SHEPHERD, and ROTHENBERG, JJ.
ROTHENBERG, Judge.
Anthony W. Broom appeals a final order denying his petition for writ of habeas corpus.
On December 9, 1996, in the county court of Pinellas County, Florida, the defendant, who was on probation for a previous crime, entered a plea of nolo contendre to the offense of driving under the influence of prescription medicine. As a result, his probation was revoked on March 26, 1997, and he was imprisoned in Miami-Dade County. On February 2, 1998, and on April 1, 1998, the defendant filed motions for postconviction relief pursuant to Florida Rule of Criminal Procedure 3.850, which were denied by the trial court on April 17, 1998 and November 2, 1998.
On September 7, 1999, the defendant was granted a belated appeal by the Second District Court of Appeal. However, on March 21, 2000, the Second District transferred the case to the Appellate Division of the Pinellas County Circuit Court. According to the defendant, he then "became frustrated" and chose not to pursue the appeal. Instead, on May 24, 2001, the defendant filed a motion to correct illegal sentence pursuant to Florida Rule of Criminal Procedure 3.800(a), which was denied on May 1, 2002.
On September 9, 2002, the defendant filed a petition for writ of habeas corpus with the Florida Supreme Court which was transferred to the Miami-Dade Circuit Court on May 21, 2003. On August 7, 2003, the Miami-Dade Circuit Court entered an order denying the petition on the merits. The defendant now appeals the circuit court's denial of his petition for writ of habeas corpus. For the reasons expressed below, we find that the lower court did not have jurisdiction to consider the claims raised in the defendant's petition.
The circuit court of the county in which a defendant is incarcerated has jurisdiction to consider a petition for writ of habeas corpus when the claims raised in the petition concern issues regarding his incarceration, but not when the claims attack the validity of the judgment or sentence. Murray v. Regier, 872 So.2d 217, 223-24 (Fla.2002)(because petition for writ of habeas corpus raised issues regarding petitioner's detention, the proper court to rule on the petition was the court where petitioner was being detained); Calloway v. State, 699 So.2d 849 (Fla. 3d DCA 1997)(explaining that a circuit court has no jurisdiction to review the legality of a conviction in another circuit); Leichtman v. Singletary, 674 So.2d 889 (Fla. 4th DCA 1996)(holding that a court from one county does not have jurisdiction to hear a petition collaterally attacking a judgment and sentence from another county.) Only the court in which the defendant was convicted and sentenced has jurisdiction to consider collateral attacks on a judgment or sentence, and such an attack must be brought pursuant to Rule 3.800 or 3.850, not by petition for writ of habeas corpus. See Baker v. State, 878 So.2d 1236 (Fla.2004); Borinstein v. State, 893 So.2d 687, 688 (Fla. 5th DCA 2005).
Therefore, the Miami-Dade Circuit Court did not have jurisdiction to decide *1263 the collateral attacks raised in the defendant's petition. Only the Pinellas County Court, where the defendant was convicted and sentenced, has jurisdiction to consider the defendant's collateral attacks, which must be brought pursuant to Rule 3.800 or 3.850.
Accordingly, we quash the order denying the petition for writ of habeas corpus, without prejudice to the defendant to seek relief pursuant to Rule 3.800 or 3.850 in Pinellas County.
