
    The People of the State of New York ex rel. Harold Scott, Appellant, v Superintendent, Great Meadow Correctional Facility, Respondent.
   Casey, J.

Appeal from a judgment of the Supreme Court at Special Term (Ford, J.), entered October 26, 1984 in Washington County, which denied petitioner’s application for a writ of habeas corpus, in a proceeding pursuant to CPLR article 70, without a hearing.

Petitioner is presently serving a prison sentence of 25 years to life imposed upon him with other concurrent sentences following conviction, after trial, of murder in the second degree, rape, sodomy and other crimes. Timely appeal of this conviction has been taken by petitioner and is presently pending before the Appellate Division, Second Department. In these circumstances, petitioner applied to Special Term for a writ of habeas corpus. This application was denied without a hearing.

On this appeal, petitioner claims error, contending that his fitness to proceed to trial in the criminal action should be tested at a hearing. Special Term based its determination upon the insufficiency of the application to show that the trial court had any reason to inquire as to petitioner’s mental capacity, and also for the reason that habeas corpus is no substitute for an appeal. We agree. Habeas corpus is inappropriate when petitioner’s contentions of illegality can be reviewed directly, either by appeal or pursuant to a CPL article 440 proceeding in the court of conviction (see, People ex rel. Thomas v LeFevre, 102 AD2d 925). Since petitioner’s contentions can be reviewed on his pending appeal, the judgment dismissing his application for a writ of habeas corpus without a hearing should be affirmed.

Judgment affirmed, without costs. Kane, J. P., Main, Casey, Weiss and Levine, JJ., concur.  