
337 So.2d 715 (1976)
John B. HUFFMAN
v.
Janice GRIFFIN.
No. 48601.
Supreme Court of Mississippi.
September 28, 1976.
*717 Harry Lanier Foote, Jackson, for appellant.
Johnston & Adams, Brandon, for appellee.
Before INZER, P.J., and SUGG and WALKER, JJ.
SUGG, Justice, for the Court:
Janice Griffin, petitioner, filed a petition for writ of habeas corpus in the County Court of the First Judicial District of Hinds County against John B. Huffman, respondent, for the custody of Tammy Gene Huffman, the daughter of the parties who was born on July 12, 1970. Petitioner was awarded custody of the child and the appeal by respondent presents the following questions.
(1) Was an Alabama decree awarding custody of the child entitled to full faith and credit? (2) Did a child custody suit pending in chancery court deprive the county court of jurisdiction to hear the petition for writ of habeas corpus? (3) Did the habeas corpus court have jurisdiction when the child, whose custody was the subject matter of the suit, was physically absent from the state when the petition was filed and process issued, but was returned to the state by respondent before the hearing was concluded because the court threatened to punish him for contempt if he did not return the child to the state for the habeas corpus hearing? (4) Did the trial court err in holding that there had been no material and substantial change in circumstances requiring a modification of the Alabama decree of October 17, 1973?

I

WAS AN ALABAMA DECREE AWARDING CUSTODY OF THE CHILD ENTITLED TO FULL FAITH AND CREDIT?
Petitioner and respondent were formerly husband and wife and resided in Hinds County, Mississippi. About April 2, 1973, petitioner separated from respondent and carried the child of the parties with her to Coffee County, Alabama. She filed a bill of complaint in equity in the Circuit Court of Coffee County on April 4, 1973, seeking custody of the child and the exclusive use of an automobile. An order was entered on April 4 awarding petitioner custody of the child and exclusive use of an automobile pending final hearing of the cause.
On May 14 petitioner amended her bill of complaint and prayed for a divorce and support for the child. On the same day respondent filed an answer, waiver, consent, and a separation agreement executed by both parties. On the following day, May 15, the Alabama court granted petitioner a divorce from respondent. In addition to granting petitioner a divorce the decree contained the following provision:
"It is further ordered, adjudged and decreed by the Court that the agreement of the parties hereto be, and the same hereby is, incorporated into and made a part of this decree.
On September 17, 1973, respondent filed a motion to modify the decree of May 15, and alleged that petitioner was no longer a fit and proper person to have the care and custody of the child. Petitioner filed an answer and petition for rule nisi on October 16. On October 17 the circuit court heard *718 evidence on the motion to modify, motion for rule nisi and answer. The court denied the relief sought by each party on its finding that there had been no material and substantial change in the circumstances of the parties since its decree of May 15.
This action of the court left in effect the custody provision of its former decree which awarded custody of the child to petitioner and required respondent to pay $125 per month child support. In odd numbered years respondent was to have the right to have the child visit him at his residence from June 15 to July 15 and in even numbered years for twenty-one days beginning on June 15 plus one week during Christmas. Respondent was also given the right to weekly visits with the child at reasonable times and places.
Respondent contends that the Alabama decree awarding custody of the child of the parties is not entitled to full faith and credit. This contention is based on the requirement of Section 29, Title 34, Alabama Code of 1940 (1973 Supp.) that a bill for divorce, when the defendant is a non resident, must allege that the complainant has been a bona fide resident of Alabama for six months before filing the bill. The failure of the petitioner to allege and prove that she had been a resident of Alabama for six months next before the filing of the bill causes the divorce decree to be invalid and subject to being set aside on collateral attack. McGough v. McGough, 47 Ala.App. 709, 261 So.2d 49 (Ct.Civ.App. 1971), cert. den., 288 Ala. 746, 261 So.2d 53 (1972).[1]
Because the divorce decree of May 15, 1973, is invalid and subject to collateral attack for the reasons stated in McGough, supra, it does not follow that the portion of the decree awarding custody of the child should not have been accorded full faith and credit by the Mississippi court. The rule in Alabama is that divorce decrees are divisible when custody of children is involved. In Stallworth v. Stallworth, 272 Ala. 449, 131 So.2d 867 (1961), the Supreme Court of Alabama held that a decree of divorce was void for want of jurisdiction, but refused to invalidate the custody provisions of the decree. The Court stated:
While we have condemned the portion of the court's decree which awarded the divorce, this does not necessarily require us to invalidate the entire decree. Avery Freight Lines Inc. v. Persons et al., 250 Ala. 40, 32 So.2d 886. It is true that the court appears to have proceeded under the authority of § 35, Title 34, Code of 1940, to make an award of the custody of the children to the complainant. But this court has said that regardless of the statute, `whenever the welfare of the children is concerned and the jurisdiction of the court is invoked, the court has an inherent power to enter a decree for their custody and support.' Butler v. Butler, 254 Ala. 375, 377, 48 So.2d 318, 319. (131 So.2d at 870).
Calhoun v. Calhoun, 46 Ala.App. 381, 243 So.2d 37 (1970) held that custody provisions in a divorce decree were enforceable although the divorce was not valid because the bill of complaint failed to aver that the plaintiff was a resident of the state for more than one year before filing the bill of complaint.[2]
[T]he bill of complaint, while praying for divorce, also contained averments as to the custody and support of the children, sufficient to invoke the jurisdiction of the court for that purpose. The original order of the court of December 17, 1965, found and accepted jurisdiction only for that purpose. The decree of June 13, 1966, was in fact, only for temporary support of the children.
It has long been settled in this state that a court of equity is the inherent guardian and protector of minor children within its jurisdiction, and no technical requirements of pleading are necessary to *719 invoke such jurisdiction. Stallworth v. Stallworth, 272 Ala. 449, 131 So.2d 867; Butler v. Butler, 254 Ala. 375, 48 So.2d 318; Scott v. Scott, 247 Ala. 598, 25 So.2d 673. (243 So.2d at 40).
The Alabama divorce decree is divisible, and although the divorce awarded by the decree may be subject to collateral attack, the portion of the decree dealing with child custody is valid and is not subject to collateral attack. Where a party appears in a case and is accorded full opportunity to contest the issues, including jurisdictional issues, the doctrine of res judicata may be applied to questions of jurisdiction arising in the case involving the full faith and credit clause where, under the law of the state in which the original judgment was rendered, such adjudication is not susceptible to collateral attack. Coe v. Coe, 334 U.S. 378, 68 S.Ct. 1094, 92 L.Ed. 1451 (1945). We therefore hold that the custody and support provisions of the Alabama decree were not subject to collateral attack and the trial court properly accorded full faith and credit to the decree.

II

DID A CHILD CUSTODY SUIT PENDING IN CHANCERY COURT DEPRIVE THE COUNTY COURT OF JURISDICTION TO HEAR THE PETITION FOR WRIT OF HABEAS CORPUS?
On July 9, 1974, petitioner filed a petition for writ of habeas corpus in the County Court of the First Judicial District of Hinds County against respondent seeking custody of the child of the parties. Respondent filed a motion to dismiss the petition for writ of habeas corpus on several grounds, one being that there was pending in Hinds County Chancery Court a child custody suit filed by respondent against petitioner. The motion averred that the chancery court suit was filed and process served prior to the filing of the petition for writ of habeas corpus. Respondent identified a copy of a petition for child custody filed by him July 1, 1974, under the provisions of Mississippi Code Annotated section 93-11-65 (1972), but did not show that process had been issued or served in the chancery court case.
This motion raises the issue of priority jurisdiction between courts of concurrent jurisdiction. The principal of priority jurisdiction is that where two suits between the same parties over the same controversy are brought in courts of concurrent jurisdiction, the court which first acquires jurisdiction retains jurisdiction over the whole controversy to the exclusion or abatement of the second suit. Lee v. Lee, 232 So.2d 370, 373 (Miss. 1970); Ladner v. Ladner, 206 So.2d 620, 625 (Miss. 1968); 20 Am.Jur.2d Courts § 128, at 481 (1965); 1 C.J.S. Abatement and Revival § 33, at 58-59 (1936); 21 C.J.S. Courts § 492, at 745 (1940).
In this state priority of jurisdiction between courts of concurrent jurisdiction is determined by the date the initial pleading is filed, provided process issues in due course. Euclid-Mississippi v. Western Casualty and Surety Company, Inc., 249 Miss. 547, 559-60, 163 So.2d 676 (1964); Shackelford v. New York Underwriters Insurance Company, 189 Miss. 396, 407-08, 198 So. 31 (1940); Mississippi Code Annotated sections 11-7-33 and 11-7-1 (1972).
In order for respondent to prevail on his motion to dismiss it was necessary that he prove, not only that he had filed a suit in chancery court, but also that process had issued in the suit or, if process had not issued, respondent was not at fault. In Euclid-Mississippi, supra, movant introduced the declaration together with proof of process on defendant. This is the proper procedure. Respondent's motion must fail because he did not introduce evidence that process was issued and served in due course or that he was not responsible for the failure to issue and serve the process.

III

DID THE HABEAS CORPUS COURT HAVE JURISDICTION WHEN THE CHILD, WHOSE CUSTODY WAS THE SUBJECT MATTER OF THE SUIT, WAS PHYSICALLY ABSENT FROM THE STATE WHEN THE PETITION *720 WAS FILED AND PROCESS ISSUED, BUT WAS RETURNED TO THE STATE BY RESPONDENT BEFORE THE HEARING WAS CONCLUDED BECAUSE THE COURT THREATENED TO PUNISH HIM FOR CONTEMPT IF HE DID NOT RETURN THE CHILD TO THE STATE FOR THE HABEAS CORPUS HEARING?
Respondent brought the child to Mississippi from Alabama on June 15, 1974, for an approved twenty-one day visit and refused to surrender custody at the end of the visitation period. Respondent sent the child out of the state on July 6, 1974, to visit relatives and the child had not been returned to the State of Mississippi when the petition for habeas corpus was filed on July 9, 1974. The child was in the state on July 1, 1974, when respondent invoked the jurisdiction of a court in this state by filing a petition in Hinds County Chancery Court for custody of the child. Respondent moved to dismiss the petition for writ of habeas corpus on the ground that the child was outside the state when the petition was filed, process served, and the case called for hearing.
Respondent invoked the jurisdiction of a court in this state to determine the custody of his child in a chancery suit, but moved to dismiss the habeas corpus proceedings brought by the mother on the ground that another court in the same county had no jurisdiction because the child was out of the state. The child was returned to the state before the hearing on the habeas corpus case was concluded. Under these facts we hold that the court had jurisdiction to proceed with the habeas corpus hearing and render a judgment.
Respondent contends further that the child was returned to the state only because he was coerced by the court under threat of citation for contempt and therefore the court did not acquire jurisdiction of the child.
We have not had occasion to address ourselves to the question of the authority of a court to require a resident defendant who has control of a child, and who has been personally served with process or made a voluntary appearance, to compel such person to produce the child before the court when such person has sent the child out of the state.
Rivers v. Mitchell, 57 Iowa 193, 10 N.W. 626 (1881), is a well reasoned case dealing with this question. Sophia B. Rivers filed a petition for writ of habeas corpus on July 10, 1880, against her husband, John D. Rivers. Respondent answered that he had possession and control of the children, but on July 5, 1880, he transferred the control to his mother, Mrs. John Rivers, his co-defendant and that she and the children were residing in the State of Missouri.
Petitioner moved to strike Rivers' answer because it was equivocal and not responsive to the petition. The motion was sustained and respondent was given until the next day to file further pleadings. He filed motions which were overruled and on July 14, 1880, an order was entered finding that Rivers had disobeyed the writ by refusing to produce the children. He was committed to jail until he complied with the writ to produce the children. Rivers applied for and obtained a writ of certiorari for a review of the proceedings. The Court stated:
[D]id Rivers show good cause for not producing the children in court, as provided in section 3475 of the Code? We think he did not. These contests between husbands and wives, who are living separately and apart from each other, as to the custody of their minor children, are peculiar. Although denominated proceedings in habeas corpus, they are unlike the ordinary proceedings for the release of a party held upon a criminal charge. Although the minor child is denominated as the applicant for the writ, no contest is made by him. It is really a controversy between the father and mother, and the question for the court to determine is, which of the contestants is the more suitable person to have the control and custody of the child? It was incumbent on Rivers to show good cause for not producing the children in obedience to the writ. They were presumably in his custody, and we think the court properly found that *721 they were not beyond his control. He made no showing that he could not obey the writ. The mere fact that he put them in possession of his mother, who took them over the state line and into Missouri, is no showing of an inability to produce them. For aught that appears, he had the same power to bring them into the state that he had to send them over the state line and into the state of Missouri. Without some other showing than what was made, we think the court may have fairly found that the minors were taken out of the state for the very purpose of evading any proceeding which the mother might institute to regain the custody of them.
.....
Upon the main question, we think, the opinion of Mr. Justice Cooley,[3] holding that the mere fact that the child was in a foreign jurisdiction is not a sufficient excuse for not producing him in obedience to the writ, is in accord with sound legal principles. In discussing the question, he very pertinently says: `The place of confinement is, therefore, not important to the relief, if the guilty party is within reach of process, so that by the power of the court he can be compelled to release his grasp. The difficulty of affording redress is not increased by the confinement being beyond the limits of the state, except as the greater distance affects it. The important question is, where is the power of control exercised?'
In U.S. v. Davis, [Vol. 25 Fed.Cas. No. 14,925, p. 775] 5 Cranch, 622, it was held that a return to a writ of habeas corpus that the person alleged to be detained was not within the control and custody of the party to whom the writ was directed, and that such person was beyond the jurisdiction of the court, was evasive and insufficient, it appearing that such person had been removed in anticipation of the issuing of the writ by the party to whom it was directed.

In re Stacey, 10 Johns. 327, [328] the return to the writ was, `that the within-named Samuel Stacey is not in my custody.' This was held to be an evasive return, because it was not shown that Stacey was not in the possession or power of the respondent. So, in the case at bar, the return should have shown that Rivers did not have the power to produce the children in court in obedience to the writ. (Emphasis supplied). (10 N.W. at 627-28).
In Ex parte Endo, 323 U.S. 283, 305-306, 65 S.Ct. 208, 89 L.Ed. 243 (1944), the court held that a district court acquired jurisdiction upon filing a petition for a writ of habeas corpus and the removal of Endo did not cause it to lose jurisdiction where the person controlling her custody remained within the district. The Court noted that there were some expressions in cases indicating that the place of confinement must be within the Court's territorial jurisdiction in order to enable it to issue the writ. However, the Court gave a strong indication that a writ of habeas corpus would lie if a respondent was within the reach of its process who had custody of the petitioner. The Court stated:
But we are of the view that the court may act if there is a respondent within reach of its process who has custody of the petitioner. As Judge Cooley stated in Matter of Jackson, 15 Mich. 417, 439, 440:
`The important fact to be observed in regard to the mode of procedure upon this writ is, that it is directed to, and served upon, not the person confined, but his jailer. It does not reach the former except through the latter. The officer or person who serves it does not unbar the prison doors, and set the prisoner free, but the court relieves him by compelling the oppressor to release his constraint. The whole force of the writ is spent upon the respondent.' (323 U.S. at 306, 65 S.Ct. at 220, 89 L.Ed. at 258).
See Ex parte Hayes, 414 U.S. 1327, 94 S.Ct. 23, 38 L.Ed.2d 200 (1973); 39 C.J.S. Habeas Corpus § 54, at 598-99, notes 12-13 and 23 (1944).
*722 Swigart v. Swigart, 193 Pa.Super. 174, 163 A.2d 716 (Pa. 1960), was a proceeding to determine custody of minor children of defendant who had residence in Pennsylvania but who was living with the children in Brazil. The Pennsylvania Court held that where the domicile of the father, who had custody of and power to produce a child, was within the jurisdiction of the court, the court had jurisdiction of the custody proceeding although the child was physically outside the county and commonwealth. The Court stated:
"In People v. New York Juvenile Asylum [57 App. Div. 383], 68 N.Y.S. 279, cited with approval in the Rahal [Commonwealth ex rel. Rahal v. Rahal, 48 Pa. D. & C. 568] case and also by Judge Ervin in Commonwealth ex rel. Scholtes v. Scholtes, 187 Pa. Super. 22, at page 26 [142 A.2d 345] (1958), the court held: `Section 2015 of the Code of Civil Procedure provides that a person imprisoned or restrained of his liberty "within the state" is entitled to a writ of habeas corpus. That has been extended by the courts, and properly so, to authorize the court to require the release of a person who is not within the state if the defendant to whom the writ is addressed has the power to produce him and subject him to the power of the court.'" (Emphasis supplied). (163 A.2d at 718).
We are persuaded that the reasoning of the above cases is sound and a resident defendant who has control of a child, and who has been personally served with process or entered a voluntary appearance, may be compelled to produce the child before the court. It is common knowledge that many parents have been frustrated in their efforts to obtain a hearing in child custody cases because the person having control of the child moves the child from state to state causing delay, expense and perversion of justice. The jurisdiction of a court to resolve the question of the custody of a child should not become a game, subject to the clandestine activity of a party who moves a child from place to place in order to defeat jurisdiction.
In this case the father was a resident of this state, he participated in a child custody proceeding in Alabama, he brought the child to the state for a visit in accord with the Alabama decree, he filed a suit in Mississippi seeking custody of the child in the chancery court of the county of his residence, he sent the child for a visit to Albuquerque, New Mexico, he had control of the child and returned the child to Mississippi after the habeas corpus petition was filed under threat of being held in contempt of court. His defense that he was coerced into bringing the child within the jurisdiction of the state did not defeat the jurisdiction of the habeas corpus court to proceed with the case and render final judgment.

IV

DID THE TRIAL COURT ERR IN HOLDING THAT THERE HAD BEEN NO MATERIAL AND SUBSTANTIAL CHANGE IN CIRCUMSTANCES REQUIRING A MODIFICATION OF THE ALABAMA DECREE OF OCTOBER 17, 1973?
Respondent argues that the court did not consider the change in circumstances and condition of the parties following the rendition of the Alabama decree of October 17, 1973. In his finding of fact, the trial judge stated:
Concerning change in circumstances, even if we were permitted to consider it, we face a situation in which we do not believe that the proof is sufficient to justify a finding of custody for changed circumstances, or is in effect, negligence on the part of the mother.
The action of the trial judge in affording full faith and credit to the Alabama custody decree is affirmed. His finding that he was bound by the Alabama decree and could not consider the question of a material change in circumstances or conditions was error; however, in spite of this, he permitted the respondent a full hearing and permitted respondent to introduce evidence pertaining to the question of changed conditions and circumstances.
*723 Although the trial judge erroneously held he could not consider changed conditions and circumstances, nevertheless, he held that he did not find the proof sufficient to justify a change of custody based on a material change of circumstances and conditions.
We have carefully reviewed the record and have reached the conclusion that the trial judge was correct in refusing to change custody of the child, although he assigned the wrong reason for his action. The rule in this state is that a trial court will be affirmed if it reaches the right conclusion although the wrong reason is assigned. Yazoo & Mississippi Valley Railroad Co. v. Adams, 81 Miss. 90, 32 So. 937 (1902).
AFFIRMED.
GILLESPIE, C.J., PATTERSON and INZER, P. JJ., and SMITH, ROBERTSON, WALKER, BROOM and LEE, JJ., concur.
NOTES
[1]  This case involved a decree before the 1971 amendment to Section 29, Title 34 Alabama Code of 1940 which reduced the residency requirement from one year to six months.
[2]  Calhoun was decided before the 1971 amendment to Section 29, Title 34, Alabama Code of 1940.
[3]  In re Jackson, 15 Mich. 417 (1867).
