
92 S.E.2d 71 (1956)
243 N.C. 702
Grace N. WEDDINGTON
v.
Claude M. WEDDINGTON.
No. 234.
Supreme Court of North Carolina.
March 28, 1956.
*73 John Hugh Williams, Concord, for defendant-appellant.
C. M. Llewellyn and Ann Llewellyn Greene, Concord, for plaintiff-appellee.
BARNHILL, Chief Justice.
In the original action for divorce the plaintiff complied with the requirements of G.S. § 50-13, 3rd par., by alleging that two children were born to the marriage, together with their names and ages, but she did not at that time pray any custodial or other order in respect to the said children. Perhaps she refrained from so doing on the well-founded assumption that the custodial order entered in the habeas corpus proceeding remained in full force and effect until modified by an order entered in this cause. In any event, such is the case.
"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 vests in the court in which the divorce proceeding is pending. [Cases cited.] Jurisdiction 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", or the youngest child born of the marriage reaches the age of maturity, whichever event shall first occur. Phipps v. Vannoy, 229 N.C. 629, 50 S.E.2d 906, 907; Reece v. Reece, 231 N.C. 321, 56 S.E.2d 641; Coble v. Coble, 229 N.C. 81, 47 S.E.2d 798; In re Blake, 184 N.C. 278, 114 S.E. 294; Robbins v. Robbins, 229 N.C. 430, 50 S.E.2d 183; G.S. 50-13.
The relation of an attorney to an action in which he has made an authorized appearance does not cease, in any case, until the judgment in the court where the cause is pending is consummated, that is, made permanently effectual for its purpose as contemplated by law. The relation of the attorney of record to the action, nothing else appearing, continues so long as the opposing party has the right by statute or otherwise to enter a motion therein or to apply to the court for further relief. Henderson v. Henderson, 232 N.C. 1, 59 S.E.2d 227, and cases cited.
An attorney once appearing continues to appear for all purposes until the judgment is satisfied, unless he retires in the meantime by leave of the court, and so long as his name continues to appear there, the adverse party has the right to treat him as the authorized attorney. Ladd v. Teague, 126 N.C. 544, 36 S.E. 45. Service of notice on him is as valid as if served on the party himself. Ladd v. Teague, supra; In re Gibson 222 N.C. 350, 23 S.E. 2d 50.
In this connection it is to be noted that the court acquired jurisdiction of the person of the defendant before he left the State, by service of summons in *74 this action and by voluntary appearance herein. But this is a motion in the cause made after the divorce decree was entered. Of this motion defendant is entitled to notice. G.S. § 50-13, 1st par. This notice was served on counsel of record. It was likewise served on the defendant by a process server of South Carolina. Hence as to him the court had jurisdiction to proceed to hear the motion, and the custodial order entered is valid, as against the defendant personally. McRary v. McRary, 228 N.C. 714, 47 S.E.2d 27.
We have repeatedly held, however, that any proceeding involving the custody of an infant child is in the nature of an in rem proceeding, and the "custody of the child" is the res, Hoskins v. Currin, 242 N.C. 432, 88 S.E.2d 228, over which the court must have jurisdiction before it may enter a valid and enforceable order affecting the person of the infant, other than in the exercise of its coercive jurisdiction. Coble v. Coble, supra, and cases cited; McRary v. McRary, supra; In re DeFord, 226 N.C. 189, 37 S.E.2d 516.
"If both parents are in court and subject to its jurisdiction, an order may be entered, in proper instances, binding the parties and enforceable through its coercive jurisdiction. McRary v. McRary, supra." Coble v. Coble, supra [229 N.C. 81, 47 S.E.2d 801].
On the other hand, if the child is not within the jurisdiction of the court, the court is without power to make an order awarding the child's custody. Gafford v. Phelps, 235 N.C. 218, 69 S.E.2d 313, and cases cited. It follows that the court below was without authority to enter any valid order affecting the custody of the infant who was at the time in the State of South Carolina. Sadler v. Sadler, 234 N.C. 49, 65 S.E.2d 345; Coble v. Coble, supra. The child must be present in the State and within the jurisdiction of a court of competent jurisdiction before such court may render a valid decree awarding its custody. Richter v. Harmon, 243 N.C. 373, 90 S.E.2d 744, and cases cited. If the custody of the child is the issue, the child must be within the bounds of the State. Coble v. Coble, supra.
The court must have jurisdiction before it may enter a valid and enforceable order. And the presence of the subject matter of an action within the jurisdiction of the court is a requisite of jurisdiction.
We have been informally advised that since the order herein, which is the subject matter of this appeal, was entered, the defendant has delivered custody of the child to the plaintiff, and that it is now in the jurisdiction of the court below. If this be a fact, the plaintiff is at liberty to seek an order herein incorporating in this action the custodial order entered in the habeas corpus proceeding or pray any modification thereof as she may desire. Furthermore, if the provision for visitation is continued, the court below may enter an order requiring the defendant to give bond for the safe return of said infant or impose any other pertinent provision before the defendant may be allowed again to take the child out of the jurisdiction of the court.
The order entered will be modified so as to accord with this opinion. As so modified it is affirmed.
Modified and affirmed.
