
248 S.W.2d 422 (1952)
CHAMBLEE
v.
CHAMBLEE.
Court of Appeals of Kentucky.
April 25, 1952.
*423 James W. Smith, Glenn W. Denham, and Elizabeth Gillis, Middlesboro, for appellant.
L. O. Siler, Williamsburg, for appellee.
CLAY, Commissioner.
This is a habeas corpus proceeding in which a father, appellant, is attempting to obtain possession of his two infant children from his former wife, appellee. The relief sought was denied.
The parties were married in 1938. In 1950 they resided in Alabama, and in June of that year, in that state, appellee was granted a divorce from appellant and was awarded custody of the two children. The judgment provided that appellee should not remove them from the state for a period of longer than two weeks duration.
In July 1951 appellant applied to the Alabama court which had granted the divorce, and asked that custody of the children be awarded to him on the ground that appellee was no longer a fit and proper person to have their care. At that time the parents and the children were still residents of and domiciled in Alabama. Summons was served on appellee there. Two or three days later she moved to Tennessee, and subsequently came to live with her parents in Kentucky, bringing the children with her.
On August 20, 1951, the Alabama court entered an order declaring appellee was not a fit and suitable person to have the care and custody of the children, adjudged that she had violated the original court order by removing them from the state, and awarded their custody to appellant. The present proceeding is based upon this judgment, and appellant's position is that it must be given full faith and credit.
Appellee argues the judgment was void on the ground the children were absent from Alabama at the time of its entry. She apparently concedes the judgment may not be collaterally attacked if the court had jurisdiction of the parties and subject matter. In a custody proceeding the subject matter is the child, and the presence of the child within the jurisdiction, either actually or constructively, is the basis of the court's power to adjudicate this question. In Callahan v. Callahan, 296 Ky. 444, 177 S.W.2d 565, it was said that jurisdiction was dependent upon the "domicile" of the child within the state. See also Shippen v. Bailey, 303 Ky. 10, 196 S.W.2d 425, and Abbott v. Abbott, 304 Ky. 167, 200 S.W.2d 283. Other authorities declare that "residence," "inhabitancy," or "living within the state" supports jurisdiction. See 17 Am.Jur., Divorce and Separation, Section 688; 116 A.L.R. 1309; McMillin v. McMillin, 114 Colo. 247, 158 P.2d 444, 160 A.L.R. 400. It is not necessary for us to distinguish the differing legal effects of these terms, as the children here involved were inhabitants of, resided and were domiciled in Alabama when appellant petitioned the court to award him their custody.
Appellee insists the Alabama court lost its jurisdiction because the children were absent from the state at the time the judgment was entered. She relies upon the Callahan and Abbott cases above cited, wherein we determined that a foreign court had no jurisdiction to make a custody award where the children resided in Kentucky at the inception of the proceedings. The difference between *424 those cases and the present one is readily apparent. When appellant initiated his action, the children were in Alabama, not Kentucky. Appellee's removal of them from the state after she was served with summons clearly could not destroy the power and authority of the Alabama court. Once jurisdiction had attached, it continued until a final judgment was entered, and the children's physical presence in or absence from the state at the time of its entry is of no significance. See Roberts v. Roberts, 300 Ky. 454, 189 S.W.2d 691.
Appellee next contends the Alabama judgment could only be conclusive with respect to the status of the children as of the time it was entered, and that any other court having jurisdiction may redetermine the question of custody upon a proper showing of changed conditions. This general principle was acknowledged in Shippen v. Bailey, 303 Ky. 10, 196 S. W.2d 425, and Frick v. Kaufman, 310 Ky. 829, 222 S.W.2d 185.
It is evident that a foreign judgment need not be given more faith and credit than a domestic one. Since a true custody proceeding has an in rem aspect, and the dominant consideration is the welfare of the child, such judgments are not permanent in character and may be altered upon the showing of materially changed conditions. Yet the right of any court to determine the proper custodian must be based upon its own authority to adjudicate that issue.
This requires us to examine the extent to which a court may, in a habeas corpus proceeding, undertake to change the possession of or transfer the custody of children. Historically habeas corpus was an extraordinary writ to obtain the release of a person held without legal authority. See 25 Am.Jur., Habeas Corpus, Section 2. Insofar as infants are concerned, this remedy does not involve the child's personal freedom, but rather the right of particular persons to have immediate possession or control of the child. Under Section 399 of the Criminal Code of Practice the basis of the writ is that the infant "is detained without lawful authority."
It has always been recognized that equity courts have exclusive jurisdiction to determine finally the question of custody. See Rallihan v. Gordon, Judge, 176 Ky. 471, 195 S.W. 783; Strangway v. Allen, Judge, etc., 194 Ky. 681, 240 S. W. 384. In those cases it was pointed out that even though habeas corpus is a proper remedy to effect the temporary transfer of a child from one person to another, a judgment in such proceeding in no way limits the right of either party forthwith to resort to a court of equity for a determination of the proper person to have the child's ultimate custody.
The distinction between the immediate right to possession of the child, which is the true issue presented in a habeas corpus proceeding, and the more permanent right of custody, which is justiciable only in equity, was clearly drawn in the recent case of Wright v. Wright, 305 Ky. 680, 205 S.W.2d 491. There the husband obtained a divorce and was awarded custody of his child by the Lewis Circuit Court. Having executed a supersedeas bond, the mother kept the child. Two years later the husband commenced in the same court a habeas corpus proceeding. Shortly thereafter in the same court the mother asked for modification of the original custody award. The Chancellor on the habeas corpus application gave possession of the child to the father. The mother appealed from this judgment. We upheld it on the ground that the immediate right to possession was in the father by virtue of the original custody award, and the issue of modifying that award was not cognizable in the habeas corpus proceeding. With respect to the judgment transferring possession to the father, we stated in 305 Ky. at page 682, 205 S.W.2d at page 492:
"That relief was necessarily only temporary in nature and it could have no effect whatever upon the court's final decision as to the ultimate rights of these parties or as to the fundamental welfare of this child."
*425 It is true that in some cases we have acknowledged the right of the court in a habeas corpus proceeding to adjudicate the ultimate right of custody. See Shippen v. Bailey, 303 Ky. 10, 196 S.W.2d 425; and Lowery v. Fayette County Children's Bureau, 306 Ky. 817, 209 S.W.2d 487. In the first case we said "the proceeding partakes of the incidents of a suit in equity," and in the second we said [209 S.W.2d 490] "When the writ is for the purpose of determining the right of custody * * *." In Frick v. Kaufman, 310 Ky. 829, 222 S.W.2d 185, 186, we assumed in a habeas corpus proceeding that the circuit court may have "had jurisdiction to change the permanent status of the parties".
It thus appears that in some habeas corpus proceedings, where the suit was in the nature of an equitable action to redetermine the question of custody, and the court otherwise had jurisdiction of the parties and the subject matter, we have recognized the judgments as effecting more than simply a transfer of possession. Otherwise, as in the Wright case above discussed, we have limited this type of proceeding to its proper scope, as a temporary remedy involving only the issue of what party or parties are immediately entitled to the possession of the child by virtue of some legal authority.
The present action was not initiated as an equitable one. Appellant filed the judgment of the Alabama court awarding him custody of the children, and asked for its enforcement by having appellee deliver the children to him. The lower court had jurisdiction to determine the rights of the respective parents to their immediate possession. The matters pleaded by appellee in her answer, response, and counterclaim, which injected the issue of the ultimate right to custody, were not cognizable in this proceeding, at least over the objection of appellant. The latter filed a general demurrer to appellee's pleading, which should have been sustained. As the court did not properly have before it the question of ultimate custody, and as the Alabama judgment should be given full faith and credit as the latest final adjudication on this question, he was entitled to have the immediate possession of the children.
This conclusion makes it unnecessary for us to consider the question of whether or not, if this proceeding could be treated as an equitable action to determine the question of custody, the lower court had jurisdiction of the subject matter in view of the manner in which the children's residence (but perhaps not their domicile) had been switched from Alabama to Kentucky. See Shippen v. Bailey, 303 Ky. 10, 196 S.W.2d 425, and Restatement, Conflict of Laws, Sections 32 and 145.
For the reasons stated, the judgment is reversed with directions to enter a judgment granting the relief prayed in appellant's petition.
