
645 So.2d 297 (1992)
Ex parte K.S.G.
(In the Matter of M.K.G.)
2910264.
Court of Civil Appeals of Alabama.
May 22, 1992.
Certiorari Denied July 7, 1992.
*298 Don P. Bennett, Dothan, for petitioner.
William Prendergast and James E. Long, Asst. Attys. Gen., for respondent.
Alabama Supreme Court 1911389.
RUSSELL, Judge.
In April 1990 the mother filed a petition for divorce in the Circuit Court of Houston County. She was awarded pendente lite custody of the child; however, the court later ordered temporary custody to be placed with the father, with visitation rights for the mother.
On September 26, 1991, the mother filed a dependency petition in the Houston County Juvenile Court alleging that the child was in physical danger in the father's care and requesting immediate custody. The juvenile court issued a pickup order; however, because the child could not be located it was not executed immediately. On that same day, the father filed a motion in the circuit court claiming that the mother's allegations in the dependency petition were false and demanding relief from the pickup order. The circuit court issued an order on October 2 containing the following provision, in pertinent part:
"The Houston County Department of Human Resources will do a home evaluation of both parties to this case.... Pending further orders of this Court, the Department *299 will not take custody of [the child] or take any steps to place him in foster care."
Despite the circuit court's edict, the juvenile court executed the DHR pickup order on October 4, when the child was visiting the mother. The child was subsequently placed in temporary foster care by DHR, pending a 72-hour hearing on the mother's petition for dependency. After this proceeding was held, the juvenile court issued an order finding the child to be dependent and transferring legal custody to DHR. The father then filed a petition in the circuit court for relief from the juvenile court's judgment. The circuit court issued an order requiring DHR to return the child to the father immediately and to appear before the circuit court to show cause for its willful disregard of the October 2 order.
A hearing was held before the circuit court two days later, with DHR present. The court ordered the child to be placed in the paternal grandparents' home, where the father also resides. DHR consented to this disposition.
In January 1992 a final hearing was held on the dependency petition that had remained pending in the juvenile court. DHR reported that the father was not a threat to the child and recommended that the child remain in the custody of his paternal grandparents. However, the juvenile court entered the following judgment:
"Said child is adjudicated to be dependent in that (1) his custody is in controversy; (2) said child is in such condition or surroundings or is under such improper or insufficient guardianship or control as to endanger his morals, health or general welfare; and (3) for any other cause is in need of the care and protection of the state. These findings are based in part on both parents' admissions of alcohol and/or drug abuse."
On February 26, 1992, the circuit court rendered a final decree in the parties' divorce action. The decree ratified an agreement of the parties, filed the day before the proceeding, which provided that the parents would share joint custody of the child with the father retaining primary physical custody. The father then filed a petition for writ of mandamus and a writ of prohibition, seeking to vacate the juvenile court's judgment of dependency and to prevent further adjudication of custody by the juvenile court.
Mandamus and prohibition are extraordinary remedies and will not issue unless there is no other adequate remedy. Ex parte Strickland, 401 So.2d 33 (Ala.1981). Mandamus is proper where there is a clear specific legal right shown for enforcement of which there is no other adequate remedy. Id. Prohibition is proper for the prevention of a usurpation or abuse of power where a court undertakes to act in a manner in which it does not properly have jurisdiction. Id.
The father argues that the juvenile court lacked jurisdiction to make a disposition of custody when the circuit court had already assumed jurisdiction over the issue. He concludes that the juvenile court's judgment should be vacated and the court prevented from further action concerning the mother's dependency petition. We agree.
By statute, the juvenile court has exclusive original jurisdiction in proceedings in which a child is alleged to be dependent, § 12-15-30(a), Code 1975, and in proceedings to determine custody of the child when the child is otherwise before the court. § 12-15-30(b). Nevertheless, the statute does not deprive other courts of jurisdiction to determine the custody of the child when the issue of custody is incidental to the resolution of cases pending in those courts. § 12-15-30(b)(1). Accordingly, when a circuit court acquires jurisdiction over the issue of child custody pursuant to a divorce action, it thereafter retains jurisdiction over that issue to the exclusion of the juvenile court. P.R.G. v. W.P.R., 590 So.2d 913 (Ala.Civ.App.1991); Taylor v. State, 448 So.2d 397 (Ala.Civ.App. 1984).
There are, however, two important exceptions to this rule. First, the juvenile court may adjudicate matters of child custody when there are emergency circumstances which threaten the immediate welfare of the child, even if the circuit court has already gained jurisdiction over the issue of custody through a divorce action. Roberson v. Mc-Aliley, 387 So.2d 840 (Ala.Civ.App.1980). Alternately, *300 the juvenile court may assume jurisdiction to adjudicate custody when DHR brings a separate action alleging dependency and requesting that custody be removed from the custodial parent due to neglect and inability to care for the child. Carter v. Jefferson County Department of Pensions & Security, 496 So.2d 66 (Ala.Civ.App.1986). In such circumstances, the central issue is the child's immediate welfare rather than a mere determination of custody between two fit parents. Id.
In this case, the dependency action was initiated by the mother, not DHR, and was not based on allegations of neglect or of a threat to the child's immediate welfare. The mother's statement in the dependency petition is merely speculative: "[The] child may be in danger, Child's father has exhibited violent behavior, Child may be in danger in father's care. Child's father is on medication for behavior disorders. I request immediate custody of the child." Moreover, it is clear from the petition itself that DHR did not consider the situation described by the mother to be an immediate threat to the child's welfare. The printed DHR dependency petition form contains the following standard provision:
"The said child is ... in immediate or threatened danger or physical and/or emotional harm in that:
[space provided to describe such danger or harm]
and he should be removed immediately."
After interviewing the mother for the dependency petition, the DHR intake officer who completed the petition typed a row of X's over this provision to completely delete it.
At the final hearing on the dependency proceeding, the testifying DHR officer specifically stated that the agency did not see any reason to declare the child dependent. The mother has now agreed to share custody of the child with the father and to allow him to retain primary physical custody of the child; certainly, she would not so agree if she feared for the child's safety under his father's care.
From the foregoing facts, we must conclude that the circumstances of the dependency action do not fall within the exceptions that would empower the juvenile court to adjudicate the issue of custody. There is simply no evidence of an emergency situation which required the juvenile court's usurpation of jurisdiction; rather, it appears that the mother merely sought to gain temporary custody of the child in a different forum after failing to do so in the circuit court.
The juvenile court was without jurisdiction to determine the issue of custody here; therefore, its order is void and mandamus will lie to vacate the judgment. Smith v. Alabama Dry Dock Shipbuilding Co., 293 Ala. 644, 309 So.2d 424 (1975). With the voiding of its order, the juvenile court no longer retains jurisdiction to adjudicate the issue of custody as presented in the mother's dependency petition; accordingly, a writ of prohibition is unnecessary to prohibit further adjudication of this particular petition. However, we would point out that the juvenile court is not prevented from gaining concurrent jurisdiction over the issue of custody in the future if circumstances arise which warrant such an intervention.
WRIT GRANTED.
ROBERTSON, P.J., and THIGPEN, J., concur.
