Proceeding pursuant to CPLR article 78 in the nature of prohibition to prohibit the respondents from proceeding with a criminal action entitled People v Barton, pending in the Supreme Court, Queens County, under indictment No. 1046/08. Application by the petitioner to prosecute the proceeding as a poor person.
Ordered that the application to prosecute the proceeding as a poor person is granted to the extent that the filing fee imposed *616by CPLR 8022 (b) is waived, and the application is otherwise denied as academic; and it is further,
Adjudged that the petition is denied and the proceeding is dismissed on the merits, without costs or disbursements.
“Because of its extraordinary nature, prohibition is available only where there is a clear legal right, and then only when a court—in cases where judicial authority is challenged—acts or threatens to act either without jurisdiction or in excess of its authorized powers” (Matter of Holtzman v Goldman, 71 NY2d 564, 569 [1988]; see Matter of Rush v Mordue, 68 NY2d 348, 352 [1986]). “As petitioner properly contends, prohibition lies where, as here, a petitioner claims that a prosecution is improper because it is barred by immunity” (Matter of Rosato v Reed, 13 AD3d 1175, 1175 [2004] [citations omitted]; see Matter of Rush v Mordue, 68 NY2d 348, 355 [1986]).
However, contrary to the petitioner’s contention, he voluntarily waived immunity from prosecution when he testified before the grand jury (see CPL 190.45 [2]; People v Cole, 196 AD2d 634, 636 [1993]; People v Allen, 163 AD2d 396, 397-398 [1990]; People v Hodge, 141 AD2d 843, 845 [1988]; see also People v Baker, 225 AD2d 630 [1996]). Therefore, the petitioner has failed to demonstrate a clear legal right to the relief sought. Miller, J.P., Dickerson, Leventhal and Belen, JJ., concur.