Kathy Thompson Alvarez filed a petition for habeas corpus seeking the return of her twin daughters from her aunt. The trial court dismissed the petition and the mother appeals. We reverse.
The mother, a Nebraska resident, obtained a divorce there in August of 1980 and was awarded permanent legal custody of the twins. In May 1981, the mother agreed in writing for her aunt, Nell Martin Sills, to have care and custody of the children for two years. The agreement provides that at the end of the two-year period, the mother would regain custody if she were able to care for the children adequately; if not, the aunt would retain custody indefinitely. If, however, the parties could not agree whether the mother could adequately care for the children, the agreement provides that the question of custody would be determined by a court of competent jurisdiction where the children reside. The trial court held that because of the agreement the aunt had legal custody and that the mother’s habeas petition was barred by OCGA § 19-9-23 (d) of the Georgia Child Custody Intrastate Jurisdiction Act of 1978.
The Georgia Child Custody Intrastate Jurisdiction Act of 1978 and its prohibition against complaints in the nature of a habeas corpus seeking a change of custody, OCGA § 19-9-23 (d), cited by the trial court as precluding the mother’s action, are inapplicable. That act governs the procedure to be followed by a party seeking a change in “legal custody,” OCGA § 19-9-23 (a) and (b) (emphasis supplied), and defines “legal custodian” as “a person who has been awarded permanent custody of a child by a court order.” OCGA § 19-9-22 (2). (Emphasis supplied.) Under the terms of the act, legal custody is not conferred by an agreement. Thus, the aunt does not have legal custody, the mother is not seeking a change in legal custody, and the act, and its prohibition, do not apply.
Moreover, the mother does not seek a “change of custody” under the act’s terms. She claims there has been no transfer of permanent custody of her children from her to the aunt. She claims that the aunt’s term of temporary custody under the agreement has expired. She claims that she is prepared to prove that she has met all conditions relating to the return of her children and that the aunt has failed to comply with the agreement, and has in fact, avoided commu*19nication with the mother and hidden the children from her. The mother’s petition states a claim for habeas corpus relief. Johnson v. Smith, 251 Ga. 1 (302 SE2d 542) (1983). Accordingly, the trial court erred by dismissing the petition.1
Judgment reversed.
All the Justices concur, except Smith, J., who dissents.This holding does not prevent the aunt from asserting the agreement as a defense. To do so she must demonstrate to the trial court’s satisfaction that a release of custody was contemplated and effected, in accordance with our holdings in Bozeman v. Williams, 248 Ga. 606, 607 (285 SE2d 9) (1981) and Shaddrix v. Womack, 231 Ga. 628, 631 (3b) (203 SE2d 225) (1974), and that, under the evidence, a return of the children to the mother is not required.