The plaintiffs, maternal grandparents of an infant child, filed their petition for writ of habeas corpus alleging that the defendants, Mr. and Mrs. Frank Schaffer, came into possession of the child illegally from the parents of the child, and that the plaintiffs, as maternal grandparents, are entitled to custody and control of the child.
The trial court, after hearing, determined that the grandparents had shown no right to have custody of the child, and dismissed the petition. The appeal is from that judgment.
The evidence showed that the parents of the child signed a written consent for her adoption by the Schaffers, and delivered possession of the child to them for the purpose of adoption.
The grandparents contend that the defendants bought the child, and that this made the parents’ consent to the adoption void, as against public policy. After announcing that he would dismiss the petition for habeas corpus, the trial judge inquired into the circumstances of the consent for adoption. The defendants testified that they paid $300 to reimburse the mother of the child for her hospital expenses at the birth of the child.
The issue of whether the consent for adoption was legal is not material in this habeas corpus proceeding. That will be a matter for consideration of the court hearing the adoption proceedings.
Our habeas corpus statute provides: "Any person alleging that another, in whom for any cause he is interested, is kept illegally from the custody of the applicant may sue out a writ of habeas corpus to inquire into the legality of such restraint.” Ga. L. 1967, pp. 835, 836 (Code Ann. § 50-101(b) ). Habeas corpus is a special statutory proceeding. This court has held that habeas corpus is not an available remedy to inquire into the legality of the custody of a child in a case where the alleged detention is not against the right of the applicant for habeas corpus. Hall v. Hall, 222 Ga. 820 (152 SE2d 737).
*61The grandparents disclose no right in themselves to maintain the habeas corpus action. They have not been given custody of the child by any court, and the parents of the child have released their parental rights to the defendants for the purpose of adoption.
The case of Harper v. Ballensinger, 226 Ga. 828 (177 SE2d 693) is not in point on its facts with the present case. It was not a habeas corpus case. Harper v. Ballensinger, 225 Ga. 863 (171 SE2d 609). The issue in the Harper case, whether the welfare of the child would require that she be removed from the custody of her father, who was alleged to be an unfit person to have custody, is not an issue in the present case.
The trial judge properly dismissed the petition of the grandparents for habeas corpus.
Judgment affirmed.
All the Justices concur.