The opinion of the Court was delivered by
Mr. Justice Jones.
Appellant appeals from an order of Judge Townsend, refusing his petition for a writ of habeas corpus to obtain the custody of his minor children, one a girl about eight years old, and the other a boy about seven years old. The return of respondent to the writ was as follows: “That he holds in custody and detains the bodies of Mattie Anderson and Sim Anderson, jr., by reason of the following facts: Sim Anderson, sr., the father of the two infants, Mattie Anderson and Sim Anderson, jr., came to live with respondent, John Young, the latter part of December last, bringing with him the two said infants, one six and the other seven years of age, and they continued on there during the year 1898. Sim Anderson was at the time almost totally blind, and although his eyesight improved some, his general health was all along very poor, and he was utterly unable to properly take care of. the said infants, and his wife, Neicy Anderson, who lived on another place, applied to him to be allowed to take the children and care for them. This Sim Anderson refused to do, -but after consulting together they agreed between themselves, as a wise settlement of the matter, to bind the children to me. Sim Anderson came to me and proposed the plan. I finally consented, provided Neicy, the mother, was willing. He assured me she was, and afterwards I saw her and she gave *390her consent. We all then went to Magistrate W. M. McMillan and. explained the matter to him. He drew the instrument of writing, binding over the children to me, which he explained fully to us all, and which we, the said Sim Anderson, Neicy Anderson and myself, then and there signed. This indenture is herewith exhibited, marked ‘A.’ This respondent then enteied upon his performance of said indenture, and has since'carried out towards the said children all the obligations therein required of him. And this respondent is satisfied that the welfare of the children is much better subserved by matters remaining as they are, than giving the custody of the children to the said Sim Anderson, who is utterly unable to care for them.” The alleged indenture was dated August 19th, 1898, was executed under seal by the said father and mother of the children, and by John Young, the respondent, and was attested as signed, sealed and delivered in the presence of W. M. McMillan, as magistrate, under his seal. The instrument, among other things, recited that the father and mother of their own free will and accord put their son and daughter apprentice under John Young to learn to be farmers, and after the manner of apprentice to serve him for fourteen years, or until they became of age, containing stipulations as to the service and conduct of said children; one such stipulation being that they shall not absent themselves from said John Young’s service, day or night, without leave. On his part, John Young covenated to teach and to provide for said apprentices for said term. All parties bound themselves, “for the true performance of all and sigular the covenants and agreements aforesaid.”. The instrument was not signed by the said children, and so far as appears they were not present at the execution, and there was no certificate upon the same by the magistrate beyond his attestation as a witness as follows: “W. M. McMillan, (l. s.) magistrate L. C., S. C., ’’under the words, “signed, sealed and delivered in the presence of.”
The Circuit Judge held that the indenture set up in the *391return, to which petitioner is a party, is binding upon him, and there being nothing to show improper treatment of the infants on the part of John Young, respondent, he refused the petition. Appellant assigns error, (i) in holding that the indenture is binding upon him; (2) in holding that the instrument is an indenture; (3) in refusing his petition; (4) in not holding that he was entitled to the custody of his children.
1 The act of 1740 concerning masters and apprentices, 3 Stat., 544, expressly provided that the intending apprentice “shall execute such indenture in the presence and with the approbation of his or her father, mother or guardian, &c.,” and under this act it has been decided that the indenture will be void as to the apprentice unless he is a party to it. Welborn v. Little, 1 Nott & McCord, 263; Austin v. McCluney, 5 Strob., 104. Indentures of apprentices are now regulated by sections 2072, 2073, et seq., General Statutes of 1882, now appearing as sections 2203, 2206, et seq., Revised Statutes of 1893. In these sections the language above quoted from the old act of 1740 is not to be found. In section 2072, Gen. Stat. 1882, it is provided as follows: “It shall and may be lawful, to and for any person or persons within this State to take one or more apprentice or apprentices, indented according to the directions of this chapter, &c.” It is no where provided in said chapter how apprentices shall be indented .except in sec. 2073, appearing as sec. 2206, Rev. Stat. 1893, which provides as follows: “It shall be the duty of any trial justice (magistrate) , to whom application is made by a person desiring to become the master or mistress of any infant to be bound to service by indenture according to law, to certify under his hand and seal upon such indenture the presence and approbation of the father, mother or guardian of such infant at the time it was executed, * * * which indenture or indentures, so executed and certified as aforesaid, shall be good and effectual, to all intents and purposes, as if such apprentice had been of full age, and by indenture of covenant had *392bound him or herself; or otherwise shall be void, and of none effect.” Notwithstanding.the absence of the language quoted from the act of 1740, we hold that by necessary implication, the apprentice must execute the instrument, otherwise it will be void as to such apprentice as an indenture of apprenticeship under the statute; however unreasonable this may appear when applied to infants which have not attained years of discretion. There is no doubt that the rule, generally held, is that the apprentice, to be bound, must execute the indenture, unless the statute expressly provide a different mode of execution in behalf of the infant. Having reached the conclusion that the alleged indenture is void as to the infant apprentices, because they are not parties to it, we need not consider whether, when the parents have actually executed the instrument themselves, and bound themselves to its stipulations in the presence of the magistrate, and the magistrate has signed the instrument as a witness under his title and seal, there is not a compliance with the requirement as to the magistrate’s certificate as to their presence and approbation.
2 3 But it does not follow, because the indenture is void as to the infants, that petitioner is, therefore, entitled to the custody of his children. There is no doubt that ordinarily and prima facie, the father as natural guardian is entitled to the custody of his minor children, but this right is not absolute as his property right in a chattel would be. His right of custody may be subordinated to the real interest of his child. While, then, a court is in duty bound to relieve an infant from illegal restraint, yet, in awarding its custody, it will exercise a wise discretion, looking to the real welfare of the child as the principal consideration. This is the rule in this State, and generally in this country. Ex parte Schumpert, 6 Rich., 346; Ex parte Williams, 11 Rich., 459; 17 Ency. Law, 368. As the office of the writ of habeas corpus is to release from illegal restraint, the first inquiry here is whether the petitioner’s children are illegally restrained by the respondent. Respondent asserts that his *393custody of the children is lawful, by virtue of the indenture with the father and mother placing them with him as apprentices. Conceding that the instrument is void as to the minors as an indenture of apprenticeship, under the statute, for want of compliance with statutory regulations, the question remains whether the instrument is so void as to make respondent’s custody illegal as against the father, who executed it. In Eubanks v. Peak, 2 Bailey, 499, Judge O’Neall expressed the opinion that a mother, during the minority of her son, was entitled to his services, and if she chose to place him with another and to contract that he should serve that other until he was of the age of twenty-one years, and that for his services the defendant should remunerate him by schooling and the delivery of property, it was a valid contract, which enured to the benefit of the plaintiff, and on which he could maintain that action. In the later case of Austin v. McCluney, 5 Strob., 106, the Court held that while the indenture in that case was void as an indenture, under the act of 1740, as against the minor who was not a party to it, it was nevertheless binding at common law against the parties thereto, that such a contract was not contrary to public policy. In this last case the Court cited Day v. Everett, 7 Mass., 147, as sustaining an indenture not executed in accordance with the statute, as good at common law, as the father might lawfully assign the services of his child during his minority and during the life of the father. A parent cannot, at common law, irrevocably divest himself of his trust and duty to care for and train his children, and surrender their care and custody to. another merely for his own comfort or pecuniary gain, but he may lawfully place his children in the custody of another, and assign their services during minority for their own welfare, as to learn some useful trade or occupation, in which case a court is not bound to restore the child to the parent’s custody, unless it appears that the real welfare of the children require it. We think reason and authority warrant us in stating as the law, that the custody of *394a minor by virtue of a fair agreement with the parent, not prejudicial to the welfare of the minor, is not unlawful or against public policy, and is not such illegal restraint as a court must relieve at the will or caprice of the parent. Hurd on Habeas Corpus, 537; Clark v. Bayer, 32 Ohio St., 299; 30 Am. Rep., 593; Capsky v. Wood, 26 Kan., 650; 40 Am. Rep., 321; Bonnett v. Bonnett, 61 Iowa, 198; 47 Am. Rep., 810; Green v. Campbell, 14 S. E. Rep., 212. See, also, note in 2 Am. St. Rep., 184, and note in 27 L. R. A., 56. In this case, while the father is seeking to revoke his agreement and regain the custody of the children, the mother, who for some reason is not living with the father, insists that the children should remain with respondent, who is the husband of her sister, or if not that they be given to her, as petitioner is unable to properly care for them. It does not appear that petitioner has a home for them, or any means whatever. There was evidence before the Circuit Judge tending to show that petitioner was crippled and partially blind, and wholly unable to support himself and the children. On the other hand, there was evidence that respondent was faithfully carrying out his agreement to care for the children, and there was no showing whatever of any ill or improper treatment of them by respondent, and it was not questioned that respondent was a man “far beyond ordinary for respectability, virtue and general well doing,” “a man of good disposition and well able and qualified to care for and train the children.”
The exceptions are overruled, and the order refusing the petition is affirmed..