No question is made as to the right of appeal, the statute providing that in all cases of habeas corpus where a contest arises in respect to the custody of minor children, either party may appeal to the Supreme Court from the final judgment. C. S., 2242; Stokes v. Cogdell, 153 N. C., 181.
*744In bis answer to tbe petition for tbe writ tbe respondent alleges tbat after tbe deed of separation was executed be was granted a decree by wbicb tbe marriage relation between tbe petitioner and bimself was dissolved; and at tbe bearing be introduced without objection a written instrument purporting to be a judgment of tbe municipal court of tbe city of High Point in tbe case of W. H. Albertson v. G. P. Albertson dissolving tbe bonds of matrimony between these parties. In tbe present case tbe judgment awarded tbe custody of tbe child to tbe mother, but Judge Sink made no reference to tbe decree of divorce and recited tbe fact tbat by agreement contained in tbe deed of separation tbe custody of tbe child bad been committed to tbe petitioner.
If tbe parents of James Leslie Albertson have been granted an absolute divorce, tbe controversy in tbe case before us is similar to tbat which arose in tbe case of Natalia Blake, 184 N. C., 278. There a petition for habeas corpus was filed by tbe mother of the child against Hubert M. Blake, tbe child’s father. Tbe petitioner bad previously been divorced from tbe respondent in the Superior Court of Mecklenburg County, but tbe custody of tbe child bad not been determined. Tbe court bearing tbe writ of habeas corpus awarded tbe custody of tbe child to tbe mother and tbe respondent appealed. This Court found error in tbe order chiefly upon provisions contained in sections 1664 and 2241 of tbe Consolidated Statutes. In tbe former section it is provided tbat after tbe filing of tbe complaint in an action for divorce, either from tbe bonds of matrimony or from bed and board, both before and after final judgment therein, it shall be lawful for the judge of tbe court in wbicb such application is or was pending to make such orders respecting tbe care, custody, tuition, and maintenance of minor children of tbe marriage as may be proper, and from time to time to modify or vacate such orders; also tbat tbe judge may commit tbe custody and tuition of such infant children to tbe father or mother as may be thought best, or alternately to one of them for a limited time and thereafter to tbe other.
Section 2241 has tbe following provision: “When a congest shall arise on a writ of habeas corpus between any husband and wife, who are living in a state of separation, without being divorced, in respect to the custody of their children, tbe court or judge, on tbe return of such writ, may award tbe charge or custody of tbe child or children so brought before it either to tbe husband or to tbe wife, for such time, under such regulations and restrictions, and with such provisions and directions as will, in tbe opinion of such court or judge, best promote tbe interest and welfare of tbe children.” For good cause tbe court or judge may annul, vary, or modify tbe order.
In tbe Blake case this Court held tbat tbe parents must be living in a state of separation, “without being divorced,” before tbe court can *745exercise power by proceedings in habeas corpus to determine the custody of a child, and that as tbe parents bad been divorced and freed from the bonds of matrimony, relief should have been sought by motion in the original cause. The interrelation of the two sections (1664 and 2241) is obvious. The Legislature intended that in cases in which the parents have been divorced the custody of children should be determined by the court in which the divorce was granted, and if there has been no divorce and the husband and wife are living in a state of separation, by proceedings in habeas corpus.
In the pending case the respondent offered in evidence a purported decree of divorce between the petitioner and the respondent, but the record contains neither an admission nor a finding of fact that the marriage relation has been dissolved. . An intelligent disposition of the appeal depends upon the determination of this question; if the bonds of matrimony haXe been dissolved the relief sought cannot be administered by the writ of habeas corpus.
The appellee suggests that the municipal court of the city of High Point has no jurisdiction in actions for divorce, but jurisdiction is claimed by virtue of the Public-Local Laws of 1927, chap. 699, amending the Public-Local Laws of 1913, chap. 569, by which the court was created and organized. The asserted invalidity of the divorce does not appear in the decree or the record and we cannot consider the collateral question whether the act creating the court transgressed any constitutional limitations.
The agreement in the deed that the petitioner should have the care and control of the .child cannot deprive the court of its power to adjudicate the custody. 19 C. J., 347, sec. 804; 30 C. J., 1059, sec. 836.
The cause is remanded to the Superior Court for a specific finding on the contested question whether the marriage relation between the petitioner and the respondent has been dissolved.
Error and remanded.