Reid, Chief Justice.
Magnolia Lamar brought suit against Anthony Alexander, and made substantially the following case: In the year 1912 she gave birth to an illegitimate child of John Alexander. During'his life John Alexander freely acknowledged the fact that he was the father of the child, and the child was known by all as Namon Alexander. In the year 1919 John Alexander died, and his mother, Maggie Griggs, “requested that petitioner surrender and give to her the entire and absolute custody, control, care, and person of said Namon Alexander, the said Maggie Griggs promising to and agreeing with petitioner that in consideration of such surrender and gift of the control, custody, care, and person of the said Namon Alexander she, the said Maggie Griggs, would take the said Namon Alexander, treat and care for him as her own child, and adopt him as such, with all the rights of a child related to her by blood.” Pursuant to this agreement the plaintiff surrendered the child to Maggie Griggs, and thereafter the child lived with her as her son and was recognized and treated by her as her child until her death in the year 1932, although no legal proceedings were ever taken by Maggie Griggs during her lifetime adopting the child. In January, 1933, Namon Alexander died. He left no debts, and there has been no administration of his estate. Anthony Alexander, the only surviving child of Maggie Griggs, is in possession of certain realty owned by her at her death, claiming it as his own as her sole surviving heir. The plaintiff prayed: (l)'“That this court grant and decree specific perform*274anee of the aforesaid agreement and promise on the part of said Maggie Griggs; that the said Namon Alexander be adjudged and decreed to be, and to have been, the adopted son and child of the said Maggie Griggs, and be entitled to share, by virtue of such adoption, equally with the said Anthony Alexander in the aforesaid real property and the proceeds arising therefrom. (2) That your petitioner, as the sole heir at law of the said Namon Alexander, be adjudged and decreed to be entitled to receive as such heir any right, title, claim, and interest of the said Namon Alexander in the aforesaid property and the proceeds arising therefrom.” Exceptions are taken to the overruling of certain demurrers to this petition.
1. The rights of the plaintiff arise out of and must be determined with reference to the alleged contract of adoption of Namon Alexander, made between the plaintiff, his natural mother, and Maggie Griggs, deceased. In the leading case of Crawford v. Wilson, 139 Ga. 654 (78 S. E. 30, 44 L. R. A. (N. S.) 773), it was held that “A parol obligation by a person to adopt the child of another as his own, accompanied by a virtual though not a statutory adoption, and acted upon by all parties concerned for many years and during the obligor’s life, may be enforced in equity, upon the death of the obligor, by decreeing the child entitled as a child to the property of the obligor, undisposed of by will.” In its discussion of the principle thus laid down the court said: “It is now well established by authority that an agreement to adopt a child, so as to constitute the child an heir at law on the death of the person adopting, performed on the part of the child, is enforceable upon the death of the person adopting the child as to property which is undisposed of by will. Though the death of the promisor may prevent a literal enforcement of the contract, yet equity considers that done which ought to have been done, and as one of the consequences, if the act of adoption had been formally consummated, would be that the child would inherit as an heir of the adopter, equity will enforce the contract by decreeing that the child is entitled to the fruits of a legal adoption.” A recent and clear statement of the rule is found in Rieves v. Smith, 184 Ga. 657 (192 S. E. 372), as follows: “A definite contract in parol to adopt another person as a child, if based upon a sufficient consideration, and if supported by satisfactory proof, may be enforced in equity with *275respect to any claim wbicb he as a child may have against the estate of such adopting parent.” See also Columbus Bank & Trust Co. v. Jones, 176 Ga. 620, 623 (168 S. E. 561); Rucker v. Moore, 186 Ga. 747 (199 S. E. 106). If the present petition were one brought by the child, Namon Alexander, it would unquestionably state a cause of action, under the above principles. There appears to have been a valid contract of adoption clear and complete in its terms, entered into between parties capable of contracting; and it further appears that it was performed by the child for many years and to the date of the death of the promisor. It is therefore distinguishable from the following cases, in which recoveries were denied: Rahn v. Hamilton, 144 Ga. 645 (87 S. E. 1061); Bell v. Elrod, 150 Ga. 709, 711 (105 S. E. 241); Crum v. Fendig, 157 Ga. 528, 530 (121 S. E. 825); Mock v. Neffler, 145 Ga. 25 (95 S. E. 673); Scott v. Scott, 169 Ga. 292 (150 S. E. 154); Rucker v. Moore, supra. In the Rahn, Crum, and Scott cases no definite contract to adopt was shown. In the Mock case, the contract set up appeared to have been made with the natural mother of the child, but it was not shown that the child was illegitimate, as in the present case, or that the father was dead or had lost his parental control, or that he had ratified the contract; and therefore it did not appear that -the contract made solely by the mother was valid. The Rucker case is similar to the Mock case. In the Bell case no substantial performance by the child of the contract to adopt was shown, so as to authorize a court of equity to decree specific performance.
It is contended by the defendant that if that had been done which the plaintiff asserts should have been done under the contract, that is, if Namon had been legally adopted as agreed, the relationship of parent and child would have existed as between Namon and Maggie, and not between Namon and Magnolia; that Magnolia would not longer have been an heir of Namon; and therefore that since a court of equity, in determining the rights of the plaintiff, will consider that done which ought to have been done, Magnolia has no right to recover in the present action. We can find no fault with this argument, provided the premise stated can be accepted as the true law; that is, that if Namon had been legally adopted by Maggie, Magnolia, the present plaintiff, would no longer have been his heir. This brings us to a consideration of *276the statutes of force in this State in reference to the adoption of children (Code, §§ 74-401 et seq.), and especially § 74-404, which in its material parts is as follows: “Thenceforward the relation between such person [adopter] and the adopted child shall be, as to their legal rights and liabilities, the relation of parent and child, except that the adopting father shall never inherit from the child. To all other persons the adopted child shall stand as if no such act of adoption had been taken.” This provision first appeared in the Code of 1863, § 1739, and it does not appear to have been taken from an act of the legislature. In that code it is as follows: “Thenceforward the relation between such person and the adopted child shall be, as to their legal rights and liabilities, the same as if the relation of parent and child existed between them, except that the adopting father shall never inherit from the child; but to all other persons the adopted child shall stand related as if no such act of adoption had been taken.” (Italics ours.) The section containing this provision was amended in other particulars by the act of 1889 (G-a. L. 1889, p. 69), and this provision was there re-enacted in the same language as taken from the Code of 1863. In the Code of 1895, § 2497, this provision was codified to read as it now appears in the Code, § 74-404, by placing a period after the words '“inherit from the child,” instead of a semicolon, and deleting the italicized words.
What is the true meaning of the provision above quoted ? By its express language the relationship of parent and child is created as between an adopted child and the adopting parent or parents, "as to their legal rights and liabilities.” See Harper v. Lindsey, 162 Ga. 44, 49 (132 S. E. 639). The apparent meaning and intent of this provision is an absolute substitution of the adopting parent or parents for the natural parent or parents. The legal rights of the parties are the same as if the child had been a natural child of the adopting parents. It is clear that the adopting parent or parents become bound “to provide for the maintenance, protection, and education” of the child. Code, § 74-105. They become entitled to the custody and control of the child (Monk v. McDaniel, 116 Ga. 108, 42 S. E. 360; Rives v. Sneed, 25 Ga. 612) and are entitled to the child’s services. Cf. Weems v. Saul, 52 Ga. App. 470 (183 S. E. 661). In fact the adopting parents assume all of the responsibilities in reference to the child and become entitled to *277the benefits which might accrue by reason of the relationship of parent and child. On the other hand, it is equally clear that the natural parents are relieved of all responsibility, and are likewise deprived of all rights with reference to the child. Jordan v. Smith, 5 Ga. App. 559, 562 (63 S. E. 595). The terms of the adopting statutes accord with this view, in that it is expressly required that the natural parents consent to the adoption. Accordingly we think that it is equally clear that the natural parents no longer remain heirs of the child, but, in so far as the rules of inheritance may be concerned, are mere strangers. The rules of inheritance as embodied in the Code, § 113-903, contemplate that a child have only one mother and father, and our statute expressly places the adopting parents in this relationship, except that it provides that the adopting father shall not inherit from the child. It is to be kept in mind that “Succession to estates and the right of inheritance is wholly a matter of statutory regulation. . . The legislature has the right to create and take away the right of inheritance, and in the exercise thereof to confer the right of inheritance upon adopted children and adopting parents, or both, depriving the natural parents of any right of inheritance from such adopted child, and fix the course of succession to property in such case.” Shepherd v. Murphy, 332 Mo. 1176 (61 S. W. (2d) 746). We find it to be generally held, under adoption statutes of other jurisdictions creating the relationship of parent and child between the adopting 'parents and the adopted child, that the natural mother and father are thereafter incapable of inheriting from the child. See Shepherd v. Murphy, supra; In re Estate of Johnson, 164 Cal. 312 (128 Pac. 938, 43 L. R. A. (N. S.) 1062); In re Engart’s Estate, 116 Neb. 450 (218 N. W. 89); Havsgord v. Sverson, 34 S. D. 131 (147 N. W. 378); In re Hood’s Estate, 206 Wis. 227 (239 N. W. 448). It is worthy of note that our statute expressly provides that the adopting father shall never inherit from the child. By necessary implication the adopting mother may inherit. That it was intended that the adopting parents should be substituted for the natural parents in all matters including that of inheritance seems plain; for otherwise what was the necessity of expressly providing that the adopting father could not inherit from the child?
Much importance is attached to the provision of the statute that “To all other persons the child shall stand as if no such act of *278adoption had been taken.” Attention is called to the original wording of the provision as contained in the Code of 1863 and in the act of 1889, and it is said that the words “all other persons” refer to the nearest antecedent, to wit, “adopting father,” and that, so construed, the natural mother stands related to the child the same as if no act of adoption had been taken. We can not give this provision the construction here contended for. It is true that in the construction of statutes, as a general rule, relative words are read as referring to the nearest antecedent. Cook v. Cook, 167 Ga. 723, 727 (146 S. E. 548); Regents of the University System v. Trust Co., 186 Ga. 498, 509 (198 S. E. 345). However, this rule is not indexible, and should not be applied without reference to the meaning of the statute when read as a whole. The words “all other persons” clearly refer to those persons whose rights had not been theretofore dealt with; in other words, the parents of the child. Theretofore the adopting parents had been substituted for the natural parents; and it is then provided that “as to all other persons” the child stands as if no such act of adoption had been taken. Thus the statute does not attempt to force the adopted child on others than the adopting parents as an heir, nor does it deprive the child of its kindred other than its natural parents. As we have already said, we think that the entire purpose and meaning of the statute was merely to substitute the adopting parents for the natural parents, and to affect the rights of no other persons. While the changes made in the statute by the codifiers of the Code of 1895 and subsequent Codes would not be controlling, it is apparent from the slight changes there made in the provision that they placed the -same construction thereon that we have here adopted. Their changes did not alter the meaning of the statute as originally expressed, but only tended to make the real meaning clearer.
Under the construction of the statute that we have here adopted, Magnolia Lamar, the plaintiff, would not have been an heir of Namon Alexander had the contract of adoption which she made with Maggie Griggs been carried out. As we have indicated, we think that it follows that she can not maintain the present action. The theory upon which a court of equity proceeds in giving the remedy of specific performance in reference to contracts of adoption is that it is just and equitable that it be considered that that *279was done which ought to have been done. Proceeding upon this theory, it is clear that the court must necessarily consider the plaintiff a stranger to the child, with no right to recover the property. We feel reinforced in reaching the foregoing conclusion by viewing the general beneficent purposes of the adoption statute, as well as the inconsistences that would obtain if the opposite view were taken. Without doubt, under the terms of the statute the adopting mother of the child would inherit from him if he died leaving an estate and her surviving him. The law did: not contemplate that a child should have two' mothers and fathers; and there is no provision in our laws of inheritance for the anomaly of inheritance by two mothers. Yet, under the other view, if the child should die, leaving an estate, before the death of either the adopting mother or the natural mother, such an anomalous situation would be presented. In following this course of reasoning we also keep uppermost in mind the best interest of the child in such cases. As pointed out above, the natural parents must consent to the adoption; the adopting father becomes liable for the child’s support. The child is fully integrated into the new family relationship, and is permitted to have an estate therefrom upon the death of the parents. Unless we take the view herein adopted, that there was complete substitution of parents, it would hardly seem that the purposes of the statute with reference either to the child or the parents had been served. And furthermore, if this were not so, would it not discourage the adoption of children, if the adopting parents, from whose estate the child is to inherit, should contemplate that, after all, the fruits of their labor in creating the estate might finally go, not to the child, but to one of his natural parents ? Thus the beneficent purposes of the statute would, for this additional reason, be further frustrated. We are of the opinion that the judge erred in overruling the demurrers to the plaintiff’s petition.
Judgment reversed.
All the Justices concur.