In March of 1948, petitioner, eighteen years old and unmarried, gave birth to a daughter at Our Lady of Victory Home, a charitable institution in upstate New York. Since her parents barred their home to the infant, she was compelled to leave the baby at the institution. After a year, she brought the child to New York City — where she lived with her *467parents — and boarded it in various places while she worked or looked for work. There came a time in August, 1949, when the mother was out of work and nearly out of funds. In desperation, she entrusted her child to a lawyer, whose daughter she knew, to be placed with a family. That same evening the lawyer took the child to defendants, and with them she has remained ever since.
A few days later, the mother signed a consent to adoption and an affidavit. She now maintains, with support in testimony of a friend, that she understood that the baby was only to be boarded out, that she made it plain that she “ was not giving [it] up for adoption ”. Be that as it may, less than two weeks later, the mother requested the child’s return and, in October, 1949, consulted attorneys — not her present lawyers — for the purpose of regaining the baby’s custody. They immediately notified the lawyer who had placed the infant with defendants that the mother desired its return. Inconclusive negotiations between the mother’s attorneys and the other lawyer went on for several months, and in the spring of the following year they sent him a letter declaring that the mother ‘ ‘ definitely will not sign any consent before the Surrogate ’ ’ and that they intended to do everything necessary “ to regain the child for her.”
Despite that letter, the adoption proceedings went forward, and in October, 1950, without notice either to the mother or to her attorneys, an order of adoption was signed by the County Judge of Westchester County. In June of 1951, the mother instituted proceedings seeking the vacatur of that order. The county judge granted such relief, finding that, although the mother had initially given her consent to the adoption, she had, in fact, revoked it “ before the expiration of the six months’ probationary period prescribed in Subdivision 7, Section 112, of the Domestic Relations Law, and prior to the final adoption proceeding. ’ ’
In the same revocation proceeding, the mother sought custody and was met with a challenge to her fitness to care for the child. The county judge, however, refused to rule on the question of custody, and correctly so, since, in a situation such as the present, only the Supreme Court, upon habeas corpus, may determine to whom custody should be awarded. *468(See, e.g., Finlay v. Finlay, 240 N. Y. 429, 432, 433; Matter of Marx v. Holloran, 236 App. Div. 680; cf. N. Y. City Dom. Rel. Ct. Act, §§ 61, 81, 83.)
The mother thereupon sued out the present petition for a writ of habeas corpus. The official referee, who presided at the trial, heard evidence and, concluding that it would be ‘ ‘ for the best interest of the child ” that it remain with defendants, denied the petition. Following unanimous affirmance by the Appellate Division, we granted permission to appeal.
Custody of children, this court has said, “ is ordinarily a matter of discretion for Special Term and the Appellate Division ” (Bunim v. Bunim, 298 N. Y. 391, 393, and see dissent, pp. 394-395), and it is only “ rarely that any such determination by [the Supreme Court] can raise any question of law for us.” (People ex rel. Portnoy v. Strasser, 303 N. Y. 539, 542.) However, a question of law does here confront us — a question deriving from that age-old principle of human relations that “ No court can, for any but the gravest reasons, transfer a child from its natural parent to any other person * * * since the right of a parent * * * to establish a home and bring up children is a fundamental one and beyond the reach of any court (Meyer v. Nebraska, 262 U. S. 390, 399).” (People ex rel. Portnoy v. Strasser, supra, 303 N. Y. 539, 542.) In the light of that principle, we find no basis for denying custody of the child to petitioner, its natural parent, who did not abandon it and against whom no showing of present unfitness has been made.
It has often been said that a child’s welfare is the first concern of the court upon a habeas corpus proceeding, where the judge acts “ as parens patriae to do what is best for the interest of the child.” (Finlay v. Finlay, supra, 240 N. Y. 429, 433; see, also, People ex rel. McCanliss v. McCanliss, 255 N. Y. 456; People ex rel. Pruyne v. Walts, 122 N. Y. 238, 242.) However valid this statement may be in a contest for custody involving the parents alone, it cannot stand without qualification in a contest between parents and nonparents. The mother or father has a right to the care and custody of a child, superior to that of all others, unless he or she has abandoned that right or is proved unfit to assume the duties and privileges of parenthood. *469(See, e.g., People ex rel. Portnoy v. Strasser, supra, 303 N. Y. 539,542; People ex rel. Beaudoin v. Beaudoin, 193 N. Y. 611, affg. 126 App. Div. 505; Matter of Livingston, 151 App. Div. 1, 7; cf. Matter of Gustow, 220 N. Y. 373.) Accordingly, we have sanctioned withholding the child from the custody of a parent who has abandoned or transferred the parental right, either expressly or by implication. (See, e.g., Matter of Benning [Nigro], 303 N. Y. 775; Matter of Gustow, supra, 220 N. Y. 373; cf. Matter of Bock [Breitung], 280 N. Y. 349; Matter of Stuart, 280 N. Y. 245.) And, quite obviously, a parent who is “ a drunkard, an incompetent, a notoriously immoral person, cruel or unkind towards Ms cMld ” (Matter of Gustow, supra, 220 N. Y. 373, 377), may have the cMld taken from him.
Apart, however, from such special and weighty circumstances, the primacy of parental rights may not be ignored. In no case may a contest between parent and nonparent resolve itself into “ a simple factual issue as to wMch [affords] the better surroundings, or as to which party is better equipped to raise the cMld.” (People ex rel. Portnoy v. Strasser, supra, 303 N. Y. 539, 542.) And that is true even if the nonparent initially acquired custody of the child with the parent’s consent. (See, e.g., People ex rel. Beaudoin v. Beaudoin, supra, 126 App. Div. 505, 507, affd. 193 N. Y. 611; cf. Matter of Bistany, 239 N. Y. 19.)
Except where a nonparent has obtained legal and permanent custody of a cMld by adoption, guardianship or otherwise, he who would take or withhold a child from mother or father must sustain the burden of establishing that the parent is unfit and that the cMld’s welfare compels awarding its custody to the non-parent. (See, e.g., People ex rel. Portnoy v. Strasser, supra, 303 N. Y. 539, 542; Matter of Gustow, supra, 220 N. Y. 373.) Where consent initially given to a child’s adoption, often under the pressure of circumstances, is thereafter withdrawn (see, e.g., Domestic Relations Law, § 112, subd. 7), the case falls within the rule and not witMn the exception. In other words, the burden rests, not, for instance, upon the mother to show that the child’s welfare would be advanced by being returned to her, but rather upon the nonparents to prove that the mother is unfit to have her cMld and that the latter’s well-being requires its separation from its mother. (Cf. Matter of Bock [Breitung], supra, 280 N. Y. *470349, 353; Matter of Thorne, 240 N. Y. 444, 449-450; Matter of Bistany, supra, 239 N. Y. 19, 24.)
Here, no finding of present or prospective unfitness has heen made against the mother. The trier of the facts did not deny her counsel’s assertion that since 1949 she “ has led an upright life and been steadily employed ”, and, indeed, he could not have done so, for nothing in the record would support such a finding. Instead, he found the mother “ untruthful ” and pointed to a “ serious indiscretion ” in her past. The crux of his determination, though, was that her plan for the care of the child was not “ feasible ” and that it would be “ for the best interest of the child ” to remain with defendants — even though they could not legally adopt it in the face of the mother’s refusal to assent thereto (Domestic Relations Law, § 111). In short, the referee did what this court in the Portnoy case (supra, 303 N. Y. 539) held may not be done. He merely sought to balance the material advantages which the mother could give the child against those offered by the foster parents and decided in favor of the latter.
Turning to the case on behalf of petitioner, several witnesses attested to her good character and her fitness as a mother, and she herself testified that, although she intends eventually to marry, she plans — if she regains her child — to live with an older woman who will, while the mother is at work, care for the child along with two of her own grandchildren in a home with spacious grounds on Long Island. It is of some significance,' though not by any means decisive, that those surroundings compare most favorably with defendants’ somewhat crowded quarters in an apartment house whose entrance is just a door away from a bar and grill. At any rate, the plan proposed of a home in Long Island is in its nature neither unwise nor unfeasible and furnishes no legal basis for rejecting the mother’s petition.
In point of fact, the only evidence reflecting on the mother’s fitness concerned incidents which occurred four years ago when she was but twenty years old, without funds or a job, rejected by her parents so long as she insisted on being with her child. Of course, we do not say, even considering her desperate situation, that her conduct was beyond criticism or above reproach, *471but we must recognize, in assessing her fitness for the duties of motherhood, that the courts may not weigh too heavily indiscretions of long ago.
In view of the mother’s way of life during the past several years, her manifest devotion to her child, her persistent efforts to regain its custody in the face of great obstacles, her steady employment and her provision for a suitable home in which to rear the child, a finding that she was other than fit to assume the child’s custody would be erroneous as a matter of law, and nothing in the record supports even an inference that the child’s welfare would be promoted by being kept from the mother. In a word, there was no warrant for denying the mother’s petition.
The orders should be reversed, without costs, the writ of habeas corpus sustained and the custody of the child awarded to petitioner.
Lewis, Ch. J., Conway, Desmond and Froessel, JJ., concur with Fuld, J.; Dye and Van Voorhis, JJ., dissent and vote to affirm.
Orders reversed, etc.