This is an original suit for writ of mandamus brought by relators Thomas H. *103Crofts, District Judge of Van Zandt County, Texas, 86th Judicial District, and An-cel M. Autry, W. N. Autry and wife, Mary Lou Autry, praying that this court issue its writ of mandamus directing the Court of Civil Appeals for the Eighth Supreme Judicial District at El Paso, Texas, to rescind its order granting writ of mandamus against Judge Crofts.
The facts, as stated in the two Court of Civil Appeals opinions and the briefs of the parties are as follows: The controversy grew out of a suit for divorce and for custody of the children of Ancel and Anita Autry, husband and wife. Six children were born to this marriage. Ancel and Anita made their home in Montgomery County, Maryland. On August 13, 1958, Ancel took the five oldest children and came to Texas, leaving Anita and their youngest child in Maryland. On November 3, 1958, Anita filed suit in Maryland for divorce a mensa et thoro and for custody of the one child left with her. The Maryland court, on March 2, 1959, decreed the divorce a mensa et thoro and gave custody of the youngest child to Anita.
In December, 1958, Ancel filed suit in Van Zandt County, Texas, district court for divorce and for custody of the five children with him, but before Ancel’s suit was tried Anita came to Texas, took the five children back to Maryland with her, and filed proceedings there for custody of those children.
In June of 1959, before legal custody of the five children had been determined by any court, Ancel went to Maryland, got possession of the children, and brought them back to Van Zandt County, Texas. Anita came to Texas, filed an answer to Ancel’s divorce petition then pending in the Van Zandt County district court, and filed a cross-action and pleas in abatement and to the jurisdiction alleging the pendency of her suit in Maryland. The plea in abatement and to the jurisdiction were sustained by the Van Zandt County district court, and Ancel’s divorce suit was dismissed.
Ancel appealed from the order of dismissal to the Fifth Court of Civil Appeals. On equalization of the docket the Supreme Court transferred the case to the Eighth Court of Civil Appeals at El Paso. That court affirmed the order of dismissal on the grounds of comity. 350 S.W.2d 233. Ancel filed application for writ of error in the Supreme Court, but this was dismissed for want of jurisdiction.
On January 10, 1961, Anita filed a petition for writ of habeas corpus in the Van Zandt County district court, alleging that tire Maryland court had entered a decree giving her legal custody and asking that the children be remanded to her possession. Ancel filed an answer and a cross-action by means of which he sought to get a change of legal custody on the ground that there had been a change of conditions since the Maryland decree was entered. When the case was called for trial both Ancel and Anita appeared. Anita’s counsel filed a plea of res judicata based on the previous order of dismissal; this plea was overruled, and the case was continued. Anita then filed a petition for writ of mandamus in the Eighth Court of Civil Appeals at El Paso asking the Court of Civil Appeals to direct the Van Zandt County district judge to issue a writ of habeas corpus remanding the children to her possession. This writ of mandamus was granted by the Court of Civil Appeals. 359 S.W.2d 272.
The relators, Judge Crofts and Ancel Au-try, attack the jurisdiction of the Court of Civil Appeals to issue the writ of mandamus and pray that this court issue a writ of mandamus directing the Court of Civil Appeals to rescind its writ of mandamus.
We think that the Court of Civil Appeals did not have jurisdiction to issue the writ of mandamus ordering the trial court to grant the writ of habeas corpus to Mrs. Autry. The Court of Civil Appeals justifies its assertion of jurisdiction on the ground that the Van Zandt County district court order of dismissal of Ancel’s suit in and of itself required a transfer of posses*104sion of the children to their mother, that such transfer of possession was a mere ministerial act of the district court growing out of the order of dismissal. The Court of Civil Appeals then reasons that it has the power to mandamus the district court to perform the ministerial acts ancillary to its order of dismissal.
We think that the Court of Civil Appeals was mistaken in assuming that an order giving Mrs. Autry possession could be considered ancillary to and a ministerial act flowing from the order of dismissal. It is elementary that a dismissal is in no way an adjudication of the rights of parties; it merely places the parties in the position that they were in before the court’s jurisdiction was invoked just as if the suit had never been brought. White v. White, 70 R.I. 48, 36 A.2d 661, 151 A.L.R. 1374; Bryan v. Smith, 7 Cir., 174 F.2d 212, 11 A.L.R.2d 1402; see 17 Am.Jur. 158, Dismissal, Discontinuance, and Nonsuit, § 86.
The Court of Civil Appeals says that since the trial court had jurisdiction to try An-cel’s divorce suit, the order of dismissal resembles a judgment of the district court from which relief may flow. We do not agree that because the Van Zandt County district court could have asserted its jurisdiction its order of dismissal took on any greater significance than any other order of dismissal. In short, delivery of possession of the children to their mother was not a ministerial act to be done after dismissal was ordered, and her application for writ of mandamus to the Court of Civil Appeals cannot be said to be ancillary thereto.
One basis on which the Court of Civil Appeals justified its granting of the writ of mandamus was that the removal of the children by Ancel Autry from the State of Maryland, while the custody proceeding filed there was pending, was'wrongful. We do not agree. In the absence of an order of the Maryland court enjoining or prohibiting Ancel from removing the children during the pendency of the custody proceeding he had as much right to the possession of the children as did the mother. His removal of the children to Texas was not wrongful or unlawful. Neither was the mother’s removal of the children from Texas to Maryland during the pendency of the divorce and custody proceeding in the Texas court wrongful in the absence of a court order prohibiting such removal. Either court could have entered an order against such removals, but neither did so.
The Court of Civil Appeals has no power to mandamus the district court except as provided for by Articles 1823 and 1824, Vernon’s Ann.Texas St.; Art. V, § 6, Texas Constitution, Vernon’s Ann.St. Under these statutes the Court of Civil Appeals may mandamus only in protection of its appellate jurisdiction and to order a trial judge to proceed to trial and judgment. The Court of Civil Appeals’ writ ordering Judge Crofts to turn over the children to Anita cannot be justified on either ground of mandamus jurisdiction. Judge Crofts has not refused to proceed to trial. On the contrary, the relators contend that when the case was called for trial and all the parties were before the court, it was Mrs. Autry’s counsel who refused to proceed, filed plea of res judicata based on the dismissal order, and threatened to mandamus Judge Crofts if he went ahead and tried Ancel’s custody question. It wás at this point that Judge Crofts continued the cause.
Nor can this mandamus be justified on the ground that the Court of Civil Appeals was protecting its appellate jurisdiction. As we have shown, the application for writ of habeas corpus was an entirely original matter based upon the alleged Maryland decree; it in no way grew out of or was ancillary to the order of dismissal which had been affirmed by the Court of Civil Appeals on appeal.
The Maryland custody decree on which Mrs. Autry relies for her writ of habeas corpus apparently has not been proved, as it does not appear from the record that it was ever before either the district court or the Court of Civil Appeals, but as-*105stiming' that there is a valid Maryland decree vesting custody in her, and assuming that Ancel has refused to obey that decree by keeping the children in his possession, these may be shown in the habeas corpus proceeding in the Van Zandt County district court. It is true that under the decisions of this court the questions of legal custody may be reopened upon allegations by Ancel that conditions have materially changed. Short v. Short, Tex., 354 S.W.2d 933; and Knollhoff v. Norris, 152 Tex. 231, 256 S.W.2d 79. But that is beside the point. The question now before us is which court has the jurisdiction to determine the right to possession of the children on habeas corpus, the district court or the Court of Civil Appeals.
The Court of Civil Appeals has no jurisdiction to issue writs of habeas corpus as an original matter. Art. V, § 6, Texas Constitution; In Re Hoover, 245 S.W.2d 557 (Civ.App., 1952), no writ hist. On the other hand, the district court does have jurisdiction to try originally and to issue writs of habeas corpus in matters of child custody. Art. V, § 8, Texas Constitution; Legate v. Legate, 87 Tex. 248, 28 S.W. 281. The Court of Civil Appeals’ writ of mandamus told Judge Crofts that he must grant the writ of habeas corpus without a hearing and without the exercise of his discretion. While the Court of Civil Appeals may mandamus the district court to proceed to trial and judgment in habeas corpus proceedings, it may not tell the district court what judgment to enter.
In view of this opinion we assume that the Eighth Court of Civil Appeals will rescind its writ of mandamus; otherwise, the writ prayed for herein will issue.