
    In the Matter of James Reed, as Director of Social Services, Respondent, v. Mitchell Daniels et al., Appellants.
   Judgment unanimously affirmed, without costs. Memorandum: It has long been established that “in matters touching the custody of infants, in the absence of superior parental rights, the court functions as parens patriae to do what is best for the interest of the children” (Matter of Kurtis v. Ballou, 33 A D 2d 1034). Ordinarily, therefore, in a habeas corpus proceeding concerning the custody of a child brought by the Director of Social Services against the foster parents of the child, Family Court should, in the sound exercise of its discretion, conduct a hearing where all the relevant facts with respect to the infant’s circumstances may be fully developed so that the court may make an informed determination regarding custody. Family Court’s failure to conduct such a hearing in this case was on the stated ground that foster parents have no standing to object to a decision by the Director of Social Services for removal from their custody of a child previously placed with them. Such conclusion by the Family Court was in error. Since, however, the respondents-appellants Mitchell and Flora Mae Daniels had voluntarily turned over custody of their foster child to petitioner, James Reed, Director of Social Services of Monroe County, the issue of her detention was moot and, therefore, the dismissal of petitioner Reed’s application for a writ of habeas corpus was appropriate. Family Court failed, however, at least insofar as the record reveals, to explore the allegations of the. affirmative defense interposed by the Daniels. Upon reviewing it, we conclude that it merely alleged that appellants were fit to have custody but did not claim that custody by petitioner Reed would operate to the infant’s grave detriment. Absent such allegations there was no basis for respondents foster parents to demand a hearing at which they could succeed in obtaining custody (Matter of Jewish Child Care Assn, of N. Y. [Sanders], 5 N Y 2d 222, 230). Appellants’ remedy, if they are so advised, is to make an application either by petition or by writ of habeas corpus to regain custody of their foster child (Finlay v. Finlay, 240 N. Y. 429, 433). (Appeal from judgment of Monroe County Family Court in habeas corpus proceeding.) Present—-Marsh, P. J., Cardamone, Simons, Goldman and Del Veechio, JJ.  