
684 So.2d 814 (1996)
ALACHUA REGIONAL JUVENILE DETENTION CENTER, Petitioner,
v.
T.O., a Child, Respondent.
No. 87544.
Supreme Court of Florida.
December 19, 1996.
*815 Robert A. Butterworth, Attorney General; and James W. Rogers, Tallahassee Bureau Chief, Criminal Appeals, and Jean-Jacques Darius, Assistant Attorney General, Tallahassee, for Petitioner.
James B. Gibson, Public Defender and Stephanie H. Park, Assistant Public Defender, Seventh Judicial Circuit, Palatka, for Respondent.
GRIMES, Justice.
We have for review T.O. v. Alachua Regional Juvenile Detention Center, 668 So.2d 243 (Fla. 1st DCA 1996), wherein the district court certified the following question to be of great public importance:
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?
Id. at 245. We have jurisdiction. Art. V, § 3(b)(4), Fla. Const.
The facts that gave rise to this case are as follows. T.O., a juvenile, was arrested and charged in Putnam County Circuit Court. The trial court issued a detention order directing that T.O. be detained by the Department of Juvenile Justice for a period not to exceed twenty-one days, in accordance with section 39.044(5)(b), Florida Statutes (1995).[1] Pursuant to the detention order, T.O. was placed in the Alachua Regional Detention Center (Center) in Alachua County. One day later, the trial 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 T.O. T.O., 668 So.2d at 244.
T.O. eventually filed a motion for release, showing that he had been detained for more than twenty-one days without an adjudicatory hearing and that neither he nor the State had filed a motion for a continuance.[2] That motion was denied. He next filed a petition for a writ of habeas corpus, alleging that he was being detained in violation of the twenty-one-day prehearing detention limit of section 39.044(5)(b). However, rather than file his petition in the Fifth District Court of Appeal, which has appellate jurisdiction over the court that issued the detention order, T.O. instead filed the petition with the First District Court of Appeal, which has territorial jurisdiction over the respondent Center.[3]
The First District granted the petition. The court noted that although the court that issued the detention order falls within the appellate jurisdiction of the Fifth District, the detaining facility (the Center), as the properly named respondent, was within the appellate jurisdiction of the First District. The court reasoned:
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 [(1981)]. Because [T.O.] was being detained by a person within the territorial *816 jurisdiction of this court, the Fifth District Court of Appeal would have no authority to issue a writ of habeas corpus in this case.
T.O., 668 So.2d at 244. The court then went on to declare T.O.'s detention illegal. However, the First District certified the above question to this Court due to the likelihood of recurrence. Id. at 245.
If a prisoner files a habeas corpus petition in circuit court, the petition must be filed in the circuit court of the county in which the prisoner is detained. § 79.09, Fla. Stat. (1995); Ruiter v. Wainwright, 249 So.2d 67 (Fla. 2d DCA 1971). No similar statutory requirement is imposed on the district courts of appeal. Nevertheless, it appears that a district court of appeal does not have the constitutional power to issue a writ directed to a person outside the district court's territorial jurisdiction. Article V, section 4(c) of the Florida Constitution grants the marshal of a district court "the power to execute the process of the court throughout the territorial jurisdiction of the court." Art. V, § 4(c), Fla. Const. By negative implication, we find that this power does not extend beyond those physical boundaries. Moreover, the proper respondent in a habeas corpus petition is the party that has actual custody and is in a position to physically produce the petitioner. Haile v. Gardner, 82 Fla. 355, 91 So. 376 (1921); Lantz v. State ex rel. Edes, 293 So.2d 118 (Fla. 3d DCA 1974); Clark v. State ex rel. Rubin, 122 So.2d 807 (Fla. 3d DCA 1960); see also § 79.01, Fla. Stat. (1995) ("[T]he court, justice, or judge to whom such application is made shall grant the writ forthwith, against the person in whose custody the applicant is detained.") (emphasis added). Thus, the Fifth District Court could not have issued the writ to the Center because it is located in Alachua County, which falls outside the Fifth District's territorial jurisdiction and into that of the First District.
The next question is whether the First District Court of Appeal, not having supervisory or appellate jurisdiction over the Putnam County trial court, had the authority to review its detention order. We conclude that it did. See State ex rel. Scaldeferri v. Sandstrom, 285 So.2d 409 (Fla.1973) (holding that circuit court may entertain habeas corpus proceeding and discharge petitioner held under an illegal or void order issued by a court over which there is no appellate jurisdiction); State ex rel. Perky v. Browne, 105 Fla. 631, 142 So. 247 (1932) (permitting circuit judge to issue writ of habeas corpus in his county to inquire into cause of detention of person held in custody in that county under void process, though issued by circuit judge of another circuit); Janes v. Heidtman, 272 So.2d 207 (Fla. 4th DCA 1973); Yates v. Buchanan, 170 So.2d 72 (Fla. 3d DCA 1964). Though these cases address the ability of a circuit court to review the order of another circuit court, we see no reason why the same principle should not apply when the reviewing court is a district court of appeal. We therefore answer the certified question in the affirmative.
As the district court below correctly acknowledged, however, certain restrictions apply when the court entertaining the habeas corpus petition does not have supervisory or appellate jurisdiction over the court that issued the order or other process under challenge. In such a case, the scope of the reviewing court's inquiry is limited to whether the court that entered the order was without jurisdiction to do so or whether the order is void or illegal. The reviewing court may not discharge the detainee if the detention order is merely defective, irregular, or insufficient in form or substance. Sandstrom; Browne; Janes; Yates.
In this case, the district court found the detention order to be illegal under subsections 39.044(5)(b) and (d). No adjudicatory hearing had been commenced, and T.O. had been held in secure detention for more than twenty-one days without any motion for continuance having been filed or granted. See T.W.C. v. Pate, 369 So.2d 361 (Fla. 1st DCA 1979) (granting petition for writ of habeas corpus on ground that trial court was without jurisdiction to extend original detention of juvenile where statutory conditions not met). In so ruling, the court did not pass on the sufficiency of the form or substance of the order or any other matter going to the propriety *817 of the order. The court was permitted to view the detention order in light of the relevant facts and law. See Yates, 170 So.2d 72 (holding that an order of commitment was illegal because it instituted a previously imposed sentence that had been withheld beyond the period for which it could be imposed; to make this determination, court necessarily considered facts of the case in light of the applicable law.)
Accordingly, we answer the certified the question in the affirmative and approve the decision below.[4]
It is so ordered.
OVERTON, SHAW, HARDING, WELLS and ANSTEAD, JJ., concur.
NOTES
[1]  Section 39.044(5)(b), Florida Statutes (1995), states:

A child may not be held in secure, nonsecure, or home detention care under a special detention order for more than 21 days unless an adjudicatory hearing for the case has been commenced by the court.
[2]  The 21-day time limit of section 39.044(5)(b) does not include periods of delay resulting from a continuance granted by the court for cause on motion of the child, the child's counsel, or the State. § 39.044(5)(d), Fla.Stat. (1995).
[3]  The Center itself lies within the territorial jurisdiction of the First District but services some counties, including Putnam County, that fall outside the territorial jurisdiction of the First District.

The Public Defender representing T.O. evidently filed the petition directly with the First District Court of Appeal because the Fifth District previously had refused to entertain petitions for writs of habeas corpus where the detainee was held in custody outside the court's territorial jurisdiction. See L.M. v. State, Case No. 95-672 (Fla. 5th DCA March 16, 1995) (order transferring cause to First District Court of Appeal because Alachua County not within court's territorial jurisdiction; petition subsequently dismissed after detainee's release); Newman v. Hornsby, 385 So.2d 1106 (Fla. 5th DCA 1980) (child custody suit).
[4]  This opinion should not be construed to supplant the requirements of Florida Rule of Criminal Procedure 3.850(h), which states:

(h) Habeas Corpus. An application for writ of habeas corpus on behalf of a prisoner who is authorized to apply for relief by motion pursuant to this rule shall not be entertained if it appears that the applicant has failed to apply for relief, by motion, to the court that sentenced the applicant or that the court has denied the applicant relief, unless it also appears that the remedy by motion is inadequate or ineffective to test the legality of the applicant's detention.
