In a habeas corpus proceeding concerning the custody of two children, brought by the Commissioner of Social Services for the County of Westchester against foster parents of the children, the appeal is from a judgment of the Family Court, Westchester County, dated December 23, 1969, which, without the taking of evidence at a hearing, sustained the writ and ordered that the children be returned to petitioner’s custody. Order reversed, on the law, without costs, and proceeding remanded to the Family Court for proofs to be taken at a hearing. The Family Court denied a hearing solely on the ground that foster parents have no standing to contest a decision by the Commissioner of Social Services for removal from'their custody of children previously placed with them and for placement of the children into an institution in accordance with departmental policy. It should be noted that this is not a contest between the natural parents and the foster parents. Petitioner asserts there is no present intention to return the children to the custody of their natural parents. In our opinion, the Family Court erred in refusing to hold a hearing to determine if the removal of the infants Robert and Karen from appellants’ custody was in the best interests of the children (Matter of Jewish Child Care Assn. of N. Y. [Sanders], 5 N Y 2d 222; Anonymous v. New York Foundling Hosp., N. Y. L. J., Aug. 19, 1969, p. 10, cols. 7 and 8; Anonymous v. New York Foundling Hosp., 61 Misc 2d 137; Matter of lv. Convent of Sisters of Mercy in Brooklyn, 200 Misc. 115). 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. “ He is to put himself in the position of a ‘wise, affectionate and careful parent’ * * * and make provision for the child accordingly. He may act at the intervention or on the motion of a kinsman, if so the petition comes before him, but equally he may act at the instance of any one else. * * * He is not determining rights ‘ as between a parent and a child’ or as between one parent and another * * *. He ‘interferes for the protection of infants, qua infants, by virtue of the prerogative which belongs to the Crown as parens patriae’” (Finlay v. Finlay, 240 N. Y. 429, 433-434; Matter of Bachman v. Mejias, 1 N Y 2d 575; cf. People ex rel. Kropp v. Shepsky, 305 N. Y. 465). It is settled that this jurisdiction cannot be limited or diminished by statute (People ex rel. Riesner v. New York Nursery & Child’s Hosp., 230 N. Y. 119) and this power is still available “ even in these days of social service organizations and welfare officers so that errors of heart or errors of judgment on the part of officials, as well as misbehavior by parents and by guardians can be remedied by the court ” (People ex rel. Converse v. Derrick, 146 Misc. 73, 78). The Court of Appeals has stated that “foster parents may not succeed in a proceeding such as this * * * in the' absence of a clear showing that to' return the child to the boarding agency will "Operate to its grave detriment” (Matter of Jewish Child Care Assn. of N. Y. [Sanders], 5 N Y 2d 222, 230, supra). However, where such an injury ik alleged the court, in the exercise of compassionate discretion, should hear the proofs. “In the proceeding at bar it is not respondent’s judgment as to what is for the best interests of the child, but that of the court which is determinative. The custody of an infant may not be controlled by the established practice of any organ.ization no matter how noble its motive may be. Like any other qualified witness, *1035respondent was entitled to present proof before the court, but the responsibility for determining what course would aid the child’s welfare is solely and independently the duty of the court in the exercise of its vast powers to deal with the custody of infant children ” (Matter of Jewish Child Care Assn. of N. Y. [Sanders], 6 A D 2d 698, 699-700 [dissenting opinion of Beldock and Ughetta, JJ.]). It should be noted that petitioner does not dispute the historic role of the court, but merely argues that in this instance the best interests of the children required that no hearing be held or, assuming arguendo that a hearing was called for, that the foster parents, by virtue of certain actions allegedly detrimental to the best interests of the children, have forfeited their right thereto. However, there is nothing in this record which renders a determination as to the children’s best interests superfluous. Furthermore, whatever “right” to a hearing there may be, it belongs to the infant wards of the court, not to the foster parents, and the latter may not, ex maleficio, forfeit it. However, in determining the infants’ best interests the court may well consider actions by the foster parents which are harmful to the children. The foregoing should not be interpreted so as to prevent the Family Court from holding the hearing in camera if it finds that it would he in the best interests of the children to do so. It is fervently to be hoped that all parties will co-operate to spare these innocent children further unnecessary anguish and humiliation. Hopkins, Acting P. J., Munder, Kleinfeld, Brennan and Benjamin, JJ., concur.