
113 S.W.3d 82 (2003)
M.M., a Juvenile, Appellant,
v.
Henry WILLIAMS, Superintendent, Woodbend Youth Development Center and Ralph Kelly, Commissioner, Department of Juvenile Justice, Appellees, and
Commonwealth of Kentucky, Real Party in Interest,
No. 2001-SC-0645-DG.
Supreme Court of Kentucky.
June 12, 2003.
Rehearing Denied September 18, 2003.
Timothy G. Arnold, Department of Public Advocacy, Frankfort, Counsel for Appellant.
A.B. Chandler III, Attorney General, Matthew D. Nelson, Assistant Attorney General, Office of Attorney General, Criminal Appellate Division, Frankfort, Counsel for Appellee.
Opinion of the Court by Justice GRAVES.
On January 4, 2001, Appellant, M.M., a juvenile, pled guilty in the Floyd District Court to charges of third-degree assault and attempted escape, which occurred while he was in custody at the Big Sandy Area Detention Center. The Floyd District Court thereafter released Appellant to his parent's custody and transferred the case to the Laurel District Court for final disposition since Appellant was a resident of Laurel County.
On March 22, 2001, the Laurel District Court entered an order committing Appellant to the Clark County Detention Center pending placement by the Department of Juvenile Justice. Appellant appealed to the Laurel Circuit Court and sought release pending the appeal pursuant to RCr 12.04. The Laurel Circuit Court denied the motion for release. The Department for Juvenile Justice subsequently placed Appellant in a facility in Morgan County.
Appellant thereafter sought habeas corpus relief in the Morgan Circuit Court to *83 preclude further enforcement of the March 22, 2001, order of the Laurel District Court pending resolution of his appeal to the circuit court. In granting Appellant's petition for relief, the Morgan Circuit Court ruled:
Appeals from juvenile court orders "shall be taken in the manner provided by the Rules of Criminal Procedure." KRS 610.130. RCr 12.04(4) provides that "the timely filing of a notice of appeal from the judgment of the district court shall stay proceedings on the judgment as long as the case remains on appeal, except for the requirement of bail." KRS 610.190 provides that "The law relating to bail shall not be applicable to children detained in accordance with this chapter...." In light of the foregoing authority, the May 22, 2001 order was stayed by operation of law pending resolution of the appeal. Consequently there presently is no enforceable judgment which would permit the Respondents to retain custody of Petitioner.
A split panel of the Court of Appeals reversed the Morgan Circuit Court, holding that Appellant's habeas petition was procedurally improper, and that Appellant instead should have sought relief through the normal appellate procedures or through a petition for a writ of mandamus. The Court of Appeals declined to address the application of RCr 12.04 to juvenile proceedings. This Court thereafter granted discretionary review.
As he did in the courts below, Appellant argues that KRS 610.190 clearly provides that appeals from juvenile court orders "shall be taken in the manner provided by the Rules of Criminal Procedure." Further, RCr 12.04 states, in pertinent part, that "the timely filing of a notice of appeal from the judgment of the district court shall stay proceedings on the judgment as long as the case remains on appeal...." As such, Appellant contends that the Laurel District Court's March 22, 2001, order of commitment was stayed by operation of law when he timely filed his appeal in the circuit court. Consequently, Appellant believes that he was properly entitled to habeas relief since he was illegally detained in the Morgan County facility.
The Commonwealth counters that the sole issue in this case concerns whether "a writ of habeas corpus ad subjiciendumthe Great Writis an appropriate remedy to executive branch detention that has been authorized by a court of competent jurisdiction." The Commonwealth asserts that the appropriate remedy lies directly in a writ of mandamus rather than collaterally in a petition for habeas. Like the Court of Appeals, we need not reach the RCr 12.04 issue, for we also conclude that this case solely concerns the proper application of habeas corpus.
KRS 419.020 provides:
The writ of habeas corpus shall be issued upon petition on behalf of anyone showing by affidavit probable cause that he is being detained without lawful authority or is being imprisoned when by law he is entitled to bail. The writ may be issued by any circuit judge on any day at any time and his power to issue such writs shall be coextensive with the Commonwealth.
The statute is a codification of the constitutional right of an individual to petition a court to determine the legality of his detention. U.S. Const. art. I § IX; Ky. Const. § 16. However, in Smith v. Henson, 298 Ky. 182, 182 S.W.2d 666, 668 (1944), our predecessor court explained:
[W]here there has been a judgment in the case, a habeas corpus proceeding is a collateral attack on that judgment. It lies only where the judgment is void and does not lie to obtain ... an appeal or *84 release from custody by establishing error or disclosing some latent or hidden fact which may have affected the result.
Early Kentucky decisions concerning the application of habeas corpus limited the inquiry to whether the court had jurisdiction of the offense and the person of the accused. Thomas v. Maggard, Ky., 313 S.W.2d 271 (1958) (Judgment is not void if the court had jurisdiction of the person of the defendant and of the defense charged); Owen v. Commonwealth, Ky., 280 S.W.2d 524 (1955) (Denial of a constitutional right will not render a judgment void if the court had jurisdiction of the person and of the offense); Hoskins v. Buchanan, 311 Ky. 246, 223 S.W.2d 904 (1949) (Inquiry is addressed not to error committed by a court within its jurisdiction, but to question of whether the proceedings or judgment are void); Department of Public Welfare v. Polsgrove, 250 Ky. 517, 63 S.W.2d 603 (1933) (Mere irregularities or errors of judgment in the exercise of jurisdiction must be corrected by the court issuing the process or in regular appellate proceedings).
In 1963, the Court rendered Rice v. Davis, Ky., 366 S.W.2d 153 (1963), wherein it adopted the "federal" view of habeas corpus that "A judgment may be void and thereby subject to attack for certain extreme irregularities other than the lack of jurisdiction of the offense and the person." In Rice, the defendant produced prima facie evidence that trial counsel had committed numerous errors, had worked a substantial injustice on his client, and had failed to make a record for appeal, thus closing that avenue of relief. The Court concluded that habeas relief was warranted. Interestingly, RCr 11.42 was in effect at the time and would have also offered post-conviction relief, although not specifically mentioned in the opinion. See John S. Gillig, Kentucky Post Conviction Remedies, 83 Ky. L.J. 265, 309-310 (1994-95).
With the evolution of post-conviction relief under RCr 11.42, habeas corpus has remained an extraordinary remedy only available under limited circumstances. This Court in Commonwealth v. Marcum, Ky., 873 S.W.2d 207, 211-212 (1994) stated:
Thus, we recognize as the general rule that the RCr 11.42 procedure is adequate for a collateral attack by a prisoner in custody under a judgment which he believes to be defective for one reason or another. But we recognize as an exception that the prompt relief available by writ of habeas corpus remains for a prisoner who can establish in a summary procedure that the judgment by which he is detained is void ab initio.

In the context of this case, habeas relief would have only been proper had Appellant been detained without lawful authority under a void judgment. Appellant maintains that the Laurel District Court's order of commitment was unenforceable since he filed a notice of appeal in the circuit court. However, the flaw in Appellant's argument is that the district court's order was a legitimate legal order. And, at no point does he allege that either the Laurel District or Circuit Court lacked personal or subject matter jurisdiction. Indeed, Appellant properly appealed the district court's order of commitment to the circuit court. KRS 610.130. Once the Laurel Circuit Court, being a court of competent jurisdiction, denied Appellant's motion for release pending appeal, any challenge to that decision, even assuming that such was erroneous, necessarily vested in that court or in an appellate court.
Contrary to Appellant's position, he had an available remedy by appeal or an original action to the Court of Appeals under CR 76.36 for a writ of mandamus. A writ of mandamus is not inadequate *85 simply because it may be more time consuming than a petition for habeas. See generally Richardson v. Howard, Ky., 448 S.W.2d 49 (1969) (RCr 11.42 not inadequate because it may take longer than habeas).
In this case, had Appellant sought a writ of mandamus compelling the Laurel Circuit Court to stay the proceedings on the order of commitment, the dictate would have been issued by an appellate court upon a lower court. However, the Morgan Circuit Court's grant of Appellant's habeas petition resulted in two orders from two coequal courts. As recognized by our predecessor court, "Under our system of procedure, it would be unseemly to vest power in one circuit court to annul, or refuse to give effect to, the valid judgment of another circuit court." Sharpe v. Commonwealth, 292 Ky. 86, 165 S.W.2d 993 (1942), cert. denied, 320 U.S. 767, 64 S.Ct. 67, 88 L.Ed. 458 (1943).
Notwithstanding the merits of Appellant's claim under RCr 12.04, habeas relief was not a proper substitute for other available remedies. Lear v. Commonwealth, Ky. 884 S.W.2d 657 (1994). Appellant's remedy to the adverse ruling lay in appeal or mandamus, not in a habeas petition to another circuit court.
The decision of the Court of Appeals is hereby affirmed.
All concur.
