Gill, J.
This case has been submitted on the plaintiff’s petition and defendant’s return or answer, showing about this state of facts:
On the sworn information of a relative of plaintiff O. P. Coleman, the defendant Dalton, probate judge of *20Bates county, cited said Coleman to appear before said probate court on April 12, 1897, then and there to answer the said information advising that said Coleman was of unsound mind and suggesting to said court that a guardian or curator should be appointed to protect his property, etc. At the date named the said C. P. Coleman appeared by attorney before the probate judge for the purpose of the motion only and moved the said court to dismiss the proceeding, mainly on the alleged ground that he, Coleman, was not a resident of said Bates county, but was domiciled in the adjoining county of Henry, and that, therefore, said probate court of Bates county had no jurisdiction of the proceeding to inquire into the sanity of said Coleman. This motion was verified by the affidavits of said Coleman and by his kinsman, Lafayette Coleman. At the hearing of this motion to dismiss, on April 19, 1897, the plaintiff C. P. Coleman as well as J. M. Coleman, the informant, both in person and by counsel appeared before the probate court. The said C. P. Coleman, so charged with unsoundness of mind, declined, through his attorney, to submit any other evidence as to his residence, except the motion and attached affidavits. But the informant at the time subpeonead and had present a large number of witnesses who testified that said C. P. Coleman at the time of the institution of the proceeding and long prior thereto was, and had been, residing and domiciled in Bates county. Thereupon the defendant, as probate judge, found and declared, “that the domicile of the said C. P. Coleman is, and has been for years, in Bates county, Missouri, but at the time of the service of the notice upon him he was,andhad been, temporarily absent from Bates county since the fourth day of November, 1896, or thereabouts. It is therefore ordered and adjudged by the court that said motion be overruled and the hearing of this pro*21ceeding upon its merits be continued until the thirtieth day of April, 1897.”
It further appears that after this motion had been heard and passed -on by the defendant, probate judge, and before the time had arrived for hearing the ease on its merits, the plaintiff by counsel (first having given defendant proper notice) applied to the circuit court of Bates county, then in session, for a writ of prohibition, praying said circuit court to prohibit said probate judge from further proceeding with said cause; and in said complaint, the same facts, substantially, were set up as in the proceeding now before us. Immediately upon the filing of said petition for prohibition the defendant, probate judge, made his return or answer thereto, stating, in effect, the whole proceedings as had before the probate court, together with the judgment therein, and even more fully and completely than as heretofore given in this statement; and having fully answered the defendant asked to be discharged and that said suit for prohibition be dismissed, etc. And thereupon the parties submitted to the Bates circuit court the application for writ of prohibition, and the court after hearing said cause “and the arguments of counsel and being advised in the premises doth find that the plaintiff is not entitled to the writ of prohibition asked, and it is therefore by the court ordered and adjudged that said writ be and the same is hereby denied and that plaintiff’s petition be dismissed, and that defendant recover of plaintiff his costs in this behalf and that execution issue therefor.”-
The judgment just quoted was rendered in the Bates circuit court on the twenty-sixth day of April, 1897, and on the twenty-ninth, or three days thereafter, the same plaintiff began the suit now pending before us.
*22RprowbJk^nC:Acfrpeiiateucourt:p' ’demurer. on *21I. At the threshold of this case the question is presented, whether or not the judgment entered April *2226, 1897, in the Bates circuit court, and in which plaintiff was denied the identical relief here asked, is not a bar to this suit. We think it must be so decided. The action before Judge Lay was the same in every substantial particular, as that now prosecuted before this court; the same relief was asked and upon the same state of facts. The court heard the case and rendered a final judgment, denying the relief sought, dismissing the petition and awarding defendant his costs. This- must end the controversy. Plaintiff can not be allowed again to vex the defendant with a second suit in another court. Having chosen his tribunal, he must abide its decision or seek its reversal by appeal in the proper way.
The issues in the two actions were identical and the former judgment was upon the merits. This is all that is required to bar the second suit. 1 Freem. on Judg. [4 Ed.], sec. 256. While it is true that the defendant was not required to appear for final hearing in the circuit court, on the twenty-sixth day of April, 1897, but was at that time only called upon to interpose objections to the face of plaintiff’s petition if any he had and resist, if he chose, a preliminary rule, yet the record shows that the defendant appeared in advance of an interlocutory order to show cause, and at once, and without objection, filed his return or answer to plaintiff’s complaint, and the cause was at once heard on its merits, resulting as already stated in the final disposition of the cause. The parties had, clearly, the right to waive the issue of the preliminary writ, and at once submit the case for final hearing, which they, did, and a judgment so entered is final and conclusive between the parties. Cable Co. v. Kansas City, 29 Mo. App. 95, 96.
Council for plaintiff have argued that this hearing before the circuit court was on a demurrer merely to *23the petition and that, the judgment then being on a demurrer is not such as can be pleaded in bar. In the first place it is not correct to say that the pleading defendant filed in the circuit court, in answer to the petition for prohibition, was a demurrer; it is more properly called a return or answer, setting up facts and reasons why the writ should not be granted. But whether the pleading be called the one or the other, it is sufficient to say that by the pleadings the merits of the controversy were thereby submitted and the court at once heard and decided the case. A judgment on demurrer may be as final and conclusive between the parties as any other. It is otherwise only when the judgment on demurrer results from a defective pleading or other demurrable matter not related to the merits of the case; for as said in Bennett v. Bank, 61 Mo. App. 297, the rule is “that a judgment sustaining -a demurrer to a demurrable complaint can not be successfully pleaded in bar to a subsequent action in which the complaint is perfect.” The same author from whom the above was taken uses this language: “A judgment on demurrer to the plaintiff’s complaint is conclusive of everything necessarily determined by it. If the court decides that plaintiff has not stated facts sufficient to constitute a cause of action, or that his complaint is otherwise liable to any objection urged against it, such decision does not extend to any issue not before the court on the hearing of the demurrer. It leaves the plaintiff at liberty to present his complaint in another action, so corrected in form or substance as to be no longer vulnerable to the attack made in the former suit. But a judgment upon demurrer may be a judgment on the merits. If so its effect is as conclusive as though the facts set forth in the complaint were admitted by the parties or established by evidence submitted to the court or jury. No subsequent action *24can be maintained by the plaintiff if the judgment is against him on the same facts stated in the former complaint. If any court errs in sustaining a demurrer and entering a judgment for defendant thereon, when the-complaint is sufficient, the judgment nevertheless is on the merits. It is final and conclusive until reversed on appeal. Until then the plaintiff can not disregard it and maintain another action. The effect of a judgment still in force is never diminished on account of any mistake of law on which it is founded. * * * If a demurrer is sustained and a judgment be entered thereon, this is a decision that upon the facts stated in the complaint the plaintiff is not entitled to recover. To that extent it is upon the merits, and he must necessarily fail in every subsequent action based upon the same facts as those disclosed by his pleading in the former action.” 1 Freem. on Judgments [4Ed.], sec. 267.
Since, then, the so-called demurrer went to the merits, the whole matter became res adjudicata. Ins. Co. v. Smith, 117 Mo. 261-297, and the judgment entered in the Bates circuit court- is a bar to this proceeding.
Jtdisputed facts: wrh'rfen-or. II. We might stop here, and for the reason already assigned deny this writ. But there is another ground, equally satisfactory, for refusing prohibition. It is a "wMl settled principle that “if the existence or nonexistence of jurisdiction depends on contested facts which the inferior tribunal is competent to inquire into and determine, prohibition will not be granted. 19 Am. and Eng. Ency. Law, p. 271, and cases cited; The State ex rel. v. Seay, 23 Mo. App. 623; Hansford v. Hansford, 34 Mo. App. 262; Howland v. R’y, 134 Mo. 474, 479.
“To determine in the first instance its own jurisdiction, as far as the same rests upon contested facts, *25is a legitimate exercise of the judicial powers of every tribunal, and though, it may err in such determination, its so doing is not a usurpation of judicial authority, but error for which the proper remedy of the party aggrieved is by appeal.” State ex rel. v. Seay, supra. <lIf the inferior court has jurisdiction of the subject-matter in a controversy, a mistaken exercise of that jurisdiction or of its acknowledged powers, will not justify a resort to the extraordinary remedy by prohibition. It is never allowed to usurp the functions of a writ of error or certiorari, and can never be employed as a process for the correction of errors of inferior tribunals.” State ex rel. Morse v. Burckhartt, 87 Mo. 533.
There is no doubt as to the jurisdiction of the probate court of Bates county over the subject-matter of the action, that is, over that class of cases. And being so possessed, the defendant, as judge of said court, had power and authority to hear and determine all the issues presented, whether relating to the residence of the alleged insane party or other issues belonging to the case. It was as much the duty of said probate judge to hear and decide the issue of domicile as any other issue within the limits of that controversy, and his judgment was as final and conclusive upon that question as upon any other. State ex rel. v. Smith, 104 Mo. 419, 424.
jurisdiction: ' insane person: di^ncdfacts: In the matter then of inquiring into the sanity of C. P. Coleman it was one of the issues made by the parties as to whether or not said Coleman was a resident of Bates county, arid it was • the duty of defendant as probate judge to hear and decide that contested fact; and the law will not permit that decision to be prevented or controlled by prohibition or mandamus. And having so decided it would seem that either party might *26appeal to the circuit court where the cause should be tried de novo. Coleman v. Farrar, 112 Mo. 54-72. But whether the right of appeal existed or not could not affect the matter of jurisdiction in the probate court to hear and determine the issues of the cause. The right of appeal is statutory. If it exists in a given case, then it may be exercised, otherwise not, and the first or original trial will be treated as conclusive of the controversy.
If it was a conceded fact that said C. P. Coleman was at the time residing and domiciled outside the territorial jurisdiction of the defendant’s court and that said probate judge was notwithstanding usurping jurisdiction over the inquiry, then prohibition would be the proper remedy, and the Mmphy and Boss cases cited by plaintiffs could and would have some application. But here the residence of said Coleman at the date of the citation is not conceded to be outside the limits of Bates county and of the defendant’s jurisdiction. On the other hand the return shows that numerous witnesses, appeared before the defendant and testified that said Coleman was then domiciled in Bates county, and within the jurisdiction of its probate court. It would then be the rankest usurpation for us by this proceeding to withdraw this issue from the defendant and assume a duty belonging to him and not to this court.
For the reasons assigned, we are-then clearly of the opinion that the writ of prohibition should be denied, and, all concurring, it is so ordered.