
556 S.W.2d 592 (1977)
Ex parte Ronald F. JABARA.
No. 19328.
Court of Civil Appeals of Texas, Dallas.
September 16, 1977.
Rehearing Denied October 20, 1977.
*594 Jay S. Fichtner, Berman, Fichtner & Mitchell, Dallas, for appellant.
Charles H. Robertson, Johannes, Robertson & Wilkinson, Dallas, for appellee.
AKIN, Justice.
This original writ of habeas corpus arises from a dispute between Ronald F. Jabara, relator, and his wife, Mary C. Jabara concerning possession of two of their three children. The Honorable Pat McClung, Judge of the Juvenile Court No. 2 of Dallas County held relator in contempt for his failure to produce the children in court in connection with a writ of habeas corpus filed by Mrs. Jabara seeking possession of two of their children and ordered him confined in jail for seventy-two hours and until he complied by producing the children in court.[1] The court overruled relator's motion to quash predicated upon a prior order of a Texas domestic relations court appointing relator temporary managing conservator. After his commitment to custody, relator applied to this court for a writ of habeas corpus. We granted bail pending this hearing. The sole ground asserted by relator was that the juvenile court lacked jurisdiction because of a divorce action pending in the domestic relations court and an ex parte temporary custody order granting custody to relator. We grant the writ and discharge relator because we hold that the juvenile court had no jurisdiction since the domestic relations court had acquired dominant jurisdiction before the application for writ of habeas corpus was filed in the juvenile court. It follows, therefore, that the juvenile court's order holding relator in contempt is void.
The litigation began when Mary C. Jabara, a resident of Virginia, filed for divorce in that state. In that suit, she sought custody of her two minor children who were then living with her in Virginia. Subsequently, however, relator, a Texas resident and father of the two children, removed the children to Texas. He then filed for divorce in this state and sought managing conservatorship of the children. On May 26, 1977, the domestic relations court of Fairfax County, Virginia, entered an order granting temporary custody of the children to Mary Jabara, and on the same day the domestic relations court of Dallas County issued a decree which appointed relator temporary managing conservator. The following day, May 27, 1977, Mary Jabara filed an application for writ of habeas corpus in the juvenile court of Dallas County, by which she urged that the children be immediately brought before the court and returned to her custody by virtue of the temporary order of the Virginia court. Relator failed to produce the children in court in accordance with a show-cause order and specifically refused to do so when orally ordered by the court to do so. Judge McClung then held Mr. Jabara in contempt. On June 1, Judge McClung ordered the children returned to Mrs. Jabara.
The primary question presented is whether the juvenile court lacked jurisdiction to *595 entertain the habeas proceeding initiated in that court due to the pendency of the action in the Texas domestic relations court. If the juvenile court had jurisdiction to entertain the proceeding, then it had the power to order the children produced in court and to punish by contempt a failure to comply with that order. Before that issue is addressed, however, we must first examine the scope of our own jurisdiction and determine whether we have jurisdiction over a habeas corpus action arising from the juvenile court's order in this case.

Our Jurisdiction
The habeas corpus jurisdiction of the courts of civil appeals is set forth in Tex.Rev.Civ.Stat.Ann. art. 1824a (Vernon Supp.1976). That article authorizes our issuance of writs of habeas corpus "whenever it appears that [the] restraint of liberty is by virtue of any order, process, or commitment issued by any court or judge ... in a divorce case, wife or child support case, or child custody case. ..." (emphasis added) Mrs. Jabara urges that the habeas corpus action she filed in the juvenile court was not a divorce, child support, or child custody case; rather, she asserts that the action merely concerned enforcement of legal rights established by the prior Virginia court order and, therefore, this writ does not fall within the ambit of article 1824a. We cannot agree. In a writ of habeas corpus proceeding in the trial court, the right to custody ordinarily may not be litigated; the sole question is the enforcement of the last valid custody order. Lamphere v. Chrisman, Tex., 554 S.W.2d 935 (1977); Standley v. Stewart, 539 S.W.2d 882, 883 (Tex.1976); see Tex.Family Code Ann. § 14.10 (Vernon 1975). This rule does not, however, preclude classification of the habeas corpus proceeding as a "child custody" case under article 1824a. In this case, the application for writ of habeas corpus was filed to regain physical possession of the children and thus concerned "custody" in that term's most basic sense. The fact that the action concerned enforcement of custodial rights, rather than their determination, does not alter the essential custodial nature of the proceedings. Since we conclude that this is a custody case under article 1824a, we have jurisdiction of this application.

Jurisdiction of the Juvenile Court
We are next confronted with the question of whether the Texas domestic relations court acquired exclusive jurisdiction under Tex.Family Code Ann. § 11.05 (Vernon 1975). For purposes of this discussion, we will assume that the Texas domestic relations court properly acquired jurisdiction of the subject matter, although this point is contested by Mrs. Jabara. Section 11.05(a) provides:
Except as provided in Subsections (b) and (c) of this section, when a court acquires jurisdiction of a suit affecting the parent-child relationship, that court retains continuing jurisdiction of all matters provided for under this subtitle in connection with the child, and no other court has jurisdiction of a suit affecting the parent-child relationship with regard to that child except on transfer as provided in Section 11.06 of this code.
Section 11.01(5) defines a suit affecting the parent-child relationship as "a suit brought under this subtitle in which the appointment of a managing conservator or a possessory conservator, access to or support of a child, or establishment or termination of the parent-child relationship is sought." (emphasis added) Thus, relator argues that a habeas proceeding comes within the definition set out in 11.01(5), because it is a suit in which access to a child is sought. Admittedly, the habeas proceeding seeks to restore a party's access to the child in the sense that it seeks to retrieve children illegally restrained by another. However, the term as used in section 11.01(5) is limited to a suit brought for determination of the legal right to access to a child, rather than a proceeding to enforce a right which currently exists under a previous court order. Thus, section 11.05(a) does not deny jurisdiction to a court other than the domestic relations court in which such suit is pending to entertain a writ of habeas corpus. Instead, the new Family Code was intended to *596 restrict the scope of habeas corpus proceedings to the sole question of whether the relator is entitled to possession under a court order or, in circumstances not relevant here, by virtue of section 12.04. See Smith, Draftsmen's Commentary to Title 2 of the Texas Family Code, 5 Tex.Tech.L. Rev. 389, 435-36 (1974) (hereinafter cited as Draftsmen's Commentary. To hold that writs of habeas corpus could be brought only in the court with continuing jurisdiction would severely restrict the efficacy of this remedy. Persons restraining children will often remove them to another part of the state far from the court with continuing jurisdiction. Thus, the party seeking return of the children may be severely hampered by this ploy if he or she cannot utilize a local court to enforce the right to possession through a habeas proceeding.
Relator argues also that the juvenile court had no jurisdiction because the domestic relations court had acquired dominant jurisdiction of the subject matter of the proceeding in the juvenile court before the application for writ of habeas corpus was filed in the juvenile court. We agree. The order of the domestic relations court appointed Mr. Jabara as temporary managing conservator and temporarily restrained Mrs. Jabara from interfering with his possession and control of the children. When Mr. Jabara asserted the pendency of the action in the domestic relations court by his motion to quash, which we treat as equivalent to a plea in abatement, the juvenile court's jurisdiction was at an end, and it could enter no order except to dismiss the application for habeas corpus. Curtis v. Gibbs, 511 S.W.2d 263, 267 (Tex.1974).
Mrs. Jabara contends that the juvenile court was acting pursuant to the order of the Virginia court, which had obtained jurisdiction before the divorce action was filed in the domestic relations court, and that the Virginia court is the court of dominant jurisdiction. We conclude that the doctrine of dominant jurisdiction does not apply to suits pending in other states. Texas courts may recognize prior proceedings in other states as a matter of comity, but pendency of a proceeding in another state does not oust the jurisdiction of Texas courts to entertain the same controversy. Nowell v. Nowell, 408 S.W.2d 550, 553 (Tex. Civ.App.Dallas 1966, writ dism'd), cert. denied, 389 U.S. 847, 88 S.Ct. 53, 19 L.Ed.2d 116 (1967). Consequently, Mrs. Jabara's contention that the domestic relations court should defer to the Virginia court is a matter she may raise in the divorce case in the domestic relations court, and that court can then decide whether it has actual jurisdiction of the parties and subject matter. This contention cannot properly be raised collaterally in the juvenile court in a proceeding to enforce the Virginia order.
Mrs. Jabara further contends alternatively that the doctrine of dominant jurisdiction does not apply to the action in the domestic relations court because the issue in that court was not the same as that in the juvenile court. She argues that the issue in the domestic relations court was the welfare and best interest of the children temporarily, pending final judgment in the divorce action, and then permanently in the event a divorce should be granted; whereas the only issue before the juvenile court was whether Mrs. Jabara was entitled to immediate possession of the children under the Virginia order. She relies on cases such as McElreath v. Stewart, 545 S.W.2d 955, 957 (Tex.1977), and Standley v. Stewart, 539 S.W.2d 882, 883 (Tex.1976), which hold that under section 14.10 of the Family Code the best interest of the children is not at issue in a habeas corpus proceeding unless an emergency requires an immediate protective order and that the only question is which party has the immediate right to possession under the last valid court order.
We recognize that the divorce action in the domestic relations court raised issues that were not before the juvenile court on Mrs. Jabara's application for writ of habeas corpus. Nevertheless, the issue of the right to immediate possession of the children, which was raised by the application for habeas corpus, was also before the domestic relations court in the temporary conservatorship aspect of the divorce proceeding. *597 On this issue any order of the juvenile court granting the relief sought by Mrs. Jabara would have led to the same kind of "unseemly conflict" pointed out in Curtis v. Gibbs, 511 S.W.2d 263, 266 (Tex.1974). Although the grounds which the domestic relations court could properly consider were broader than those raised in the juvenile court, it was the same controversy insofar as the right of immediate possession of these two children was concerned. The domestic relations court had appointed Mr. Jabara managing conservator and had ordered Mrs. Jabara not to interfere with his possession of the children. The relief sought by Mrs. Jabara in her application for writ of habeas corpus, namely, delivery of the children to her, would necessarily have defeated the order of the domestic relations court. This is exactly the sort of unseemly conflict that the doctrine of dominant jurisdiction is intended to avoid.
Mrs. Jabara points out that Mr. Jabara was not held in contempt for his failure to deliver the children to Mrs. Jabara, but rather for failure to produce them in court as ordered by the writ and orally by the judge of the juvenile court. She argues that the juvenile judge had authority to order Mr. Jabara to bring the children before him so that he could then decide whether the Virginia order or the order of the domestic relations court should be given controlling effect.
We cannot accept this argument. The only purpose of Mrs. Jabara's application for habeas corpus was to obtain immediate possession of the children, notwithstanding the contrary provisions of the order of the domestic relations court. The juvenile court could have granted none of the relief prayed for without conflict with the previous order of the domestic relations court. Consequently, when Mr. Jabara brought to the attention of the juvenile court the previous action pending in the domestic relations court and the previous order issued by that court, production of the children in the juvenile court could serve no purpose. The only proper action by the juvenile court was to dismiss the application for habeas corpus. Any attack on the order of the domestic relations court and any attempt to modify that order were matters to be addressed solely to the domestic relations court. In this connection we note that Mrs. Jabara's attack on the jurisdiction of the domestic relations court on the ground that Mr. Jabara had not been a Texas domiciliary for at least six months prior to filing the suit in the domestic relations court as required by Tex.Family Code Ann. § 3.21 (Vernon 1975) is impermissible. This contention also was a matter to be considered by the domestic relations court. It did not afford grounds for a collateral attack in the juvenile court because these facts did not appear on the face of the domestic relations court order. See Allen v. Bolton, 416 S.W.2d 906, 911 (Tex.Civ.App.Corpus Christi 1967, no writ); Hodges, Collateral Attacks on Judgments, 41 Tex.L.Rev. 499 (1963).
We do not mean to hold that pendency of an action affecting the parent-child relationship necessarily ousts all other courts of habeas corpus jurisdiction. Another court of this state may have jurisdiction to issue a writ of habeas corpus for the purpose of enforcing an order of the court of continuing jurisdiction. See McElreath v. Stewart, 545 S.W.2d 955, 957 (Tex.1977). It is a different matter, however, to say that another court of coordinate jurisdiction may entertain an action which, if successful, would have the effect of defeating an order of the court which had previously acquired jurisdiction. In that situation, the doctrine of dominant jurisdiction clearly applies.
We recognize, also, that Mr. Jabara was in the position of deliberately disregarding an express order of the juvenile court, and we can understand the juvenile court's legitimate concern that its order should be obeyed. Nevertheless, a valid commitment for contempt must rest on violation of an order within the jurisdiction of the court. Ex parte Lillard, 159 Tex. 18, 314 S.W.2d 800, 805 (1958); Ex parte Britton, 127 Tex. 85, 92 S.W.2d 224 (1936). Since we hold, for the reasons stated, that *598 the juvenile court had no jurisdiction to proceed after Mr. Jabara raised the question of pendency of the prior action in the domestic relations court, the commitment was void and Mr. Jabara was not in contempt.
Writ of habeas corpus granted.
NOTES
[1]  The coercive part of the order is now moot because the children were attached under another order of the juvenile court.
