— This was a habeas corpus proceeding brought by appellant to obtain from appellees the custody of his four children aged 12, 10, 8 and 6, respectively. A motion to quash was sustained and, appellant refusing to plead further, judgment was rendered that he take nothing by his petition and that appellees recover their costs. The sustaining of the motion to quash the writ is the only error assigned.
The motion to quash was effective to test the sufficiency of the application to sustain the writ. Schleuter v. Canatsy (1897), 148 Ind. 384, 47 N. E. 825; Willis v. Bayles (1886), 105 Ind. 363, 5 N. E. 8; Edenharter, Supt., v. Connor (1916), 185 Ind. 643, 114 N. E. 212. The rule is elementary that a cause on appeal must be tried upon the record before the court. Hence, a few leading facts shown by the petition will serve to exhibit the questions presented, as well as the basis upon which they are decided. It appears from *341the petition that appellee, Short, is the superintendent, and the other appellees named are the trustees of the Indiana Soldiers’ and Sailors’ Orphans’ Home situate near Knightstownr in Rush county, Indiana; that appellant is the father of the children named who are now in the custody and control of appellees as officers of the home, and who, it is alleged, without right, are unlawfully restraining and holding the possession, custody and control of these children at such home against the right of this petitioner upon the pretense of authority granted by “an order and judgment and decree of the Rush Circuit Court of Rush County, Indiana, made on the first day of November, 1916; that said court at said time made said judgment and order, placing the custody of said children in possession of. said superintendent- and trustees of said Home, and that such order and judgment of said court is the only authority and basis upon which said defendants are claiming the right to the possession and custody of your petitioner’s minor children.” It further states that, since the making of the order and rendition of the judgment mentioned, the petitioner’s circumstances and conditions relative to the care of his children have materially changed, in that he “has fitted up a proper home in which to care for them at No. 105 Eastern Avenue in the City of Connersville, Indiana, and with all necessary and proper furniture and all proper equipment for their reasonable comfort and convenience, and that he has employed a proper and suitable person to take charge of said home, and to watch over and care for his said children; that your petitioner is now, therefore, properly equipped and in position to provide and maintain a comfortable and proper home for the welfare of his said minor children,” and that he is now a fit and suitable person for the care, custody and control of them.
*342*341In this state the father, if a suitable person, and, if *342not, then the mother, if a suitable person, has the preference to the custody of the person, control and education of their legitimate minor children, but either or both may be deprived of such custody in some appropriate proceeding wherein it appears that the welfare of such children is paramount to the claims of the parent. §3065 Burns 1914, §2518 R. S. 1881; Brooke v. Logan (1887), 112 Ind. 183, 13 N. E. 669, 2 Am. St. 177; Bryan v. Lyon (1885), 104 Ind. 227, 3 N. E. 880, 54 Am. Rep. 309; Schleuter v. Canatsy, supra; Berkshire v. Caley (1901), 157 Ind. 1, 7, 60 N. E. 696; Gilmore v. Kitson (1905), 165 Ind. 402, 74 N. E. 1083; Shoaf v. Livengood (1909), 172 Ind. 707, 714, 88 N. E. 598; Keesling v. Keesling (1908), 42 Ind. App. 361, 85 N. E. 837.
In this connection it will be noticed that our Civil Code, §1164 Burns 1914, §1107 R. S. 1881, provides that: “Writs of habeas corpus shall be granted in favor of parents * * * to enforce the rights and for the protection of infants * * *; and the proceedings shall, in all such cases, conform to the provisions of this statute.” And §1165 Bums 1914, §1108 R. S. 1881, provides that: “Application for the writ shall be made by complaint, signed and verified either by the plaintiff or by some person in his behalf, and shall specify — First. By whom the person in whose behalf the writ is applied for is restrained of his liberty; and the place where; naming all the parties if they are known, or describing them if they are not known. Second. The cause or pretense of the restraint, according to the best of the knowledge and belief of the applicant. Third. If the restraint be alleged, to be illegal, in what the illegality consists.”
*343*342Thus it will be seen that in this state the procedure in a habeas corpus proceeding is governed by our Code, and, while parents may have the benefit of such writ to *343obtain possession of their children, they must, by their application, exhibit facts showing that they are entitled to this extraordinary remedy, which is not regarded as a civil action. McGlennan v. Margowski (1883), 90 Ind. 150; Milligan v. State, ex rel. (1884), 97 Ind. 355; Willis v. Bayles, supra; Edenharter, Supt., v. Connor, supra.
As generally understood, the writ of habeas corpus is a “writ of liberty,” and its original purpose was the release of persons illegally or forcibly imprisoned. However, in such cases when it was made to appear that such detention was by virtue of the process of a court, the writ was not granted unless the proceeding or judgment supporting the process was absolutely void. Willis v. Bayles, supra; Williams v. Hert (1901), 157 Ind. 211, 60 N. E. 1067, 87 Am. Rep. 203; State v. Bechdel (1887), 37 Minn. 360, 34 N. W. 334, 5 Am. St. 854. But in cases like the one before us, where the freedom of children is only technically involved, the writ is allowed, not merely to determine legal rights of custody as between applicants therefor, but to accomplish the best interests of the infants, and hence distinguishable from cases involving unlawful imprisonment under color or claim of warrant of law. New York Foundling Hospital v. Gatti (1906), 203 U. S. 429, 27 Sup. Ct. 53, 51 L. Ed. 254; State, ex rel. Evangelical, etc., Society v. White (1913) , 123 Minn. 508; Knapp v. Tolan (1915), 26 N. D. 23, 142 N. W. 915, 49 L. R. A. (N. S.) 83; State v. Bechdel, supra.
In this case the petitioner admits that the children for whose custody he instituted this proceeding were committed to the care and custody of appellees by the order and judgment of the Rush Circuit Court, which is in all respects valid and in full force. And for aught appearing in the application, we *344may assume that the judgment was the conclusion of an appropriate issue to which appellant was a party, ' directly involving the welfare of his children and his fitness to have their care and custody. But appellant insists that such judgment is only prima facie evidence of appellees’ right to the custody of the children, and conclusive only as to the facts and conditions existing up to the time of rendering it. This contention is not entirely correct, for, if the proceedings were such as to give the Rush Circuit Court j urisdiction to make a valid order and judgment committing the children to appellees, such judgment must be regarded as final upon the facts as they then existed, appealable, but otherwise unassailable as other judgments. But the court is not thus precluded from afterwards considering facts and circumstances subsequently arising regarding the same subject-matter and between the same parties. Stone v. Stone (1902), 158 Ind. 628, 631, 64 N. E. 86; Dubois v. Johnson (1884), 96 Ind. 6; Brooke v. Logan, supra, 186 ; Willis v. Willis (1905), 165 Ind. 332, 339, 75 N. E. 655, 2 L. R. A. (N. S.) 244, 6 Ann. Cas. 772; Church, Habeas Corpus (2d ed.) §387; Cormack v. Marshall (1904), 211 Ill. 519, 71 N. E. 1077, 67 L. R. A. 787, 1 Ann. Cas. 256; State v. Flint (1895), 61 Minn. 539, 63 N. W. 1113; Knapp v. Tolan, supra; State v. Bechdel, supra; Slack v. Perrine (1896), 9 App. D. C. 128.
Whether the judgment mentioned as to custody grew out of a divorce proceeding, or a proceeding in habeas corpus between appellant and his wife living apart or between appellant and others, the record is silent, but in either event the children were in the custody of the court and subject, to its disposition under its general jurisdiction. Bullock v. Robertson (1903), 160 Ind. 521, 65 N. E. 5; Stone v. Stone, supra, 633. In case the order was .made on decreeing a divorce, which we may assume in the absence of a *345contrary showing, our statute, §1084 Burns 1914, §1046 R. S. 1881, makes it the duty of the court to make provision for the guardianship, custody, support and education of the minor children of such marriage, and this court has frequently held that such a decree fixes the status of the children and is conclusive between the parties thereto until modified or set aside for cause subsequently shown by an appropriate proceeding in the same cause. Leming v. Sale (1891), 128 Ind. 317, 27 N. E. 619; Stone v. Stone, supra; Stonehill v. Stonehill (1896), 146 Ind. 445, 45 N. E. 600. In Stone v. Stone, supra, 633, it was said: “This jurisdiction applies to the state of minority, and may be exercised in the same case at any time within that period. The fact that the court has rendered judgment upon one state of facts, and disposed of the children as their best interests then required, does not impair the power of the court to decide upon another state of facts, subsequently arising, which affect their welfare.”
It must be kept in mind that this is not an application to change or modify the judgment committing the children to appellees, but it is an independent pro'ceeding based entirely, as we are told, upon certain subsequent facts and changed conditions, which entitles the petitioner, as a matter of right, to the custody of his children. Whatever may be the rule elsewhere, it must be regarded as settled in this jurisdiction that habeas corpus cannot be invoked to- procure the custody of children from those entitled to such custody by virtue of a valid and binding judgment rendered in a divorce proceeding, although such application be based upon new facts and conditions. Hardin v. Hardin (1907), 168 Ind. 352, 81 N. E. 60; Joab v. Sheets (1885), 99 Ind. 328; Willis v. Willis, supra; Williams v. Williams (1859), 13 Ind. 523; Crawford v. Lawrence (1900), 154 Ind. 288, 56 N. E. 678.
*346Moreover, for the sake of the argument, were we to concede appellant’s theory, or treat the judgment of November 1, 1916, as the result of habeas corpus, -still the petition would be insufficient, for it appears that the right in favor of this parent to the control and custody of his children was by a court of competent jurisdiction adjudicated against him. Thus even the presumption of suitability, originally with the parent, was thereby negatived, and the conclusion of the court thus reached had the support of the general presumption of right action, all of which continued until’ overcome by an affirmative showing of new facts or changed conditions calling for the court’s discretion in petitioner’s behalf, as to care and custody, in the interest and welfare of the children. The petitioner in this case does not attempt to state the facts existing at the time and upon which the court made the order and judgment mentioned in the petition; and, for aught appearing, appellees are proper and suitable persons to have the care, control and education of the children. However, the petitioner does say that since the aforesaid order of the court “he has fitted up a proper home” in Connersville and employed a suitable person to take charge of it and to care for the children. But in what respect do these facts differ from those before the court at the former hearing? From the statement that he has fitted up a suitable home in one city rather than in another, and there employed a suitable overseer, it does not necessarily follow that facts equally material and persuasive in that regard did not exist at the former hearing; nor does the conclusion that “he is now a fit person” indicate wherein his habits, actions or methods personally, if they were faulty, have changed, or in what particular he is now in a better position to care for, control and educate his children. The petition should clearly state the facts on which he relies, and that such *347facts or conditions did not exist at the time of the former trial.
In the case of Knapp v. Tolan, supra, it was said: “The determination of a court on habeas corpus respecting the custody of children stands upon a different footing than a'decision in a case where the writ is used as a writ of liberty. Here its decision is res judicata, and precludes the issuance of a second writ upon the same state of facts. 9 Enc. Pl. & Pr. 1070. The district court was not bound to deliver the child into the custody of either claimant, but had the power and the duty to leave it in such custody as its welfare seemed to require. Until some new fact or change of circumstances has occurred which has altered the state of the case or the relative claims of the parties in some material respect, the decision of the district court is conclusive upon a subsequent application for a writ of habeas corpus. Church, Habeas Corpus §387; 9 Enc. Pl. & Pr. 1070; State ex rel. Lembke v. Bechdel, 37 Minn. 360, 5 Am. St. 854, 34 N. W. 334, 7 Am. Crim. Rep. 227; Mercein v. People, 25 Wend. 64, 35 Am. Dec. 653; People ex rel. Lawrence v. Brady, 56 N. Y. 182; Freeman, Judgment §324.”
In our opinion, appellant has not shown reversible error, and the judgment is therefore affirmed.