
30 So.3d 434 (2009)
Ex parte G.L.
(In the Matter of H.C.L., a minor child).
2080260.
Court of Civil Appeals of Alabama.
May 22, 2009.
Ronald L. Allen, Anniston, for petition.
Submitted on mandamus petition only.
THOMAS, Judge.
The opinion issued by this court on February 27, 2009, is withdrawn, and the following opinion is substituted therefor. G.L. ("the grandmother"), the paternal grandmother of H.C.L. ("the child"), petitions this court to issue a writ of mandamus to the Talladega Juvenile Court, ordering *435 that court to instruct the juvenile-court intake officer to accept for filing her complaint alleging that there existed an emergency as to the immediate welfare of the child and, thereafter, to file a dependency petition with respect to the child. We grant the petition and issue the writ.
On November 17, 2008, the grandmother filed a complaint with the intake office of the Talladega Juvenile Court. The complaint alleged that the child was nine years old; that the child's parents had been divorced by the Jefferson Circuit Court on February 23, 2000; that the divorce judgment had awarded custody of the child to the child's father; that the father had relinquished custody to the child's mother in June 2006, when allegations of child abuse by the father's wife came to light; that the mother had been convicted of a felony controlled-substance offense in 2004 and had been sentenced to five years' imprisonment; that the mother, who is on probation, had taken up with numerous paramours and had moved between Sylacauga, Cullman, and Florida, removing the child from school several times; that the child had resided in Sylacauga since June 2008; that the mother was currently unemployed, had no means of support, and had failed to provide the child with lunch money; and that the mother recently had been living with her current boyfriend in a Sylacauga motel. The complaint also alleged that the mother had failed or refused to seek necessary medical treatment for the child, who has tubes in her ears that must be removed in order to prevent permanent and irreparable damage to her hearing. On the same day, the grandmother also filed a petition for custody, and a verified petition for ex parte temporary custody, alleging that the child was dependent and requesting that custody be awarded to her.
On December 1, 2008, the juvenile-court intake officer returned the complaint and the petitions to the grandmother's attorney, stating that because "[c]ustody of the minor child had been previously determined in a Circuit Court case in Jefferson County, ... the Juvenile Court doesn't have jurisdiction." On December 18, 2008, the grandmother filed a petition for writ of mandamus with this court.
"Mandamus is a drastic and extraordinary writ, to be issued only where there is (1) a clear legal right in the petitioner to the order sought; (2) an imperative duty upon the respondent to perform, accompanied by a refusal to do so; (3) the lack of another adequate remedy; and (4) properly invoked jurisdiction of the court."
Ex parte Integon Corp., 672 So.2d 497, 499 (Ala.1995).
Rule 12, Ala. R. Juv. P., provides, in pertinent part:
"(A) Any person or agency having knowledge of the facts may make a complaint to the intake office; the complaint shall allege facts sufficient to establish the jurisdiction of the court and the child's delinquency, dependency, or need of supervision. A complaint is made when it is filed with the intake office, which shall immediately note thereon the date and time of filing.
"(B) When a complaint is made, the intake office shall conduct a preliminary inquiry to determine whether the child is within the jurisdiction of the court and whether the best interests of the child or of the public require that a petition be filed.
"(C) If it appears from the preliminary inquiry that the child is within the jurisdiction of the court, the intake office shall either:
"(1) Utilize the informal adjustment process provided by Rule 15[, Ala. R. Juv. P.]; or
"(2) File a petition if judicial action appears necessary.

*436 "(D) The filing of a petition shall occur within 14 days of receipt of the complaint, except as provided in Rule 15 or when a child has been detained."
"The juvenile court is a court of limited jurisdiction, having exclusive jurisdiction over actions based on allegations that a child is dependent, delinquent, or in need of supervision. Ala.Code 1975, § 12-15-30(a)." M.P. v. C.P., 8 So.3d 316, 318 (Ala.Civ.App.2008) (emphasis added).
In S.B. v. P.G.B., 611 So.2d 392 (Ala.Civ. App.1992), this court held:
"Once a circuit court has acquired jurisdiction over a child pursuant to a divorce and decides the question of custody, the circuit court retains jurisdiction over custody until the child reaches majority. P.R.G. v. W.P.R., 590 So.2d 913 (Ala.Civ.App.1991). There are two exceptions to this rule. The juvenile court may exercise concurrent jurisdiction over a disposition of custody where there exists an emergency as to the immediate welfare of the child, P.R.G., or where [the Department of Human Resources] 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)."
611 So.2d at 394.
The allegations in the grandmother's complaint serve to bring this case within the first exception to the rule that a circuit court that has made a custody determination pursuant to a divorce judgment retains jurisdiction over the custody of the child until the child reaches the age of majorityi.e., that "[t]he juvenile court may exercise concurrent jurisdiction over a disposition of custody where there exists an emergency as to the immediate welfare of the child." Id. The grandmother has met the requirements for the relief she seeks. Therefore, this court grants the petition for a writ of mandamus and orders the juvenile court to instruct the intake officer to accept for filing the grandmother's complaint alleging that there is an emergency with respect to the immediate welfare of the child and to exercise jurisdiction over a dependency petition with respect to the child.
APPLICATION FOR REHEARING OVERRULED; OPINION OF FEBRUARY 27, 2009, WITHDRAWN; OPINION SUBSTITUTED; PETITION GRANTED; WRIT ISSUED.
THOMPSON, P.J., and PITTMAN, BRYAN, and MOORE, JJ., concur.
