Proceeding pursuant to CPLR article 78 in the nature of prohibition to enjoin Joseph A. Grosso, a Justice of the Supreme Court, Queens County, and Richard A. Brown, the Queens County District Attorney, from enforcing an order of that court dated May 26, 2006, in a criminal action entitled People v McClain, under indictment No. 955/2005, which directed the petitioner to submit to an HIV test, and application for poor person relief.
Ordered that the branch of the application which is for poor person relief is granted to the extent that the filing fee imposed by CPLR 8022 (b) is waived, and the application is otherwise denied as academic; and it is further,
Adjudged that the petition is granted, on the law, without *766costs or disbursements, and the respondents are prohibited from enforcing the order dated May 26, 2006.
Public Health Law § 2781 delineates the conditions for obtaining an order for the performance of an HIV-related test. Pursuant to that section, HIV-related testing is prohibited without the written informed consent of the person to be tested, except as authorized by CPLR 3121 or otherwise specifically permitted by statute (see Matter of Doe v Connell, 179 AD2d 196, 199 [1992]). Under the circumstances of this case, the respondents lacked specific statutory authority to compel the petitioner to submit to an HIV-related test (see Matter of Garinger [Doe], 305 AD2d 677 [2003]; Matter of Donald P. v Palmieri, 246 AD2d 597 [1998]; Matter of Doe v Connell, supra). Since the respondent Joseph A. Grosso exceeded his authority in ordering the petitioner to be tested, the petitioner demonstrated a “clear legal right” to the remedy of prohibition (Matter of Schumer v Holtzman, 60 NY2d 46, 51 [1983]; Matter of Donald P. v Palmieri, supra). Miller, J.P., Adams, Skelos and Covello, JJ., concur.