
668 So.2d 243 (1996)
T.O., a child, Petitioner,
v.
ALACHUA REGIONAL JUVENILE DETENTION CENTER, Respondent.
No. 96-350.
District Court of Appeal of Florida, First District.
February 15, 1996.
*244 James B. Gibson, Public Defender, and Stephanie H. Park, Assistant Public Defender, Palatka, for petitioner.
Robert A. Butterworth, Attorney General, and Jean-Jacques A. Darius, Assistant Attorney General, Tallahassee, for respondent.
PER CURIAM.
T.O., a juvenile, filed a petition for writ of habeas corpus alleging that no adjudicatory hearing had commenced in his case and that he was being detained in contravention of the 21 day pre-hearing detention limit of section 39.044(5)(b), Florida Statutes (1995). Finding that petitioner was entitled to relief, we granted the petition by unpublished order and stated that an opinion would follow to explain that decision.
In his petition, T.O. asserted that he was arrested on December 10, 1995, and charged in Putnam County. A detention order issued on December 11, 1995, directing that T.O. be detained by the Department of Juvenile Justice, pending further order of the court, for a period not to exceed 21 days. Petitioner was placed in secure detention at the Alachua Regional Juvenile Detention Center, a facility within the territorial jurisdiction of this court. On December 12, 1995, the circuit court issued an order extending detention until further order of the court based on a finding that "the protection of the public requires the continued secure detention" of petitioner. On January 8, 1996, T.O. filed a motion for release in the trial court, showing that he had been detained for more than 21 days without an adjudicatory hearing and that neither he nor the state had filed a motion for continuance. The motion for release was denied.
T.O. then filed a petition for writ of habeas corpus in this court. We find that petitioner is entitled to relief. First, however, a jurisdictional issue must be addressed. The order of detention was issued by the Putnam County Circuit Court, a court within the jurisdiction of the Seventh Judicial Circuit. Section 26.021(7), Florida Statute (1995). Review of an order from Putnam County is to the Fifth District Court of Appeal. Section 35.043, Florida Statute (1995). However, T.O. did not file a petition for writ of certiorari to review the order issued by the Putnam County judge. Instead, petitioner sought a writ of habeas corpus. This extraordinary writ has as its primary object to determine the legality of the restraint under which a person is held. State ex rel. McLeod v. Logan, 87 Fla. 348, 100 So. 173 (1924). In a proceeding for a writ of habeas corpus, the person to be named the respondent is the party holding custody and who is in a position to produce the petitioner physically. 28 Fla.Jur.2d, Habeas Corpus § 96 (1981). The judge who entered the detention order is not a proper respondent. Lantz v. State ex rel. Edes, 293 So.2d 118 (Fla. 3d DCA 1974).
As a general rule, a court has no authority to issue a writ of habeas corpus directed to a person outside its territorial jurisdiction. 28 Fla.Jur.2d, Habeas Corpus § 84. Because petitioner was being detained by a person within the territorial jurisdiction of this court, the Fifth District Court of Appeal would have no authority to issue a writ of habeas corpus in this case. Where custody or confinement is pursuant to an order of a court over which there is no appellate or supervisory jurisdiction, the exercise *245 of jurisdiction in habeas corpus proceedings is subject to certain limitations. See Janes v. Heidtman, 272 So.2d 207 (Fla. 4th DCA 1973). Even with these limitations, the person held may be discharged from custody if it is shown that the detention is without jurisdiction or that the order under which the person is held is void. See State ex rel. Scaldeferri v. Sandstrom, 285 So.2d 409 (Fla.1973); Richardson v. State ex rel. Milton, 219 So.2d 77 (Fla. 3d DCA 1969). It is only because of these special circumstances that we have the authority to issue a writ of a habeas corpus.
On the merits, it is clear that petitioner's detention was illegal. No adjudicatory hearing had been commenced and petitioner had been held in secure detention for more than the 21 days allowed by section 39.044(5)(b) and no motion for continuance by petitioner or the state had been filed or granted pursuant to section 39.044(5)(d). Petitioner was entitled to the relief requested.
The use of regional detention centers guarantees that this novel jurisdiction question will be presented to this court again. Because of that, we certify the following question to the supreme court:
WHEN A PERSON IS DETAINED BY AN ORDER ISSUED IN ONE CIRCUIT AND THE DETAINING PARTY IS WITHIN THE TERRITORIAL JURISDICTION OF ANOTHER CIRCUIT, IS THE DISTRICT COURT OF APPEAL HAVING JURISDICTION OVER THE DETAINING PARTY THE PROPER COURT TO CONSIDER A PETITION FOR WRIT OF HABEAS CORPUS TO CHALLENGE THE DETENTION?
PETITION GRANTED.
KAHN, MICKLE and VAN NORTWICK, JJ., concur.
