CLAY, Commissioner. We have before us an application for a writ of prohibition to restrain the Judge of the Whitley Circuit Court from proceeding in an equity action, brought to have determined a mother's right to the custody of two infant children. This is the second phase of the controversy involving that question. In Chamblee v. Chamblee, Ky., 248 S.W.2d 422, a habeas corpus suit, we decided that petitioner, the father, was entitled to their temporary possession or custody under the provisions of an Alabama judgment. We will briefly outline the circumstances which led to the present proceeding.
While married, the two parties and their children resided in Alabama. The mother was granted a divorce there and awarded custody of the children, the decree prohibiting her from removing them from the state for a period of longer than two weeks. In July 1951, petitioner applied for modification of that judgment on the ground that the mother was no longer a fit and proper person to have their care. Immediately after being served with summons, the mother left the state with the children, eventually moving to Kentucky. In the habeas corpus proceeding brought by petitioner in Kentucky, we held that the Alabama judgment awarding him custody should be given full faith and credit, and that the Whitley County Court should not have undertaken to re-determine the question of permanent custody.
Immediately after the issuance of the mandate from this Court, the mother filed a petition in equity in the Whitely Circuit Court wherein she asked to be awarded the permanent custody of the children on the ground of changed conditions. This was a proper proceeding, as we indicated in our first opinion, Chamblee v. Chamblee, Ky., 248 S.W.2d 422, provided the Whitley Circuit Court had jurisdiction of the subject matter and the parties.
The basis of petitioner's application for the writ of prohibition is that: (a) the Kentucky court does not have jurisdiction because the children, whose status is the subject matter of the suit, were legally domiciled in Alabama; and (b) his ultimate remedy by appeal is inadequate to afford the relief to which he is entitled.
Respondent takes the position that this Court is not authorized to issue a writ of prohibition where the right of appeal exists. The authorities cited do not sustain such a position, and Section 110 of the Constitution imposes no such limitation.
This Court has a broad discretion in the issuance of such writs, and each case must be adjudged on its particular merits. Rush v. Denhardt, 138 Ky. 238, 127 S.W. 785. See also Weaver, Mayor v. Toney, Judge, 107 Ky. 419, 54 S.W. 732, 50 L.R.A. 105. Our opinions have consistently distinguished between those cases: (1) where the inferior court lacks jurisdiction; and (2) where the court, having jurisdiction, is proceeding erroneously. It is in the latter class of cases that we have emphasized the need for a showing of great injustice and irreparable injury for which there is no adequate remedy by appeal or otherwise. See Duffin v. Field, Judge, 208 Ky. 543, 271 S.W. 596; Osborn v. Wolfford, Circuit Judge, 239 Ky. 470, 39 S.W.2d 672; Frain v. Applegate, Judge, 239 Ky. 605, 40 S.W.2d 274; Hargis v. Swope, Judge, 272 Ky. 257, 114 S.W.2d 75; Smith v. Burnett, 300 Ky. 249, 188 S.W.2d 480. We must bear in mind that the present case falls within the first classification, it being claimed that the circuit court totally lacks jurisdiction of the subject matter which would authorize it to proceed at all.
It has been held that the remedy by way of appeal is not the controlling consideration where the inferior court is without jurisdiction. In Hargis, &c. v. Parker, Judge, &c., 27 Ky.Law Rep. 441, 69 L.R.A. 270, in discussing the writ of prohibition, the Court said, 85 S.W. at page 706, 85 S.W. 704, 27 Ky.Law Rep. at page 443:
'It may issue whether or not there is an appeal. Whether it ought to issue in advance of the decision of the lower court, or whether the party will be left to his remedy by appeal, will depend on whether that remedy is given, and whether it is adequate or not. This court will be slow to use the writ where there is an appeal, but its valuable office to the citizen who is being oppressed by unlawful assumption of judicial authority will not be limited by set rules.'
In Fleece, Adm'r v. Shackelford, Judge Madison Circuit Court, 204 Ky. 841, 265 S.W. 460, a writ of prohibition was granted even though the petitioner had a remedy by appeal. It was there held that the right to appeal does not necessarily indicate an adequate remedy. The practical point was made that, with the dominant issue presented, a decision should be reached, rather than to send the parties back for a trial, which would likely result in an appeal, necessitating a reversal requiring the proceedings to be commenced all over again in another tribunal.
We have much the same situation here. In the former opinion, Chamblee v. Chamblee, Ky., 248 S.W.2d 422, the question of jurisdiction was in the background. In the present prohibition proceeding, that question is squarely presented. If the Whitley Circuit Court lacks jurisdiction to proceed in this case, it would be a most inept ruling to deny the writ, require a trial on the merits, and then on an appeal be forced to reverse the case on the very question which is now before us. We therefore conclude that if the Whitley Circuit Court lacks jurisdiction of the subject matter of the action, petitioner should be entitled to his writ of prohibition.
We have recognized that in an equity proceeding involving custody, the children constitute the res or rem upon which the jurisdiction of the court depends. Shippen v. Bailey, 303 Ky. 10, 196 S.W.2d 425; Abbott v. Abbott, 304 Ky. 167, 200 S.W.2d 283. We have further recognized that their presence within the jurisdiction is determined by whether or not they are domiciled there. Callahan v. Callahan, 296 Ky. 444, 177 S.W.2d 565, and Abbott v. Abbott, 304 Ky. 167, 200 S.W.2d 283. In the former case we stated as follows, 296 Ky. at page 445, 177 S.W.2d at page 565:
'* * * a state can exercise through its courts jurisdiction to determine the custody of children, or to create the status of guardian of the person, only if the domicile of the person placed under custody or guardianship is within the state.'
This is the same rule set forth in Restatement, Conflict of Laws, Section 117.
Accepting such a principle, the important question confronting us is whether or not the children involved in the present case are domiciled in Kentucky or Alabama. The latter was originally their state of domicile. The judgment of the Alabama court, awarding custody to the mother, undertook to keep the children within that jurisdiction because she was prohibited from removing them therefrom for a longer period than two weeks. We believe it has been generally recognized, as contended by respondent, that such a provision in a custody decree is not binding upon courts of other states to the extent that the original state retains exclusive jurisdiction of the children. See 116 A.L.R. 1309. However, such ...