
545 So.2d 786 (1989)
Lester Melton HOECK
v.
Wendy Annette HOECK.
Civ. 6843.
Court of Civil Appeals of Alabama.
May 10, 1989.
Ellsworth P. Scales III, Mobile, for appellant.
No brief for appellee.
L. CHARLES WRIGHT, Retired Appellate Judge.
This is an appeal from a judgment of divorce.
Lester Hoeck and Wendy Hoeck were divorced in November 1988. The trial court's order withheld determination of permanent custody of the parties' two and one-half year old son pending a "home life investigation" of the parties. The mother was given temporary custody, on the condition that she provide a "decent, clean and moral environment for the minor child." The father appeals from the award of custody, or in the alternative, petitions this court for a writ of prohibition. The mother has not filed a brief with this court.


*787 I.
The father asserts that the circuit court lacked jurisdiction to determine the custody of the minor child. His assertion is premised on the fact that in April 1987 the juvenile court issued an order of dependency and awarded temporary custody of the minor child to the paternal grandparents. He insists that pursuant to section 12-15-30, Code 1975, the juvenile court retains jurisdiction over the custody of the minor until the minor reaches twenty-one years of age.
In reviewing section 12-15-30, we find that the juvenile court has "exclusive original jurisdiction" over child dependency proceedings, and over proceedings in which custody of a child is to be determined when the child "is otherwise before the court." §§ 12-50-30(a)(1) and 12-15-30(b)(1). However, section 12-15-30(b)(1) specifically provides the following exception to the "original jurisdiction" rule:
"This provision, however, shall not be construed to deprive other courts of the right to determine the custody or guardianship of the person of children when such custody or guardianship is incidental to the determination of cases pending in those courts. Such courts, however, may certify said questions to the juvenile court for hearing and determination or recommendation."
Furthermore, once a juvenile court acquires jurisdiction of a minor child, it has the authority to transfer the proceeding to another appropriate court or to defer to another court's decision. Crawford v. Crawford, 497 So.2d 166 (Ala.Civ.App. 1986).
Here the record reflects that the juvenile court deferred the matter of the minor's custody to the circuit court. In denying the father's jurisdictional argument made prior to the trial, the circuit court stated: "I talked to [the juvenile judge] and he agrees that I should hear the entire matter...."
Originally, the juvenile court had sole jurisdiction of the minor child pursuant to a dependency proceeding. Once the divorce complaint was filed wherein the custody of the minor child was at issue, the circuit court assumed concurrent jurisdiction pursuant to the section 12-15-30(b)(1) exception. Rowe v. Hill, 365 So.2d 1247 (Ala.Civ.App.1979). The juvenile court and the circuit court agreed that the circuit court would decide the entire matter of custody. (There should have been a written order entered to that effect.) Although we find that the juvenile court relinquished its jurisdiction over the minor child, we do not find that the grandparents' legal right to temporary custody of the minor child, which was granted by the juvenile court, was thereby terminated. We find no error. The father's petition for writ of prohibition is denied.

II.
The father next contends that the portion of the decree awarding temporary custody of the minor child to the mother should be invalidated for failure to join the paternal grandparents as mandated by Rule 19, Alabama Rules of Civil Procedure. He asserts that the grandparents were "obvious necessary parties" and "real parties in interest" because, at the time the divorce proceedings were initiated, they had temporary custody of the minor child pursuant to a valid court order. The father did not raise this issue during the proceedings below. It has been previously determined, however, that the absence of an indispensable party can be raised for the first time on appeal. Geer Bros., Inc. v. Walker, 416 So.2d 1045 (Ala.Civ.App.1982).
Rule 19, A.R.Civ.P., requires a two-step process. The first concerns the question of whether someone who is not a party to an action should be joined as a party. Rule 19(a). If that question is decided in the affirmative, and for some reason the absent party cannot be made a party, then the court must determine whether the action should proceed. Rule 19(b). The factors of Rule 19(b) are to be applied only if joinder is not feasible. Withington v. Cloud, 522 So.2d 263 (Ala.1988). In this instance, we are concerned only with the first process under Rule 19(a) because, *788 from all indications, the joinder of the grandparents is certainly feasible.
Rule 19(a) provides the following:
"(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 his absence complete relief cannot be accorded among those already parties, or (2) he claims an interest relating to the subject of the action and is so situated that the disposition of the action in his absence may (i) as a practical matter impair or impede his 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 his claimed interest. If he has not been so joined, the court shall order that he be made a party. If he should join as a plaintiff but refuses to do so, he may be made a defendant, or, in a proper case, an involuntary plaintiff. If the joined party objects to venue and his joinder would render the venue of the action improper, he shall be dismissed from the action."
The father contends that, under the circumstances, the grandparents had "an interest relating to the subject of the action," and the disposition of the action in their absence impaired their ability to protect that interest.
The indispensability of a party under Rule 19(a) is not determined by some specific formula. The determination must be made in the context of each particular case by applying equitable principles. Felder v. State, 515 So.2d 17 (Ala.Civ.App. 1987). The "interest" relating to 19(a)(2) must be one that is legally protected and not merely a financial interest or one of convenience. Ross v. Luton, 456 So.2d 249 (Ala.1984).
We find the grandparents' interest in the custody of their grandchild to be a legally protected one because at the time the divorce proceedings were initiated the grandparents had legal custody of the child pursuant to a valid court order. That order by the juvenile court remained in effect at all times.
Having determined that the grandparents do have an interest relating to the subject of the action, we must now determine whether or not their absence as a named party impaired their ability to protect that interest. Rule 19(a)(2)(i). In Ross v. Luton, supra, the supreme court found that "even a party whose interest may be affected by a court action may not be indispensable if its interest is adequately represented by a party already before the court." In Moody v. Moody, 339 So.2d 1030 (Ala.Civ.App.1976), this court found that: "[T]he fact that one has not been technically joined as a party of record does not preclude his being bound by a judgment, if he had a sufficient interest in the suit and participated in and controlled the litigation." We do not think the exceptions of Ross and Moody apply to the facts of this case. The record indicates that prior to the hearing, the parties had agreed that temporary custody of the child would remain with the paternal grandparents. It was not until after the proceedings had begun, that the mother made it known that she was seeking custody of the child. The father could not adequately protect the interests of the paternal grandparents.
The grandmother and the grandfather were present at the hearing and, through their testimony, attempted to show that the child was better off in their custody. However, had they known prior to the hearing that the court would consider the custodial matter, they could have procured an attorney to represent their interests and, if they so desired, presented other witnesses and evidence to support their contention that they should retain custody of the child.
We find that the paternal grandparents have an interest in the disposition of the action concerning the custody of their grandchild, and they are at least "persons to be joined if feasible." Under the circumstances, it was incumbent upon the court, sua sponte, to order that they be made party defendants. "The absence of a necessary and indispensable party necessitates the dismissal of the cause without prejudice or a reversal with directions to allow *789 the cause to stand over for amendment." Withington v. Cloud, supra.
We find it proper here to reverse the award of temporary custody to the mother with directions that the grandparents be made parties to the action. Other matters in the decree are affirmed.
The foregoing opinion was prepared by Retired Appellate Judge L. CHARLES WRIGHT while serving on active duty status as a judge of this court under the provisions of section 12-18-10(e), Code 1975, and this opinion is hereby adopted as that of the court.
AFFIRMED IN PART, REVERSED IN PART, AND REMANDED WITH DIRECTIONS.
All the Judges concur.
