Order unanimously reversed on the law without costs and matter remitted to Onondaga County Family Court for further proceedings in accordance with the following Memorandum: In this habeas corpus proceeding, petitioner seeks to regain custody of her infant child from respondents. The child was born on May 1, 1990 and has *1081been in the custody of respondents since July 21, 1990. Respondents contend that petitioner voluntarily gave them custody and that she further consented to their adoption of the child. Petitioner contends that respondents do not have lawful custody of the child and that she did not agree to an adoption. Family Court found that the purported consent to adoption was not valid and granted the writ of habeas corpus.
As an initial matter, we find that Family Court correctly concluded that petitioner had not executed a valid consent to adoption. Private-placement adoptions must comply with Domestic Relations Law § 115-b. The judicial consent offered by respondents was not valid because it had not been acknowledged in court (see, Domestic Relations Law § 115-b [2]). The extra-judicial consent offered by respondents was not valid because it failed to state the court where the adoption proceeding would be brought (see, Domestic Relations Law § 115-b [4] [a] [i]). Thus, respondents cannot rely on any purported consent to adoption to avoid petitioner’s application for a writ of habeas corpus.
Notwithstanding the invalid attempt at adoption, however, we conclude that the child should not be returned to petitioner without an inquiry into his best interests. In the record before Family Court, there are sworn statements challenging petitioner’s fitness and capacity to perform the role of parent. Moreover, it is uncontroverted that respondents have had custody of the two-year-old child since he was less than four months old. These circumstances are extraordinary and require a hearing to determine whether, in the best interests of the child, petitioner or respondents should have custody (see, Matter of Michael Paul T. v Thomas R., 124 AD2d 970; see also, Matter of Bennett v Jeffreys, 40 NY2d 543). (Appeal from Order of Onondaga County Family Court, Buck, J. — Habeas Corpus.) Present — Boomer, J. P., Pine, Boehm, Fallon and Davis, JJ.