
638 P.2d 469 (1981)
Victoria G. TURLEY, Appellee,
v.
Willard E. TURLEY, Appellant.
Dorsey G. Gray, Intervenor.
No. 52301.
Supreme Court of Oklahoma.
December 22, 1981.
Gable, Gotwals, Rubin, Fox, Johnson & Baker by Arthur E. Rubin, Tulsa, for appellee and intervenor.
Lassiter & Lassiter by Phillip L. Lassiter, Tulsa, for appellant.
*470 SIMMS, Justice:
This appeal arises from an order of the trial court in a concluded divorce case awarding custody of minor children to their maternal grandfather subsequent to the death of their mother, to whom custody was granted in the divorce proceeding.
The grandfather had obtained a temporary order giving him custody in conjunction with his motion to modify filed in his deceased daughter's divorce action asking the court to grant him permanent custody. The father filed a petition seeking writ of habeas corpus. The motion to modify and the father's habeas corpus were consolidated for hearing. At the beginning of the second day of testimony the father unilaterally, and without leave of court, dismissed his habeas corpus action. The father now complains the trial court was without jurisdiction to award custody of the children to the grandparent in the concluded divorce case.
The Court of Appeals affirmed the order of the trial court. We Grant Certiorari, Vacate the opinion of the Court of Appeals, and Remand to the trial court with Directions to reinstate the habeas corpus proceedings and award custody of the minor children to the maternal grandfather in the habeas corpus proceeding.
In Ingles v. Hodges, Okl., 562 P.2d 845 (1977), this Court held:
"Upon the death of the parent into whose custody children are placed by a decree of divorce, the children stand, with relation to the surviving parent and all the world, as if no decree of divorce had been entered."
*471 The rationale behind this rule is that when a divorce decree gives custody of children to one parent, as opposed to the other, it is effective only as between the parties to the divorce, and upon the death of one, the right of custody inures automatically to the surviving parent. This position states the majority view[1] and we know of no reason to recede therefrom.
This general rule, however, is qualified in Ingles and cases therein cited, in that a showing of unfitness on the part of the surviving, divorced, non-custodial parent is sufficient to defeat habeas corpus proceedings brought by the surviving parent to obtain custody of the children from their grandparents.
In the case at bar, the trial court proceeded to hear evidence both in support of the father's habeas corpus proceeding as well as the grandfather's motion to modify. The children were present. The trial court had jurisdiction over the parties, the children, and the general subject matter. The dismissal of the habeas corpus proceedings without leave of court, after the evidentiary hearing had commenced did not defeat the jurisdiction of the trial court to enter an order for the protection of the minor children.
We do not deviate from the common law and statutory right[2] of a complainant to control his cause by dismissal at his pleasure on payment of costs. However, we recognize an exception to this rule which is applicable to habeas corpus proceedings to determine child custody. At 39 Am.Jur.2d, p. 268, § 128, we find the following language:
"A petitioner in habeas corpus proceedings brought for the purpose of determining the right to custody of a minor child has no right to deprive the court of jurisdiction, after jurisdiction has attached by a voluntary dismissal. Thus, when a petition for habeas corpus for such purpose is presented to the judge, and a writ issues thereon, the court acquires jurisdiction over the child, and the petitioner is not entitled to bring the proceedings to an end, either by voluntary dismissal entered with the clerk of the court or by motion for dismissal as a matter of course presented to the court."
We find the rationale underlying this exception to the general rule pertaining to voluntary dismissal to be persuasive.
By filing habeas corpus to obtain custody of children, the petitioner appeals to the judge in his status as parens patriae to determine the appropriate custodial disposition of the child, and the best interest of the child is a question of foremost consideration. While the natural parent in habeas corpus proceedings must be affirmatively, not comparatively, shown to be unfit to defeat his legal right to custody of the child, Ingles, supra, p. 846, such was the case here.
We have examined the transcript of the evidence before the trial court and find that a recitation of same would serve no useful purpose. Suffice it to say, the findings of the trial court that appellant/father was an unfit person to have custody and control of the children is supported by clear and convincing evidence.
In short, a petitioner in habeas corpus proceedings, having invoked the jurisdiction of the court as parens patriae for the protection of infants and to protect the health and welfare of children, cannot defeat the parens patriae status of the court by voluntary dismissal.
Because the trial court simply entered the custodial order in the divorce proceedings rather than in the habeas corpus proceedings, we remand this cause to the trial court with directions to vacate the attempted dismissal of the habeas corpus proceedings, and enter the custodial order with right of visitation in the remaining grandparents[3] in the habeas corpus action.
*472 FINDINGS OF THE TRIAL COURT OF FATHER'S UNFITNESS AFFIRMED, BUT CAUSE REMANDED WITH DIRECTIONS TO FIX CUSTODY IN MATERNAL GRANDFATHER IN THE HABEAS CORPUS ACTION.
IRWIN, C.J., BARNES, V.C.J., and HODGES, LAVENDER, DOOLIN, HARGRAVE and OPALA, JJ., concur.
NOTES
[1]  39 A.L.R.2d 258, § 7.
[2]  12 O.S. 1971, § 684.
[3]  The custodial order of the trial court gave visitation rights to the maternal grandmother and paternal grandparents.
