On December 15, 2010, L.E.P. (“the mother”) was killed in an automobile accident. The mother had been married to S.P. (“the father”) until their divorce, which had been entered on June 2, 2009. The mother gave birth to V.C.P. (“the child”) on February 12, 2010. M.S. (“the maternal grandmother”) filed a dependency petition in the Lowndes Juvenile Court (“the juvenile court”) on December 16, 2010, alleging that the child was dependent because her mother was deceased; because her custody was in controversy; because the father’s paternity had not yet been established; and because the father had been abusive to the mother, had suffered in the past from mental instability, and was unable to provide stability for the child. On December 17, 2010, at the mother’s funeral, the maternal grandmother took custody of the child pursuant to an ex parte order of the juvenile court entered that same day purportedly declaring the child to be dependent and awarding the maternal grandmother temporary legal custody of the child.
The father moved to dismiss the maternal grandmother’s petition, arguing first that the juvenile court lacked jurisdiction because another action regarding the child was pending in Morgan Circuit Court. That action, however, had been instituted after the filing of the maternal grandmother’s petition. The father later renewed his motion to dismiss, adding as grounds for the requested dismissal that the maternal grandmother lacked standing to seek a dependency determination, a paternity adjudication, or a custody award; the father filed a brief in support of this motion. Meanwhile, on January 5, 2011, the juvenile court ordered genetic testing of the child and the father in order to establish paternity. The father objected to the order for genetic testing and sought a change of venue. He then filed this petition for the writ of mandamus.
“ ‘A writ of mandamus is an extraordinary remedy ... that should be granted only if the trial court clearly abused its discretion by acting in an arbitrary or *1252capricious manner.’ Ex parte Edwards, 727 So.2d 792, 794 (Ala.1998). The petitioner must demonstrate:
“ ‘ “(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 Edwards, 727 So.2d at 794 (quoting Ex parte Adams, 514 So.2d 845, 850 (Ala.1987)).”
Ex parte D.J.B., 859 So.2d 445, 448 (Ala.Civ.App.2003).
The father seeks a writ of mandamus compelling the juvenile court to dismiss the maternal grandmother’s petition on two grounds. He first argues that the juvenile court lacks subject-matter jurisdiction over the action because, he asserts, it is a custody action as opposed to a dependency action. See generally E.H. v. N.L., 992 So.2d 740, 741-42 (Ala.Civ.App.2008) (explaining that a juvenile court does not have jurisdiction over custody disputes between divorced parents unless emergency circumstances threatening the welfare of the child exist). Within his argument on this first issue, the father also complains that the juvenile court improperly found the child to be dependent without conducting a hearing on the allegations of dependency. Secondly, he argues that the maternal grandmother lacked standing to initiate the action seeking to establish paternity of the child because, he contends, he is a presumed father under Ala.Code 1975, § 26-17-204(a)(2), which provides that a man is presumed to be the father of a child born within 300 days of the termination of the marriage between the mother and that man by, among other things, divorce.
We must reject the father’s first argument — that the juvenile court lacks subject-matter jurisdiction over the maternal grandmother’s petition because the petition is a petition seeking custody and not a dependency petition — because we conclude that the petition filed by the maternal grandmother contains allegations sufficient to invoke the dependency jurisdiction of the juvenile court.1 The maternal grandmother alleged that the father had been abusive toward the mother, that he had had issues with mental instability, and that he was not capable of providing the child a stable home at the time the petition was filed. In addition, the maternal grandmother alleged in her petition that paternity of the child had not been established and that the mother was deceased, leaving the child without a parent to provide her care.2 Any of those allegations, if proven at trial, would establish that the child is “without a parent ... willing and able to provide for the care, support, or education of the child.” Ala.Code 1975, § 12-15-102(8)a.2. Thus, we conclude that the allegations in the maternal grandmoth*1253er’s petition were sufficient to invoke the dependency jurisdiction of the juvenile court. See, e.g., L.L.M. v. S.F., 919 So.2d 307, 309-10 (Ala.Civ.App.2005) (concluding, under the definition of “dependent child” contained in former Ala.Code 1975, § 12-15-1, that allegations indicating a threat to the welfare of the child were sufficient to invoke the dependency jurisdiction of the juvenile court).
The father further complains that the juvenile court, in its December 17, 2010, order, found the child to be dependent without having held a hearing on the maternal grandmother’s petition. We consider the juvenile court’s order an ex parte temporary order; however, we recognize the impropriety of a dependency finding in an ex parte order. Alabama courts have long held that an evidentiary hearing on the merits of a dependency petition is required in order for a juvenile court to declare a child to be dependent. See Ex parte Linnell, 484 So.2d 455, 457 (Ala.1986) (construing former Ala.Code 1975, § 12-15-65(d), the predecessor statute to Ala.Code 1975, § 12-15-310(a) & (b)); K.C.G. v. S.J.R., 46 So.3d 499, 501 (Ala.Civ.App.2010); and Ex parte W.H., 941 So.2d 290 (Ala.Civ.App.2006) (construing former § 12-15-65(d)). The Alabama Juvenile Justice Act, see supra note 1, did not alter this requirement. In fact, § 12-15-310(a) explains that an “adjudicatory hearing” is a hearing at which evidence is presented in support of a dependency petition, and § 12-15-310(b) states that the juvenile court should hear evidence on the petition if the parties dispute the allegations in the petition or if they fail to respond to the petition. Nevertheless, the juvenile court’s dependency finding, however inappropriate, is not a sufficient basis for dismissing the maternal grandmother’s petition.
We now turn to the father’s argument that the maternal grandmother lacked standing to institute her action. We have explained that the allegations in the petition are sufficient to invoke the dependency jurisdiction of the juvenile court. Alabama law provides that anyone 18 years of age or older with knowledge of the facts forming the basis of the dependency allegations may sign a dependency petition. Ala.Code 1975, § 12-15-121(a). Thus, the maternal grandmother had standing to initiate the dependency action by signing and filing her petition.3
We reach a different conclusion regarding the maternal grandmother’s standing to initiate the paternity portion of the action. Although, under Ala.Code 1975, § 26-17-602, any interested party may bring an action to establish paternity, limitations in Ala.Code 1975, §§ 26-17-607 and 26-17-609, restrict standing to seek an adjudication of paternity in specific instances. When there is a presumed father, the Alabama Uniform Parentage Act permits the presumed father to disprove his paternity at any time. § 26-17-607(a). However, if the presumed father wishes to persist in his presumption of paternity, no one may bring an action to disprove his paternity or to establish paternity in another man. Id. (“If the presumed father persists in his status as the legal father of a child, neither the mother nor any other individual may maintain an action to disprove paternity.”). The Alabama Comment to § 26-17-607 specifically states that “[sjubsection (a) follows Ex parte Presse, 554 So.2d 406 (Ala.1989)[,j and its progeny that favor maintaining the integri*1254ty of the family unit and the father-child relationship that was developed therein.”
As mentioned above, the father in the present case argues that he is a presumed father under § 26-17-204(a)(2), which provides that “[a] man is presumed to be the father of a child if ... he and the mother of the child were married to each other and the child is born within 300 days after the marriage is terminated by death, annulment, declaration of invalidity, or divorce.” The mother and the father had been married, they were divorced on June 2, 2009, and the child was born on February 12, 2010, within 300 days of the entry of the divorce judgment. Thus, the father is the presumed father of the child under § 26-17-204(a)(2), and, pursuant to § 26-17-607(a), the maternal grandmother lacked standing to institute an action seeking to disprove the father’s paternity or to establish paternity in another man because the father has decided to persist in his presumption of paternity.
Accordingly, we grant the father’s petition for a writ of mandamus insofar as his petition relates to the maternal grandmother’s request that the paternity of the child be adjudicated. The juvenile court is directed to dismiss the maternal grandmother’s action insofar as it requests that paternity adjudication. Because the juvenile court’s order requiring the father and the child to undergo genetic testing as a means of proving or disproving the father’s paternity was based on the maternal grandmother’s action seeking to establish paternity, which was instituted without standing, we further direct the juvenile court to vacate that order. See Cadle Co. v. Shabani, 4 So.3d 460, 463 (Ala.2008) (quoting State v. Property at 2018 Rainbow Drive, 740 So.2d 1025, 1029 (Ala.1999) (quoting in turn Beach v. Director of Revenue, 934 S.W.2d 315, 318 (Mo.Ct.App.1996))) (stating that a court that notices or is informed that it lacks subject-matter jurisdiction must dismiss the action and that “ ‘ “[a]ny other action taken by a court lacking subject matter jurisdiction is null and void” ’ ”).
PETITION GRANTED IN PART AND DENIED IN PART; WRIT ISSUED.
THOMPSON, P.J., and PITTMAN and BRYAN, JJ., concur. MOORE, J., concurs in the rationale in part and concurs in the result, with writing.. We do agree, however, that the maternal grandmother did improperly rely on, as a ground for dependency, an allegation that the child's custody was the subject of controversy. Under former Ala.Code 1975, § 12 — 15— l(10)(c), an allegation that a child’s custody was the subject of controversy was sufficient to invoke the dependency jurisdiction of the juvenile court. However, in 2008, the Alabama Legislature, among other things, amended and renumbered Ala.Code 1975, § 12-15-1 et seq., and enacted the Alabama Juvenile Justice Act (“AJJA”), codified at Ala. Code 1975, § 12-15-101 et seq. The AJJA omitted the "custody in controversy” ground for dependency. See Ala.Code 1975, § 12-15-102(8) (defining "dependent child”).
. As we explain below, the maternal grandmother’s allegation regarding the child’s lack of a parent to assume her care after the death of her mother is unfounded based on the father's status as a presumed father.
. Because we have concluded that the maternal grandmother's petition is a dependency petition, we will not entertain the father's argument that the maternal grandmother lacked standing to initiate a custody action in the juvenile court.