Proceeding pursuant to CPLR article 78, inter alia, in the nature of mandamus, to compel the respondent Stewart A. Rosenwasser, a Justice of the Supreme Court, Orange County, to provide the petitioner with a rehearing and review before a jury of an order of the Supreme Court, Orange County (Berry, J.), dated February 5, 2002, which authorized the petitioner’s continued retention and psychiatric confinement, and to vacate so much of an order issued by him on January 17, 2003, as, upon review of the order dated February 5, 2002, granted the motion of the respondent James Stone, Commissioner of the New York State Office of Mental Health, for summary judg*432ment, on the ground that the petitioner was not only mentally ill, but dangerously mentally ill, as a matter of law, and, in effect denied the petitioner a rehearing and review before a jury pursuant to CPL 330.20 (16), Mental Hygiene Law § 9.35 and 14 NYCRR 541.13 (b).
Adjudged that the petition is granted, without costs or disbursements, the order dated January 17, 2003, is vacated, and the matter is remitted to the Supreme Court, Orange County, for a rehearing and review before a jury.
The extraordinary remedy of mandamus will lie only to compel the performance of a ministerial act and only when there exists a clear legal right to the relief sought (see Matter of Legal Aid Socy. of Sullivan County v Scheinman, 53 NY2d 12, 16 [1981]). The petitioner, a person found not responsible for criminal charges by reason of mental disease or defect, has a clear legal right to jury review of the issue of whether he is mentally ill and subject to a continued deprivation of liberty (see CPL 330.20 [16]; Mental Hygiene Law § 9.35; 14 NYCRR 541.13 [b]; Matter of Watkins R. v Berry, 276 AD2d 492, 493 [2000]; Matter of Launcelot T. v Mullen, 264 AD2d 697 [1999]; Matter of Barber v Rochester Psychiatric Ctr., 250 AD2d 87 [1998]). This right is absolute, unless waived by the petitioner, and the Supreme Court was required to provide him with such review (see CPL 330.20 [16]; Mental Hygiene Law § 9.35; 14 NYCRR 541.13 [b]; Matter of Watkins R. v Berry, supra; Matter of Launcelot T. v Mullen, supra). Upon a proper request for such review, once a jury makes the determination that the petitioner is mentally ill and subject to a continued deprivation of liberty, only then can a determination be made, by the court, regarding whether the petitioner has a dangerous mental condition requiring secure detention (see Matter of Watkins R. v Berry, supra; Matter of Maureen A. v Wack, 153 Misc 2d 600, 604 [1991]). Accordingly, the Supreme Court erred in granting the motion of James Stone, Commissioner of the New York State Office of Mental Health (hereinafter the Commissioner) for summary judgment at the onset of the rehearing and review of the February 5, 2002, order.
Contrary to the Commissioner’s contention, since the order dated January 17, 2003, is not a commitment order, retention order, or recommitment order, nor is it an order “authorizing [the petitioner’s] continued retention under the original order” (CPL 330.20 [21] [a] [ii]), the petitioner has no avenues of redress available to him other than this CPLR article 78 proceeding. Altman, J.P, Cozier, Mastro and Rivera, JJ, concur.