
250 S.W.2d 776 (1952)
STATE ex rel. "A" et ux.
v.
A LICENSED OR CHARTERED CHILD-PLACING AGENCY.
Supreme Court of Tennessee.
June 7, 1952.
On Rehearing July 11, 1952.
*777 Benjamin Goodman, Jr., and Walter P. Armstrong, Jr., Memphis, for appellants.
B.J. Semmes, Memphis, for appellee.
BURNETT, Justice.
Mr. & Mrs. "A" filed the petition herein for a writ of habeas corpus for the custody of a minor child "C", alleging that it is for the best interest of "C" that it be with them, its parents. The petition was filed both under 1932 Code Section 4709 and under the general law. The child was born out of wedlock and shortly thereafter the mother appeared before the Chancellor as required by Chapter 202 of the Public Acts of 1951, codified in the supplement to the Code as 9572.15 through 9572.52. The mother surrendered and released the child to the Child-Placing Agency, appellee herein, in compliance with the statute. There is no claim of duress or fraud or undue pressure on her to make this release and as heretofore said the release and surrender was made before the Chancellor. The release and surrender was made more than thirty days before the petition was filed in the instant case.
The petition was demurred to and the demurrer sustained "for the reason that the surrender of the child to defendant by the mother prior to her marriage to the father is irrevocable under the Public Acts of Tennessee, 1951, Chapter 202, Sections 6, 8, and 11, and binding both upon the mother and the father and that therefore the court is foreclosed by said statute from consideration of whether or not the best interests of the child requires that it be with its parents, who were married after said surrender was accomplished."
The petition seeks, in reality, to revoke the consent of the mother and to have the natural legal rights of the petitioners restored in their child. A "request for revocation of surrender" must be made before the judge in which the original surrender *778 was executed. Code 1932, Sec. 9572.25. This was done. The Code Section just referred to makes the consent in the instant case irrevocable after thirty days. Code Section 9572.20 makes the consent thus given by the mother sufficient and cuts off any rights of the father who had not married the mother subsequent to the time of the consent. The period for revocation of this consent had expired. Counsel, apparently, concedes in argument that the consent is irrevocable but insists, nevertheless, that it is the duty of the Court to consider the petition and determine under it what is for the best interest of the minor child, based primarily on the proposition that the petitioners are the natural parents.
"The natural parents of the child should be considered, and their natural rights should be carefully guarded, but their rights are subject to regulation by the State, and if these come into conflict with the paramount interest of the child, it is the power of the State, by legislation, to separate children from their parents when their interests and the welfare of the community require it." 1 Am. Jur., page 623, Section 4.
The parent as such has no vested right in his child which requires the protection of the courts that is accorded to property rights. The Legislature may pass adoption statutes when these statutes authorize the adoption of children by others, if the natural parents consent or the proof shows that it is to the best interest of the children that they be taken from the natural parents and placed with others. In the instant case the unwed mother is the only one that had the right, at the time, to give the consent for placing this child for adoption. At that time, as far as we know, the father was not known and the Legislature was perfectly within its rights in providing that her consent alone was necessary for placing this child. For obvious reasons the rights, if any, of the father had not ripened or matured at the time the mother placed this child with the Child-Placing Agency. Any rights that he had clearly did not develop until after he had married the mother and recognized the child as his own. We are not concerned here with the question of inheritance by this child or the legitimization of the child by the marriage of these parties after the child had been placed, as it was, prior to their marriage.
Of course, as a general proposition, the natural parents have the primary and superior right to custody of their children above that of all others but where these parents are unfit or the mother, in the case of an illegitimate child has consented and agreed, according to the statute in such cases, for the child to be placed with a Child-Placing Agency for adoption of others (in the absence of fraud, duress in the procurement of such consent), then there is no alternative but to sustain the adoption applied for if the best interests of the child call for such adopion.
As to whether or not a mother may revoke her relinquishment the courts are in disagreement. This is no longer a question in Tennessee. The statute above referred to settled it. Some of the cases have permitted revocation at the discretion of the parents; others allow revocation if estoppel and the welfare of the child do not intervene. French v. Catholic Community League, 69 Ohio App. 442, 44 N.E. (2d) 113; In re Burke's Adoption, Sur., 60 N.Y.S. (2d) 421; Adoption of Capparelli, 1946, 180 Or. 41, 175 P. (2d) 153; In re Adoption of McDonnell, 1947, 77 Cal. App. (2d) 805, 176 P. (2d) 778.
Other cases, from other jurisdictions, have denied the right to revoke and have based this denial on several different things, principally the principles of contract; equitable grounds; public policy favoring the adoption of children, particularly illegitimate children and the welfare of the child as apparent from the facts. In all cases holding both ways it seems to us that ultimately, regardless of the reasons stated for sustaining or denying the right of revocation, the courts have really determined the question on the basis of what is for the best interests of the child. Those cases holding that the mother does not have the right to revoke are: Wyness v. Crowley, 292 Mass. 459, 196 N.E. 924; Id., 292 Mass. *779 461, 198 N.E. 758; Lee v. Thomas, 297 Ky. 858, 181 S.W. (2d) 457; Application of Presler, 171 Misc. 559, 13 N.Y.S. (2d) 49; Durden v. Johnson, 1942, 194 Ga. 689, 22 S.E. (2d) 514; Stanford v. Gray, 42 Utah, 228, 129 P. 423, Ann. Cas. 1916A, 989; In re Adoption of a Minor, 1944, 79 U.S. App. D.C. 191, 144 F. (2d) 644, 156 A.L.R. 1001, where will be found an extensive note annotating the cases pro and con.
Dean Pound in "The Spirit of the Common Law" (1921), at page 189 says:
"Finally, recent legislation and judicial decisions have changed the old attitude of law with respect to dependent members of the household. The courts no longer make the natural rights of parents with the respect to children the chief basis of their decisions. The individual interest of parents which used to be the one thing regarded has come to be almost the last thing regarded as compared with the interest of the child and the interest of society. In other words, here also social interests are now chiefly regarded.
In our review of many cases not herein cited we find that it is the sense of these opinions, in deciding the cases of the custody of children, that the interests of the child are considered as of greater importance than those of the competing parents or competing parties. This principle certainly applies when the girl mother has, without fraud or duress, validly released and relinquished her rights to her child. The child then becomes a ward of the court and the court as Parens Patriae has the infant and may prescribe a course of treatment and paternal care for its future without regard to other alternatives. Of course at all times the court tries to prescribe for the child what is for its best interests certainly insofar as the evidence shows at the time of the hearing.
We have concluded in this case that the consent of the mother, validly given, waived any legal rights that she had to this child. By our statute this consent is irrevocable. This does not prevent the mother, and the father of the child after they are married, from coming into the court which has approved this surrender and applying for the custody of this child. The petition, such as filed herein, for Habeas Corpus is not applicable under the facts here averred. The petition may be amended so as to pray for the adoption of this child, in the discretion of the Chancellor. If this amendment is allowed it then becomes the duty of the Chancellor to consider the petition and, if sufficient facts are averred therein, hear proof thereon. At a later time or another time the Chancellor may in his discretion hear proof of the Child-Placing Agency and others in reference to the proposed adoptive parents and then after hearing these two things may make up his mind, and conclude under the evidence thus heard, as to what is for the best interests of the child. In so determining the lawsuit it is certainly permissible and it probably should be a rule of the Chancellor in his discretion that he hear these respective parties separately and at separate times without letting the parents who are claiming this child or their counsel know anything about who the proposed adopting parents are so that there will be no chance in the future of having the child's life spoiled should the Chancellor determine that this child be placed with others than the natural parents of the child.
Giving the matter this consideration seems to us is the best solution for this kind of a lawsuit. In this way we in effect meet the terms of the adoption statute invoked herein and at the same time it gives the Chancellor the right to hear the facts of all parties and then determine the real issue involved, the interests and welfare of the child and society.
The decree below will be reversed and the cause remanded for hearing in conformity with this opinion. The costs of appeal will be equally divided. The costs below will await the outcome there.

ON PETITION TO REHEAR.
The appellants, Mr. & Mrs. A, have filed a courteous, dignified and forceful petition to rehear. In this petition the petitioner sets out seven different propositions that *780 are decided in the original opinion. The petitioners concede that all of these seven propositions are correct except two of them, to-wit:
(5) "`The petition, such as filed herein, for habeas corpus is not applicable under the facts here averred.'"
(6) "On remand the cause should proceed by amendment to the petition for habeas corpus, in the discretion of the Chancellor, so as to pray for the adoption of the child by its natural parents; `at a later time or another time the Chancellor may in his discretion hear proof of the Child-Placing Agency and others in reference to the proposed adoptive parents and then after hearing these two things may make up his mind, and conclude under the evidence thus heard, as to what is for the best interests of the child.'"
It will be noted from a careful reading of the original opinion that No. 5, above quoted, is a sentence taken from the opinion after we had concluded that the rights of the mother were barred because her consent was irrevocable. She thus by giving this consent had waived all rights as a mother to this child. Immediately following such conclusion we said:
"This does not prevent the mother, and the father of the child after they are married, from coming into the court which has approved this surrender and applying for the custody of this child."
Then follows No. 5 above quoted. What we were attempting to say was that the trial court might in such instances, in its discretion, allow parties to a litigation (who mistakenly file a petition for habeas corpus) amend so as to make it a petition to adopt the child involved. Under our conclusion the mother no longer had any rights as a natural parent and there was no cause for habeas corpus stated. "In order to invoke the aid of habeas corpus for the purpose of determining the right to the custody of an infant, the applicant for the writ must show that he has a prima facie legal right to such custody." 25 Am. Jur., page 204, Sec. 79. The petition for habeas corpus in this case was based on the rights of the petitioners as the natural parents of the child. These rights having been waived by the consent of the mother, they no longer exist and, therefore, there are really no facts averred in the petition for habeas corpus upon which such a writ could be based. In other words, there are no allegations in the petition for habeas corpus that the welfare of the child is not being properly looked after  the only averments being the rights of the natural parents  and thus a petition for habeas corpus does not lie.
We then said in our original opinion that the Chancellor might, in his discretion, allow the petition to be amended. Of course this statement was pure dicta insofar as the conclusions were necessary in the instant case because the only thing that was really necessary to decide was whether or not the consent given by the mother was irrevocable and this in reality concluded the case. It was merely our idea that a Chancellor, in the interest and welfare of the child and the rights of the parties, might allow an amendment. If such an amendment was made (the parties petitioning for adoption), the fact that the parties petitioning for adoption were the natural parents, even though they had legally waived their rights to the child, these things could be considered as a matter of fact along with other things in considering what was for the welfare of the child. Of course we cannot in this case pass upon the various questions raised by the petition to rehear such as the question as to the Mr. & Mrs. "A" being nonresidents of the State and other things of that kind because they have not, insofar as we know, filed any petition for adoption. If they did desire to do so these are questions that must be raised at that time. Of course at the time that we considered this matter originally this question was not before us, was not argued, and we did not consider or notice the fact that the petitioners were nonresidents. Related questions to those raised on the petition to rehear to the procedure are somewhat answered in our case of Young v. Smith, 191 Tenn. 25, at page 31, 231 S.W. *781 2d 365. We have carefully considered the matter on the petition to rehear and are satisfied that a correct result has been reached, and, therefore, overrule the petition to rehear.
