*783OPINION OF THE COURT
Harold J. Rothwax, J.The petitioners, Anna Roman and Augustine Solise, are charged by felony complaint with robbery in the second degree (Penal Law, § 160.10) and related crimes. Petitioners are both under the age of 16. A hearing has been scheduled before the Criminal Court to determine whether the felony complaint should be referred to the Grand Jury or removed to the Family Court as a juvenile delinquency proceeding. (CPL 180.75, subd 4, par [a].) In anticipation of the removal hearing, petitioners seek an order of this court (Social Services Law, § 372, subd 3) directing the New York City Commissioner of Social Services to disclose to the petitioners, records relating to their recent placement as persons in need of supervision (PINS) (Family Ct Act, art 7). The District Attorney, in a companion motion, seeks a similar order.
The Commissioner of Social Services has opposed the request of all three parties on the ground that the agency’s records relating to placement, supervision and evaluation of PINS are confidential and privileged from disclosure to any person other than the parents, a relative or legal guardian of the PINS, or to an agency authorized to care for the PINS. (Social Services Law, § 372, subd 3; § 371, subd 10.)
The court agrees with the commissioner that the Social Services Law (§ 372) is an inappropriate vehicle for disclosure of the agency’s records to parties in a criminal proceeding. Section 372 is part of an article relating to the care and protection of deserted, unwanted or destitute children. Subdivision 3 of that section contemplates the disclosure by court order of agency records relating to the care and custody of such children, to persons who have a parental or custodial interest in the children’s welfare. (See Matter of Louis F., 42 NY2d 260.) Section 372, by limiting disclosure of such records to the class of persons so designated, creates a confidentiality in the Department of Social Services against persons not designated. This confidentiality is not absolute, however, and must give way to a showing of necessity. (Matter of Carla L., 45 AD2d 375, 382.)
The scope of confidentiality conferred by section 372 has been considered in the context of custody disputes between natural and foster parents, in Matter of Louis F. (supra), where the foster parents’ motion to compel disclosure of personal information about the natural parents was denied, *784the Court of Appeals noted two significant facts. First, the foster parents failed to show that the information sought was necessary to resolve the issue of continued foster care. Second, Louis F. was represented by a Law Guardian, appointed by the Family Court (Family Ct Act, § 783), who had free access to the agency’s records. (42 NY2d, at p 265, supra.)
The instant removal proceeding presents different considerations. Here the primary concern is the enforcement of our Penal Laws. The best interests of the child are, obviously, important and deserving of consideration, but the paramount concern in a criminal case is the protection of society. In order to balance society’s interests against the interests of the individual child, the Criminal Court is vested with discretion to refer the errant child to Family Court or to compel the minor to face the consequences of his wrongdoing as an adult. (CPL 180.75, subd 4; 725.00 et seq.) The discretion entrusted to the Criminal Court must be exercised in a sober and meticulous fashion, on the basis of as much information about the juvenile and the crime as can be obtained. Access to records of the Department of Social Services bearing on the recent social and psychological history of the juvenile is necessary to the Criminal Court’s essential task.
The problem is how best to preserve the legitimate interests of all the parties concerned, bearing in mind that the removal hearing is likely to be adversarial in nature. The commissioner correctly asserts that CPL article 240 does not give either the People or the defendant access to records in possession of third parties. CPL 240.20 (subd 3) permits discovery by the defense of records "within the possession, custody or control of the district attorney”, and grants reciprocal discovery by the prosecution upon request.
The appropriate vehicle for production of the records sought in this case is the subpoena duces tecum. A subpoena may not be used for purposes of discovery or to ascertain the existence of evidence, but is appropriate to compel the production of documents that are relevant and material to facts at issue in a pending judicial proceeding. (People v Coleman, 75 Misc 2d 1090; People v Simone, 92 Misc 2d 306.) CPL 610.20 (subd 3) permits a defense attorney to apply to the court for a subpoena duces tecum directed to any department, bureau or agency of the State or to any political subdivision thereof. The issuance and execution of these subpoenas are governed by the provisions of CPLR 2307. CPL 610.20 (subd 2) permits the *785District Attorney to issue such subpoenas directly. Subpoenas duces tecum are judicial subpoenas (CPLR 2302, subd [b]), returnable before the court. (CPLR 2305, subd [a].) The court before which the subpoenaed records are produced can best protect the confidentiality of persons, such as the juvenile’s parents who are not parties, and the interests of the parties by inspecting the documents in camera and redacting therefrom all entries which are irrelevant or immaterial to the issues sub judice. (Matter of Louis F., 54 AD2d 104, 107, affd 42 NY2d 260.) Once redacted, the records should be disclosed to both the defense and prosecution so that the interests of both the juvenile and the State can be adequately represented.
Since the determination to remove the case to the Family Court or to proceed to Grand Jury presentation is made by the Criminal Court in the first instance, the application for a subpoena duces tecum should be made there. (CPL 180.75, 610.20.)