W.L. ("the father") appeals from a judgment of the Escambia Juvenile Court ("the juvenile court") denying his petition seeking custody of G.A.M. ("the child"), a boy born in June 2016. Because we conclude that the juvenile court did not have before it a necessary party who should have been joined if feasible, we reverse and remand.
M.M. ("the mother") gave birth to the child prematurely after only 25 weeks of gestation. The child was born with life-threatening medical problems and was treated in the intensive-care unit of a hospital for eight months after his birth. When the final hearing in this action was held, the child was approximately 16 months old and still required 24-hour care.
In July 2016, the Escambia County Department of Human Resources ("DHR") filed a dependency petition, which was assigned case number JU-16-106.01, alleging that the mother was unable to care for the child and that the identity of the child's father was unknown. DHR's petition alleged that, the day after the child's birth, it had received a report that the mother had had cocaine, methamphetamine, and amphetamines in her system when she had given birth to the child and that the child also had had illegal drugs in his system. DHR's petition further alleged that it had an ongoing investigation of the mother based on a report that she had neglected her other child and that the mother had informed DHR that she had criminal charges pending against her in both Alabama and Florida. The petition asked the juvenile court to award temporary custody *319of the child to D.B. and R.B. ("the grandparents"), the child's maternal grandfather and maternal stepgrandmother. Following a hearing, the juvenile court entered an order finding that the child was dependent, awarding the grandparents pendente lite custody of the child, granting the grandparents the authority to secure emergency medical treatment for the child while he was in their custody, and providing that the mother could have supervised visitation with the child at the discretion of the grandparents.
In September 2016, the father filed a petition for custody of the child, which was assigned case number JU-16-106.02 ("the .02 action"). The juvenile court appointed a guardian ad litem to represent the child and appointed counsel to represent the father. The grandparents were served with process; however, no attempt was made to serve the mother with process. The juvenile court subsequently entered an order requiring DNA testing of the father and the child, and the mother was served with a copy of that order by certified mail while she was incarcerated in Santa Rosa County, Florida. The mother never filed any pleadings or motions or appeared at any hearings in the .02 action. The results of the DNA test established that the father was indeed the child's father. In September 2017, the juvenile court entered an order awarding the father two hours of visitation with the child each Saturday, with the visitation to be supervised by the grandparents. Following a final hearing, the juvenile court entered a judgment that implicitly found that the child remained dependent, found that the father did not have the necessary family-support system to provide the child with the 24-hour care he needed, found that the grandparents did have such a family-support system, denied the father's petition for custody, maintained the grandparents' pendente lite custody, and maintained the visitation previously awarded the father.
The father timely filed a postjudgment motion, which the juvenile court denied. The father then timely filed a notice of appeal. This court has jurisdiction over the appeal pursuant to Rule 28(A)(1)(c)(i), Ala. R. Juv. P.
Neither the father nor the grandparents raised an issue regarding the failure to join the mother as a party in the juvenile court, and neither the father nor the grandparents have raised that issue on appeal. However,
" '[f]ailure of the plaintiff or the trial court to add a necessary and indispensable party, and of the defendant to raise the absence of such party in his or her pleadings, does not necessarily dispose of the issue. This defect can be raised for the first time on appeal by the parties or by the appellate court ex mero motu.' "
Chicago Title Ins. Co. v. American Guar. & Liab. Ins. Co., 892 So.2d 369, 371 (Ala. 2004) (quoting J.C. Jacobs Banking Co. v. Campbell, 406 So.2d 834, 850 (Ala. 1981) ).
In pertinent part, Rule 19, Ala. R. Civ. P., provides:
"(a) Persons to Be Joined if Feasible. A person who is subject to jurisdiction of the court shall be joined as a party in the action if (1) in the person's absence complete relief cannot be accorded among those already parties, or (2) the person claims an interest relating to the subject of the action and is so situated that the disposition of the action in the person's absence may (i) as a practical matter impair or impede the person's ability to protect that interest or (ii) leave any of the persons already parties subject to a substantial risk of incurring double, multiple, or otherwise inconsistent obligations by reason of the claimed *320interest. If the person has not been so joined, the court shall order that the person be made a party. If the person should join as a plaintiff but refuses to do so, the person may be made a defendant, or, in a proper case, an involuntary plaintiff. If the joined party objects to venue and joinder of that party would render the venue of the action improper, that party shall be dismissed from the action.
"(b) Determination by Court Whenever Joinder Not Feasible. If a person as described in subdivision (a)(1)-(2) hereof cannot be made a party, the court shall determine whether in equity and good conscience the action should proceed among the parties before it, or should be dismissed, the absent person being thus regarded as indispensable. The factors to be considered by the court include: first, to what extent a judgment rendered in the person's absence might be prejudicial to the person or those already parties; second, the extent to which, by protective provisions in the judgment, by the shaping of relief, or other measures, the prejudice can be lessened or avoided; third, whether a judgment rendered in the person's absence will be adequate; fourth, whether the plaintiff will have an adequate remedy if the action is dismissed for nonjoinder."
In Hall v. Reynolds, 60 So.3d 927, 929-30 (Ala. Civ. App. 2010), this court stated:
" Rule 19(a) defines who is a necessary party to an action. Prime Lithotripter Operations, Inc. v. LithoMedTech of Alabama, LLC, 855 So.2d 1085, 1092 (Ala. Civ. App. 2001) ; Adams v. Boyles, 610 So.2d 1156, 1157 (Ala. 1992). See also Committee Comments on 1973 Adoption of Rule 19. Certain necessary parties are also indispensable parties under Rule 19(b) :
" 'A party is an indispensable party pursuant to Rule 19(b), Ala. R. Civ. P., if: (1) he is a necessary party under the definition of Rule 19(a) ; (2) he cannot be made a party to the action; and (3) the trial court concludes that in equity and good conscience the action cannot proceed without the absent party.'
" 855 So.2d at 1092.
"Our supreme court discussed the application of Rule 19 in Liberty National Life Insurance Co. v. University of Alabama Health Services Foundation, P.C., 881 So.2d 1013 (Ala. 2003) :
" 'We have discussed the application of Rule 19 as follows:
" ' " 'Rule 19, Ala. R. Civ. P., provides for joinder of persons needed for just adjudication. Its purposes include the promotion of judicial efficiency and the final determination of litigation by including all parties directly interested in the controversy. Hooper v. Huey, 293 Ala. 63, 69, 300 So.2d 100, 105 (1974), overruled on other grounds, Bardin v. Jones, 371 So.2d 23 (Ala. 1979).' "
" ' Dawkins v. Walker, 794 So.2d 333, 336 (Ala. 2001) (quoting Byrd Cos. v. Smith, 591 So.2d 844, 846 (Ala. 1991) ).
" ' " Rule 19, [Ala.] R. Civ. P., provides a two-step process for the trial court to follow in determining whether a party is necessary or indispensable. Ross v. Luton, 456 So.2d 249, 256 (Ala. 1984), citing Note, Rule 19 in Alabama, 33 Ala. L. Rev. 439, 446 (1982). First, the court must determine whether the absentee is one who should be joined if feasible under subdivision (a). If the court determines that the absentee should be joined but cannot be made a party, the provisions of (b) are used to determine whether *321an action can proceed in the absence of such a person. Loving v. Wilson, 494 So.2d 68 (Ala. 1986) ; Ross v. Luton, 456 So.2d 249 (Ala. 1984). It is the plaintiff's duty under this rule to join as a party anyone required to be joined. J.C. Jacobs Banking Co. v. Campbell, 406 So.2d 834 (Ala. 1981).
" ' " 'If such persons are not joined, the plaintiff must, under subsection (c) of Rule 19, [Ala. R. Civ. P.], state their names and the reasons why they are not joined. If there is a failure to join a person needed for just adjudication by a litigant then under subsection (a) of Rule 19, the trial court shall order that he be made a party.'
" ' " 406 So.2d at 849-50....
" ' "We note that the interest to be protected must be a legally protected interest, not just a financial interest. Ross, supra ; see Realty Growth Investors v. Commercial & Indus. Bank, 370 So.2d 297 (Ala. Civ. App. 1979), cert. denied, 370 So.2d 306 (Ala. 1979). There is no prescribed formula for determining whether a party is a necessary one or an indispensable one. This question is to be decided in the context of each particular case. J.R. McClenney & Son v. Reimer, 435 So.2d 50 (Ala. 1983), citing Provident Tradesmens Bank & Trust Co. v. Patterson, 390 U.S. 102, 88 S.Ct. 733, 19 L.Ed. 2d 936 (1968)."
" ' Holland v. City of Alabaster, 566 So.2d 224, 226-27 (Ala. 1990) (emphasis omitted). "The absence of a necessary and indispensable party necessitates the dismissal of the cause without prejudice or a reversal with directions to allow the cause to stand over for amendment." J.C. Jacobs Banking Co. v. Campbell, 406 So.2d 834, 850-51 (Ala. 1981). See also Stamps v. Jefferson County Bd. of Educ., 642 So.2d 941, 945 (Ala. 1994) (Almon, J., concurring in part and dissenting in part).'
" 881 So.2d at 1021-22."
In the present case, the mother was a necessary party under Rule 19(a) because her parental rights to the child had not been terminated -- those rights remained intact, subject only to the pendente lite custody of the child awarded the grandparents in the dependency action brought by DHR. Therefore, the mother should have been joined as a party in the .02 action if it was feasible. However, she was not joined in that action, and no determination was made regarding whether it was feasible or, if it was not feasible, whether the action should proceed in her absence. Therefore, we reverse the judgment of the juvenile court and remand the cause for further proceedings consistent with this opinion.
REVERSED AND REMANDED.
Thompson, P.J., and Thomas, Moore, and Donaldson, JJ., concur.