
230 Ga. 482 (1973)
197 S.E.2d 729
COLTON et al.
v.
MARTINS.
27724.
Supreme Court of Georgia.
Argued February 13, 1973.
Decided April 13, 1973.
Rehearing Denied April 25, 1973.
Millard C. Farmer, Jr., for appellants.
George W. Darden, Edwards, Awtrey & Parker, Grant Brantley, Robert J. Grayson, for appellee.
GRICE, Presiding Justice.
The appellants filed a petition for the writ of habeas corpus in the Superior Court of Cobb County against Ronald Martins, Acting Superintendent of the Cobb County Juvenile Detention Home, alleging that their minor son was being unlawfully detained therein by virtue of an order of the Juvenile Court of Meriwether County.
The petitioners asserted that there was a substantial denial of the constitutional rights of the child before and during the proceedings in the Juvenile Court of Meriwether County, and that specified provisions of the Juvenile Court Act of 1971 (Ga. L. 1971, p. 709 et seq.) had been violated. However, the habeas corpus court refused to hear the merits of the issues raised by the petition, and on its own motion found that it had no jurisdiction, that jurisdiction was in the Superior Court of Meriwether County, and ordered that the entire record be transferred to that court for immediate hearing.
The petitioners appeal from this judgment.
The Habeas Corpus Act of 1967 (Ga. L. 1967, pp. 835, 836; Code Ann. § 50-127 (3)), which sets out the exclusive procedure for suing out a writ of habeas corpus for persons whose liberty is being restrained by virtue of a sentence imposed against them by a state court of record, *483 provides that "The petition must be filed in the superior court of the county wherein the petitioner is being detained. The superior courts of such counties have exclusive jurisdiction of habeas corpus actions arising under this section."
In our view, this section is controlling as to jurisdiction and venue for habeas corpus petitions arising out of delinquency proceedings in the juvenile court, even though we have held that such proceedings are civil in nature in order to protect minors from a criminal record. See M. E. B. v. State of Ga., 230 Ga. 154 (195 SE2d 891).
Moreover, this court has previously held that "There is a clear distinction between a writ to acquire freedom from a person who is illegally depriving one of his liberty, and a writ to secure custody of a child awarded in a divorce decree. In the former the issue is lawful or unlawful imprisonment. In the latter no imprisonment or liberty is involved, but only the question of who shall have custody of the child. This distinction has been recognized in New York Foundling Hospital v. Gatti, 203 U. S. 429 (27 SC 53, 51 LE 254). Other distinctions could be drawn. We are cited to no case, based on the restraint of personal liberty, where it was held that the writ could be issued in a jurisdiction other than where the actual physical illegal detention existed, nor have we been able to find one." McBurnett v. Warren, 208 Ga. 225, 228 (66 SE2d 49).
Accordingly, the trial court erred in dismissing the writ on the ground of lack of jurisdiction and transferring the proceedings to the Superior Court of Meriwether County. Since the person detained was before the court it should have inquired into the cause of the detention. See Simmons v. Georgia Iron Co., 117 Ga. 305 (5) (43 SE 780, 61 LRA 739) (by five Justices).
Judgment reversed. All the Justices concur.
