Judgment, denominated an order, in an article 78 proceeding in the nature of prohibition affirmed, without costs, on the limited ground that it was improvident to entertain the proceeding to prohibit the exercise of jurisdiction by the habeas corpus court. The habeas corpus court had jurisdiction to entertain the writ (CPLR 7004) and power to order a hearing to be held by the sentencing court (see, e.g., People ex rel. Prosser v. Martin, 306 N. Y. 710, 711-712). Hence, prohibition, which might be available to restrain a court from proceeding without jurisdiction or in excess of its powers, does not lie (see Matter of Proskin v. County Ct. of Albany County, 30 N Y 2d 15, 18; Matter of Lee v. County Ct. of Erie County, 27 N Y 2d 432, 436-437; Matter of Hogan v. Culkin, 18 N Y 2d 330, 336; cf. Matter of Marx v. Holloran, 236 App. Div. 680). Moreover, it would appear to be unseemly to invoke a summary proceeding to restrain proceedings under the constitutional writ (N. Y. Const., art. I, § 4). The evident unseemliness is further aggravated by the availability of an appeal, under *249CPLR 7011, from a judgment of habeas corpus (see Matter of Lee v. County Ct., supra, p. 437). Nor was the judgment any less final, for purposes of appeal, because it, in effect, directed a further hearing in the criminal action by the sentencing court (cf. People ex rel. Prosser v. Martin, supra). Prohibition does not ordinarily lie if there be an adequate remedy by way of appeal (Matter of Lee v. County Ct., supra).
In light of this disposition, the court does not consider the several grounds adopted by the Appellate Division in its opinion dismissing the petition. It is noted, also, that the controversy has been mooted: the Supreme Court in Bronx County conducted the postconviction hearing directed by the habeas corpus court, and found that the prisoner, Pugach, had been competent to stand trial in 1962.
Chief Judge Breitel and Judges Jasen, Jones, Wachtler, Rabin and Stevens concur in Per Curiam opinion; Judge Gabbielli taking no part.
Judgment affirmed, without costs.