Thе rights of the parties to this controversy have become embogged in a procedural quagmire. As a result, we have the anomalous situation in which petitioner, in his answer to the Wilson County divorce actiоn, pleads respondent’s departure from his home in Albemarle on 21 September 1965 as an abandonment which defeats her suit, while the judge presiding in Stanly County denies her motion to dismiss the
habeas corpus
proceeding pending there because no resumption of marital relations has been shown. It would seem that an unconditional, bona fide resumption of marital relations, if such has occurred, would have vacated any order оf custody then in force. Certainly it would destroy the status which, in the beginning, gave the court jurisdiction to issue the writ under G.S. 17-39. See
Hester v. Hester,
“When a contest shall arise on a writ of habeas corpus between any husband or wife, who are living in a state of separation, without being divorced, in respect to the custody of their children, the court or judge, on the return оf such writ, may award the charge or custody of the child or children so brought *183 before it either to the husband or to the wife, for such time, under such regulations and restrictions, and with such provisions and directions as will, in the oрinion of such court or judge, best promote the interest and welfare of the children. At any time after the making of such orders the court or judge may, on good cause shown, annul, vary or modify the same.
G.S. 17-39.1, enacted on 7 May 1957, as Chapter 545 of the Session Laws of 1957, provides:
“In addition to the above mandatory section (G.S. 17-39) and other methods authorized by law for determining the custody of minor children, any superior court judge hаving authority to determine matters in chambers in the district may, in his discretion, issue a writ of habeas corpus requiring that the body of any minor child whose custody is in dispute be brought before him or any other qualified judge. Upon the return of said writ the judge may аward the charge or custody of the child to such person, organization, agency or institution for such time, under such regulations and restrictions, and with such provisions and directions, as will, in the opinion of the judge, best рromote the interest and welfare of said child. The cause may be retained for the purpose of varying, modifying or annulling any order for cause at any subsequent time.”
Prior to the enactment of G.S. 17-39.1, the deсisions of this Court made it quite clear that immediately upon the institution of an action for divorce, either absolute or
a mensa et thoro,
jurisdiction of the custody of the parties previously acquired under G.S. 17-39 was ousted and vested in the court in which the divorce action was pending. G.S. 50-13. The rule was succintly stated by Barnhill, J. (later C.J.), in
Phipps v. Vannoy,
“So soon as the 'state of separation’ between husband and wife resolves itself into, brings about, or is followed by an action for divorce in which a complaint has been filed, the jurisdiction of the court acquired under a writ of habeas corpus as provided by G.S. 17-39 is ousted and authority to provide for the custody of the children of the marriage vеsts in the court in which the divorce proceeding is pending. Robbins v. Robbins, ante, 430; In re Blake, supra; McEachern v. McEachern, supra; In re Albertson, supra; Tyner v. Tyner,206 N.C. 776 ,175 S.E. 144 ; Story v. Story,221 N.C. 114 , 19 S.E. (2) 136. Jurisdiction *184 rests in this court so long as the action is pending and it is pending for this purpose until the death of one of the parties.
“When, however, the parents were divorced outside this State, either parent may have the question of custody as between them determined in a speciаl proceeding in the Superior Court. G.S. 50-13.”
Accord, Swicegood v. Swicegood, post,
at 278,
Did the enactment of G.S. 17-39.1 change this well established rule and authorize the judge, in his discretion, to use habeas corpus as an alternative or additional remedy to all other authorized methods for determining custody, including actions for divorce? See 36 N.C. L. Rev. 52, 53 (1957).
In
Cox v. Cox,
“When a divorce action is instituted, jurisdiction over the custody of the children born of the marriage vests exclusively in the court before whom the divorce action is pending and becomes a concomitant рart of the subject matter of the court’s jurisdiction in the divorce action. G.S. 50-13.” (Emphasis added.)
In
Cleeland v. Cleeland,
“Prior to 1957 habeas corpus could not be used to determine the right to the custody of children whose parents had been divorced, In re McCormick,240 N.C. 468 ,82 S.E. 2d 406 ; but by legislative act, c. 545, S. L. 1957, G.S. 17-39.1, the marital status of parents is not now a factor in determining the procedure to оbtain custody of a child.”
In
In re Herring,
Other cases in which G.S. 17-39.1 has provided the remedy to determine custody are:
In re Craigo,
We have found no case decided since the passage of G.S. 17-39.1 in which custody has been adjudicated in a
habeas corpus
proceeding
after
a divorce action has been instituted. The statements quоted above from
Cleeland
and from
In re Herring
were too broad and are hereby disapproved to the extent that they conflict with the rule that the institution of a divorce action ousts custody jurisdiction acquired under
habeas corpus.
To hold that with thе enactment of G.S. 17-39.1 the legislature gave the judge presiding in the district the discretion to issue a writ of
habeas corpus
and to hear and determine the custody of all infants, without regard to previous decisions relating to their custody, would make a shambles of the statutes relating to custody. G.S. 7-103 (c); G.S. 17-39; G.S. 17-39.1; G.S. 50-13; G.S. 50-16; G.S. 110-21(3).
Ipsissimis verbis,
some of those statutes are conflicting and inconsistent, and this Court, from time to time, has labored hard to reconcile or harmonize them. See
Blankenship v. Blankenship,
The filing of an action for divorce, either absolute or
a mensa et thoro,
abrogates the necessity for
habeas corpus
to determine cus
*186
tody, for the court, in its equitable jurisdiction, has the inherent power to order the children of the parties brought beforе it.
Bunn v. Bunn,
In this case, alimony pendente lite has been awarded respondent in Wilson County. There is at prеsent no support order in the habeas corpus proceeding in Stanly County. Conceding, arguendo, that custody could be awarded respondent in that proceeding, the judge there would then be called upon to fix the amount which petitioner should pay her for the child’s support.
We are constrained to believe that the legislature did not intend habeas corpus under G.S. 17-39.1 to be used to determine custody disputes between parents divorced in North Carolina or between whom a divorce aсtion is pending, but that this section provides an alternate remedy (to be used in the judge’s discretion) in other cases. We hold, therefore, that the institution of a divorce action in this State ousts the custody jurisdiction previously obtained under a writ of habeas corpus, whether it be issued under G.S. 17-39 or G.S. 17-39.1. We note, however, that the general rule that exclusive custody jurisdiction is vested in the divorce court is subject to an exception: It was held in Blankenship v. Blankenship, supra, that a сourt before which an action for alimony without divorce (G.S. 50-16) was pending did not lose its custody jurisdiction to the court of another county in which an action for divorce had been subsequently filed. It was there pointed out that prior to the 1953 and 1955 amendments to G.S. 50-16, this Court had uniformly held that the court in which a divorce action was instituted obtained and retained exclusive jurisdiction over the custody of the children of the marriage as long as both parties lived and that, until the 1953 amendment to G.S. 50-16, custody of children could not be determined in an action for alimony without divorce. Blankenship holds that G.S. 50-16 created an additional method whereby all questions rеlating to custody and child support are brought into and determined in the suit for alimony, that is, in one action. This decision was bolstered by the 1955 amendment to the statute, which provided *187 that custody orders were authorized in actions under G.S. 50-16 “in the same manner as such orders are entered by the court in an action for divorce.” It noted, however, that, ii the divorce action had been first instituted, the court in which that action was рending would have acquired exclusive jurisdiction. For a comment on Blankenship, see 47 N.C.L. Rev. 464 (1963).
Respondent did not lose her right to challenge the custody jurisdiction of the Superior Court of Stanly County by failing to appeal from the order entered by Judge Olive on 26 October 1966. “Jurisdiction over the subject matter cannot be conferred upon a court by consent, waiver or estoppel, and therefore failure to demur or object to the jurisdiction is immaterial.” 1 Strong, N. C. Index, Courts § 2 (1957);
Hart v. Motors,
The order of Olive, J., dated 26 October 1966, and the order of McLaughlin, J., dated 29 December 1966, are reversed, and this cause is remanded to the Superior Court of Stanly County, which is directed to enter an order dismissing the habeas corpus proceeding from the docket.
Reversed.
