Joshua Wade and Polly, his wife, presented a petition to the circuit court of Greenbrier county, on the 9th day of April, 1867, alleging that the petitioner Polly Wade had, among other children, a daughter, Sidney Jackson, since dead, who, among other children, had a daughter named Anno Sidney, at the time of filing the petition an infant of tender years, being about six years of age; that the said Sidney Jackson was never married, and that during her life, under the law of the State of Virginia, the custody and disposition of her said daughter, Anne Sidney, was vested in her, and after her death, in the petitioner, Polly Wade, the grand-mother of the child; that notwithstanding the fact that she is so in law entitled to such custody, yet for years *465past one Thomas Mathews, who formerly owned the said Sidnej^ Jackson as a slave, has claimed and exercised the right to the custody and disposition of said Anne Sidney, and has refused and refuses to give her up to her lawful guardian, and prayed that a writ of habeas corpus he awarded, and the said Mathews required to produce the said Anne Sidney before the said court.
The wrrit was awarded as prayed for on the day the petition was filed, returnable to said court on the next day. On the return day of the writ the case was fully heard, b.ut held by the court for consideration until the next day, when this order was entered:
“The writ of habeas corpus awarded in this case being returned executed, and the infant Anne Sidney being brought into court, pursuant to the said writ, this day came the parties, both in person and by counsel, and the court after hearing counsel, and being of opinion from the evidence that the female plaintiff, Polly Wade, the grand-mother and nearest living relative of the infant Anne Sidney, who is an orphan, who is proved to be between five and six years of age, is the natural guardian of the infant, and as such entitled to the custody of her person. It is therefore adjudged and ordered that the said female plaintiff have the custody of the said infant, and that she be delivered by the said defendant to the said female plaintiff,” and that costs be recovered, &c. The defendant excepted to the opinion and judgment of the court and asked that a bill of exceptions be signed, certifying all the facts proved on the hearing of said case, which was done. Prom the said order the defendant, Mathews, obtained a supersedeas, and has brought the case into this court to be reviewed. Prom the facts certified it appears that the infant Anne Sidney was between five aud six years of age; that her mother, Sidney, died a slave belonging to the defendant, Thomas Mathews, when her child, the said Anne Sidney, was about two months old. That the said Polly Wade was also then a slave belonging to the defendant, Thomas Mathews, and wTas the mother of the said Sidney and the grand-mother of the said Anne Sidney. *466That the mother of the infant Anne Sidney on her deathbed requested the said Mathews and wife to take charge of the child, and gave them a ring for her with the request to put it on her finger when she became old enough to wear it. That after the termination of the war in 1865, the said Polly Wade left Greenbrier county and went to Kanawha county, leaving her said grand-child in charge of the said Mathews and wife until she returned to Greenbrier county in the fall of 1866, when and where she was married to her present husband. That the defendant and his wife have always treated the infant Anne Sidney with the utmost kindness and affection, and have given every attention and care, not only to the personal wants and comforts, but to the moral and educational advancement of the said infant; that the said infant has slept in their chamber all the time, and been treated by them always as if she were their own child, they having no children living with them; that the infant is a highly intelligent and good-looking little girl; that the defendant and wife are of high respectability, unexceptional moral character and warmly attached to the said infant, and amply competent, both pecuniarily and otherwise, to provide for her wants and education.
That the said Polly Wade is also of as good moral character as any colored person in Lewisburg; that she is an industrious, hard-working woman, a member of good standing in the Methodist Episcopal church at Lewisburg, and that her husband is also a man of good moral character, and owns a wagon and two horses and some other property. That the said Wade and wife are keeping house in Lewis-burg and are competent to the support and education of the infant, although in the opinion of several witnesses not as capable of providing for her physical wants or moral or intellectual education as the defendant and wife.
The facts certified also show the following order made by the recorder of Greenbrier county on the 12th day of November, 1866: “The recorder doth assign Thomas Mathews guardian to Anne Sidney Jackson, mulatto child about five years of - age, orphan of Sidney Jackson, deceased, and *467thereupon the said Thomas Mathews with Henry -M. Mathews, his security, entered into and acknowledged a bond in the penalty of 500 dollars, with conditions according to law.” The facts here certified show a degree of affection for and attachment to the little mulatto girl on the part of the plaintiff here, and his wife, such as is rarely if ever’seen where the relation of parent and child does not exist; and they also show them to be persons peculiarly proper and abundantly able to raise this or any girl as she should be raised. On the other hand the facts do not show that the grand-mother possesses the degree of. affection for the girl that she should, but yet she appears to be of character sufficiently good that the child should not be kept away from her on that account, and that she and her husband would probably raise it reasonably well. It is plain, therefore, that the judge awarded the custody of the child to Wade and wife not in the exercise of his discretionai-y power, but upon what he supposed to be the law of the case. Was the learned judge correct in this conclusion ? The authority referred to is the case of Mellish vs. De Costa, 2 Atkyns Rep., 14, where it was decided that the father being dead, the mother by reason of nurture, is entitled to the custody as of right. And it is supposed that on the authority of this case the mother being dead the grand-mother succeeds to her rights. The case of Armstrong vs. Stone and wife, 9 Gratt, 102, is also referred to, in which case, upon the authority of the case of Mellish vs. De Costa a child in the seventh year of her age was taken from her grand-father and grandmother and given to her mother, in the exercise of the sound discretion of the court, the court being of opinion under the circumstances that the mother was the most suitable person to raise the child, there being no legal guardian whose rights were involved, and the father being dead. The purpose of the writ is to release any one from restraint wrho is detained without lawful authority. Code of Virginia 1860, page 658, section 1.
If I am not mistaken the third section of chapter 127, code of Virginia, was introduced for the first time in the re-*468visal of 1849, by which it is provided that the circuit, county or corporation court of any county or corporation in which any minor resides, or if he be resident out of the State in which he has any estate, may appoint a guardian for him, unless he have one appointed by his father.
And by an act of the legislature of this State, Acts, 1863, page 35, section 1, recorders have the power to appoint guardians. In the exercise of this power the recorder of Greenbrier county appointed the plaintiff here the guardian of the child Anne Sidney. Section 7, chapter 127, Code of Virginia, provides that every guardian shall have the custody of his ward, and the possession, care and management of his estate, real and personal; but the father of the minor, if living, and in case of his death, the mother while she remains unmarried, shall, if fit for the trust, be entitled to the custody of the person of the minor, and to the care of his education. These enactments authorize the appointment of a guardian, and the last section referred to as a general rule gives the legal custody of the ward, and the care and management of his estate to the guardian, but provides that the father, if living, and if dead, the mother while she remains unmarried, shall, if fit for the trust, have the custody of the person of the minor, and the care of his education. This section did not apply in the case of Armstrong vs. Stone and wife, because in that case there was no regularly appointed guardian for the custody of the minor, so that the case was decided according to the common law.
11 nt the case under consideration is different, for it shows that the plaintiff in error is the lawfully appointed guardian of the infant Anne Sidney, and as such guardian entitled to the legal custody of her person, as she has neither father nor mother living. The regularity or the propriety of the appointment of the guardian cannot be determined upon a writ of habeas corpus. De Marmerville vs. De Marmerville, 10 Ves. Rep., 52; Ex parte Skinner, 17 Eng. C. L. R., 122; Armstrong vs. Stone and wife, 9 Gratt., 102. The right of the guardian to the custody of the person of the ward according to the code, is subject, as said before, to the exception in *469favor of the father, if living, or if he he dead, in favor of the mother, if living and unmarried, if fit for the trust. If this were a contest for the custody of this child between, its mother instead of its grand-mother as it is, and the regularly appointed guardian, she could not prevail unless unmanned, and if unmarried she could not prevail unless in the sound discretion of the court, considered a fit person for the custody of it. The jurisdiction of the courts to determine who has the legal right to the custody of the minor upon a habeas corpus is well settled. King vs. Deleval, 3 Burr Rep., 1434; King vs. Greenhill, 31 Eng. C. L. R., 158. In the ease under review the plaintiff in error under the circumstances of the case is legally entitled to the custody of the person of the minor as its guardian, and it does not appear that he has exercised or attempted to exercise any restraint over it inconsistent with his relations to it.
I am, therefore, clearly satisfied that the judgment or order complained of is erroneous and must be reversed with costs to the plaintiff in error, and that the proceeding ought to be dismissed.
The other judges concurred.ObdeR REVERSED and proceeding dismissed.