Gary Douglas (Father) and Elizabeth Douglas (Mother) were divorced in 1999. The final divorce decree awarded custody of the couple’s one-year-old son to Father. Two years later, the Department of Family and Children’s Services filed a petition in juvenile court, alleging that the child was deprived and seeking temporary custody. Prior to the final hearing on the petition, Father and Mother entered into an agreement to transfer custody of the child to Mother. After a hearing, the juvenile court incorporated the agreement into an order that transferred custody to Mother, provided for visitation by Father, and relieved the Department of any further custodial obligations.
Six years later, Father filed a petition for writ of habeas corpus in superior court, contending that the child should be returned to him because the juvenile court order awarded only temporary custody to Mother and has expired, and that he is still the child’s legal custodian pursuant to the divorce decree. The habeas court denied the petition, finding that Mother is the legal custodian by *549virtue of the juvenile court order incorporating the agreement to change custody. Father appeals.
1. Father claims that the habeas court erred in finding that Mother has legal custody of the child pursuant to the juvenile court order. Juvenile courts have exclusive original jurisdiction over cases in which a child is alleged to be deprived. OCGA § 15-11-28 (a) (1) (C). In this case, the juvenile court had authority to exercise its exclusive original jurisdiction because there was a bona fide allegation that the child was deprived. See In the Interest of K. L. H., 281 Ga. App. 394, 395-396 (636 SE2d 117) (2006). In such a deprivation proceeding, the juvenile court may award temporary custody to another parent, but it does not have authority to grant permanent custody absent a transfer order from the superior court. OCGA § 15-11-28 (c) (1); In the Interest of C. F., 199 Ga. App. 858, 859 (1) (406 SE2d 279) (1991); In the Interest of C. C., 193 Ga. App. 120, 121 (1) (387 SE2d 46) (1989). Because the issue of permanent custody or modification of the divorce decree was not transferred to the juvenile court from the superior court, the juvenile court could only grant temporary custody to Mother in the deprivation proceeding. Accordingly, the habeas court erred when it concluded that the juvenile court had awarded permanent custody to Mother.
Moreover, the juvenile court’s order, which disposed of the Department’s deprivation proceeding, expired as a matter of law two years after it was entered. OCGA § 15-11-58.1 (a); In the Interest of A. J., 269 Ga. App. 580, 581, fn. 2 (604 SE2d 635) (2004). Because Mother’s temporary custody has expired, the habeas court erred when it concluded that she has legal custody of the child and that Father’s claim of unlawful detainment of the child is not viable. See Wood v. McGee, 241 Ga. 242, 243 (244 SE2d 846) (1978).
2. Father further contends that the habeas court order amounts to an improper change of custody in violation of the Georgia Child Custody Intrastate Jurisdiction Act of 1978 (the Act). OCGA § 19-9-20 et seq. Prior to passage of the Act, habeas corpus was an appropriate process by which to seek a change of child custody. See Matthews v. Matthews, 238 Ga. 201 (232 SE2d 76) (1977); Tyree v. Jackson, 226 Ga. 690, 692 (1) (177 SE2d 160) (1970). However, the Act, which became effective in January of 1979, now specifically prohibits the use of a complaint in the nature of habeas corpus to seek a change of child custody. OCGA § 19-9-23 (d); Munday v. Munday, 243 Ga. 863 (257 SE2d 283) (1979). Instead, the Act mandates that “any complaint seeking to obtain a change of legal custody of the child shall be brought as a separate action in the county of residence of the legal custodian of the child.” OCGA § 19-9-23 (a).
*550Although habeas corpus can no longer be used to seek a change in child custody, it can still be used by a legal custodian seeking to enforce a child custody order. See Alvarez v. Sills, 258 Ga. 18-19 (365 SE2d 97) (1988). However, even where a legal custodian brings such a habeas action, no complaint seeking to change custody may be made “[a]s a counterclaim or in any other manner in response to a petition for a writ of habeas corpus seeking to enforce a child custody order. . . OCGA § 19-9-23 (c) (1). This Court’s decision in Hutto v. Hutto, 250 Ga. 116 (296 SE2d 549) (1982) is consistent with this statutory prohibition against a change of custody claim being raised in response to a habeas action brought to enforce a child custody order.
In Hutto, the mother, who had legal custody, filed a habeas action for the return of her daughter from the father, who had physical custody. The habeas court exercised its discretion, considered the best interests of the child and awarded custody to the father. Hutto v. Hutto, supra at 117. This Court reversed, noting that
[OCGA § 19-9-24 (a)] provides that in no case, whether by complaint or by counterclaim in response to a habeas petition, shall the physical custodian ... “be allowed to maintain against the legal custodian any action for . . . change of child custody so long as custody of the child is withheld from the legal custodian in violation of the custody order.”
(Emphasis omitted.) Hutto v. Hutto, supra. This Court then held that the habeas court erred in allowing “the physical custodian to present evidence and essentially maintain an action [to change custody] against the legal custodian even though he was withholding custody of the child from the mother ... in violation of the custody order . . . .” Hutto v. Hutto, supra.
The instant case is similar to Hutto, in that Father is the legal custodian pursuant to the divorce decree, and he properly brought a habeas action to enforce that decree. In response, Mother may not maintain an action to change custody based merely on changed circumstances. Rather, the habeas action must be resolved under the standard set forth in Dein v. Mossman, 244 Ga. 866, 868 (1) (262 SE2d 83) (1979). In that case, this Court cited the discretion given to habeas courts to determine custody under what is now OCGA § 9-14-2, and then explained that
“[t]he trial court, upon hearing a writ of habeas corpus for the detention of a child, is vested with a discretion in *551determining to whom its custody shall be given. Such discretion should be governed by the rules of law, and be exercised in favor of the party having the prima facie legal right to custody of the child unless the evidence shows that such person has lost the right to custody through one of the ways recognized in [OCGA §§ 19-7-1 and 19-7-4], or through unfitness.” [Cits.] (Emphasis supplied.)
Dein v. Mossman, supra at 868 (1).
The dissent incorrectly claims that the habeas court should not apply the Dein v. Mossman standard, and should instead use the standard set forth in Dearman v. Rhoden, 235 Ga. 457, 458 (3) (219 SE2d 704) (1975), which would allow for a change of custody based on changed circumstances. The dissent’s reliance on Dearman is misplaced because it was decided prior to the effective date of the Act. Since that case was decided when it was still appropriate to seek a change of custody in a habeas proceeding, the standard it used, considering a change in circumstances, is not applicable to this case, in which the legal custodian is simply seeking to enforce a child custody order.
Rather, as directed by Dein v. Mossman, the habeas court in this case should have exercised its discretion in favor of Father, as legal custodian, unless he has lost his right to custody through unfitness or one of the legal grounds set forth in OCGA §§ 19-7-1 and 19-7-4, such as voluntary contract releasing parental rights, consent to adoption, failure to provide necessaries, abandonment, or cruel treatment. See Columbus v. Gaines, 253 Ga. 518, 519-520 (322 SE2d 259) (1984) (habeas court affirmed where it denied father’s petition for custody of daughter because he contracted away parental rights, failed to provide necessities and abandoned child, and was unfit as a parent). Nevertheless, “[i]t should be noted that the [mother] is not without recourse as [she] may file the proper complaint seeking a change in custody of the child in [the county of residence of the legal custodian].” Hutto v. Hutto, supra at 118.
Judgment reversed.
All the Justices concur, except Benham, J., who dissents.