delivered the opinion of the court.
The main question presented by this appeal is whether the custody of a child as previously fixed by one court of the State in a divorce suit may afterwards be changed by another court in a habeas corpus proceeding.
By final decree of the Corporation Court of the city of Alexandria entered August 11, 1943, Ethel T. Woolfolk (now Williams), plaintiff in error, was granted an absolute divorce from Douglas C. Woolfolk on the ground of desertion, and was awarded the custody of their child, Alice, then seven years old. • '
*314Subsequently, on July 8, 1947, in the Circuit Court of the city of Fredericksburg, Douglas C. Woolfolk, herein referred to as plaintiff, filed his petition for a writ of habeas corpus to secure the custody of the child.
The writ was issued, the child was brought into court by its mother, Ethel T. Williams, herein referred to as defendant, the court heard evidence, and by its order entered July 29, 1947, held that the child was being unlawfully withheld by the defendant and awarded its custody to plaintiff, her father.
Defendant assigns as error to that order the refusal of the court to dismiss the proceeding for want of jurisdiction, and the awarding of the custody of the infant to the plaintiff without evidence sufficient to justify that action.
Both plaintiff and defendant have married again since the divorce. The plaintiff lives on a small farm in Caroline county. The defendant separated from her second husband, by whom she had two children, and in December, 1946, moved to Fredericksburg, where she now lives and is • employed. While the plaintiff charged in his petition that the child was not being properly cared for and that the defendant was not suitable to have her custody, the evidence on the subject is to the contrary.
At the time defendant returned to Fredericksburg, Alice was visiting her father in Caroline county. At the request of defendant the father brought her to Fredericksburg. He claims he then found the mother had very poor quarters; that she told him she could not properly - provide for the child, and gave her to him permanently to take back to Caroline county. Defendant claimed that due to temporary difficulty in obtaining a proper living place in Fredericksburg, she agreed for the plaintiff to take the child only until June.
In June, 1947, defendant demanded the return of the child, which was refused. By the aid of the sheriff, but without legal process, Alice was returned to her. She ran away and returned to her father, and again with the assistance of the sheriff she was returned to her mother in Fredericks*315burg, with whom she was when the petition for habeas corpus was filed.
The trial court took the view, as stated in a written opinion, that inasmuch as the child had been removed from the lawful custody of her father, there was.such a change in the facts existing as to give jurisdiction. It was determined from the evidence that Alice, who was then twelve years old, was well developed and mentally alert; that she wished to stay with her father and her wishes should be controlling, all other things being equal between the parties. Her custody was accordingly awarded to her father.
Since, as we think, the Circuit Court of Fredericksburg was without jurisdiction to change the custody as fixed by the Corporation Court of Alexandria in the divorce suit, the sufficiency of the evidence to support the finding is not material.
Section 5111 of the Code (Michie, 1942), as amended, provides:
“Upon decreeing the dissolution of a marriage, and also upon decreeing a divorce, whether from the bond of matrimony or from bed and board, and upon decreeing that neither party is entitled to a divorce the court may make such further decree as it shall deem expedient concerning the estate and the maintenance of the parties, or either of them, and the care, custody and maintenance of their minor children, and may determine with which of the parents the children or any of them, shalTremain; and the court may, from time to time afterwards, on petition of either of the parents, revise and alter such decree concerning the care, custody, and maintenance .of the children and make a new decree concerning the same, as the circumstances of the parents and the benefit of the children may require; * * *
In Kern v. Lindsey, 182 Va. 775, 780-81, 30 S. E. (2d) 707, 709, we said:
“Statutes of this character are found in many of the States, and under the great weight of authority the power of the court to modify the decree is not affected by a removal of the child from the jurisdiction by the parent to whom *316its custody was awarded, or by the fact that such parent and the child have changed their domicile to another State. # # *
“The theory of these cases is that a decree of divorce awarding the custody of a child to a designated party is, so far as such custody is concerned, interlocutory in character and is subject to modification and change as the welfare of the child may demand.
“This accords with the view expressed by this court in Gloth v. Gloth, 154 Va. 511, 551, 153 S. E. 879, 71 A. L. R. 700, where, speaking of Code, section 5111, as amended, we said: ‘The statute expressly gives the court the continuing jurisdiction to change or modify its decree as to the custody and maintenance of minor children.’ (Italics supplied.) ”
In 17 Am. Jur., Divorce and Separation, section 677.4 (1947 Cumulative Supp., p. 68) it is stated:
“The general rule supported by the greater weight of authority seems to be that jurisdiction acquired by a court in divorce proceedings over the subject of the custody and maintenance of the child or children of the parties to the divorce suit is not only continuing but is also exclusive, and precludes any other court in the same state or sovereignty from thereafter acquiring or exercising jurisdiction over the same subject, and that all proceedings relating to the maintenance and custody of such child or children of the divorced parents must thereafter be brought in the same court in which the original decree affecting that subject was rendered.”
See annotation in 146 A. L. R. 1153, where at page 1155 the same statement is made, and cases from many States are collected to support it, including Emrich v. McNeil (to which the note is appended), 75 App. D. C. 307, 126 F. (2d) 841, 146 A. L. R. 1146.
In that case the district court had granted a divorce to the mother on the ground of desertion, but failed to speak as to the custody of their minor child. However, custody was given to the mother by a stipulation filed in the suit. *317The mother later filed a petition for an increase in the amount allowed for the child’s support, which resulted in a decree giving her the custody and requiring the father to pay a weekly sum for the maintenance of the child. On his default she brought suit for judgment in the municipal court, which was dismissed for want of jurisdiction. The Court of Appeals affirmed and said, in part:
“Having acquired jurisdiction, under the circumstances of the present case, the court’s jurisdiction continued for all proper purposes concerning the custody and maintenance of the child. * * *. (126 F. (2d) 843).
“But the important consideration which requires that the equity court—a court of competent jurisdiction—shall retain continuing and exclusive jurisdiction in the present case is one of public policy, i. e., the welfare of the minor child. # * *. A father who is a party to such a proceeding cannot, by contract or otherwise, avoid, or reheve himself from, his primary obligation to maintain a minor child. * * *. After submitting themselves to the jurisdiction of the court, the parents cannot by their agreement deprive it of power to control the custody and maintenance of the child. Such a child is in a very real sense the ward of the court. # * # . (Idem, p. 844).
“So long as they—and especially the child—remain subject to the jurisdiction of the District Court, public policy requires that it, not the Municipal Court, shah determine all questions of custody and maintenance. This is true even as between courts of concurrent jurisdiction—the one which first acquires jurisdiction retains it; and it is true as between courts of different states, unless the welfare of the child requires that the court of the state to which it has been physically removed should assume control.” (Idem, p. 844).
So we said in Gloth v. Gloth, 154 Va. 511, at p. 551, 153 S. E. 879, 892, 71 A. L. R. 700, that the continuing jurisdiction of the court granting the divorce on the question of custody of minor children cannot be taken away by a contract made between their parents.
“The custody and welfare of children are not the subject *318of barter.” Buchanan v. Buchanan, 170 Va. 458, 477, 197 S. E. 426, 434, 116 A. L. R. 688.
See 17 Am. Jur., Divorce and Separation, section 684, pp. 518-19; 27 C. J. S., Divorce, section 303, pp. 1162-63.
There are some cases, it is true, in which it has been held that the jurisdiction of the court of divorce is not exclusive, but most of those are distinguishable on peculiar facts or grounds, as pointed out in the Annotation, supra, 146 A. L. R. 1156. State v. Worthington, 227 Ala. 204, 149 So. 709, is illustrative of those cases.
The exclusive and continuing jurisdiction of the court granting the divorce under section 5111 of the Code, supra, precludes another court of like jurisdiction from changing by writ of habeas corpus the custody previously adjudicated.
Thus it is said In re Blake, 184 N. C. 278, 114 S. E. 294, 295:
“Under our statute (section 6664, Consol. Statutes) a divorce suit is pending for the purpose of an order as to the custody of children after as well as before final judgment. This statute expressly vests in the divorce court the power to award the custody of children, and from time to time to modify or vacate its orders, and the necessary implication is that this jurisdiction is exclusive. It is said in Corpus Juris (sic), page 341, that—
“ ‘This jurisdiction continues during the state of minority, and is subject to be invoked at any time within that period, and will not be interfered with by process issuing out of other courts.’ ”
And in Page v. Page, 166 N. C. 90, 81 S. E. 1060, 1061, where the mother had sued out a writ of habeas corpus for the custody of her child pending appeal, the court said:
“Indeed, if the plaintiff had been entitled to an order, for any reason, to the custody of the child, pending the appeal, and had been living in this state, she should have proceeded by a motion in the case before the court below, and a writ of habeas corpus did not properly lie in any event.”
See also, Annotation, supra, 146 A. L. R., at p. 1164, and *319cases there cited; In re Albertson, 205 N. C. 742, 172 S. E. 411; Karren v. Karren, 25 Utah 87, 69 P. 465; Tull v. Tull, 172 Md. 213, 191 A. 572, 110 A. L. R. 742, and Anno. at p. 745; Anno., 82 A. L. R. at p. 1146.
A contrary holding could result in conflict of jurisdiction, be productive of confusion and subversive of orderly procedure. Certainly the order of the Circuit Court of Fredericksburg could not oust the Corporation Court of Alexandria of its jurisdiction given by the statute. The latter court, in a proper proceeding, could promptly change the custody granted by the Circuit Court of Fredericksburg, and in effect reverse the order of that court. If the Circuit Court of Fredericksburg had authority to determine the custody of the child, so would any other court of similar jurisdiction in any county or city into which the minor child is taken. Litigation of the issue might well be repeated over a period of years, and result in one court in effect exercising appellate powers over the acts of another court of equal jurisdiction.
The conclusion here reached in no wise conflicts with the holding in Buchanan v. Buchanan, supra, relied on by plaintiff. The question there was on the power of the court to make a money award for the future maintenance of a wife and child in a habeas corpus proceeding.
The judgment complained of is reversed and the proceeding is dismissed.
Reversed and dismissed.