Petitioner, District Attorney of New York County, seeks a writ of prohibition precluding the respondent Justice of the Supreme Court from the hearing of the writ of habeas corpus herein and prohibiting respondent Warden from producing the relator before a Justice of the Supreme Court in New York County.
The relator is confined in Green Haven Prison as a parole violator upon a commitment issued June 18, 1936. Relator was sentenced to prison terms aggregating not less than 25 nor more than 40 years. The petition in aid of the writ of habeas corpus alleges that at the time sentence was imposed the allocution required by section 480 of the Code of Criminal Procedure was omitted and that he was not represented by counsel.
In response to the District Attorney’s order to show cause, the attorney for the relator states ‘ ‘ that the relator is not seeking to be discharged from a state institution, but is merely seeking to have the sentences that were imposed * * * vacated and set aside, which does not affect the verdicts [sic] of the jury that found the relator guilty upon his trial, and if the relator is successful in vacating the sentences imposed upon him, the Court will still have the legal power to impose new sentences based upon a judgment of guilty returned by the jury ’ ’. The sole relief requested is the production of the relator before a Justice of the Supreme Court, New York County.
In such case the second sentence of CPLR 7004 (subd. [c]) is applicable: “ (c) Before whom returnable. A writ to secure *397the discharge of a person from a state institution shall be made returnable before a justice of the supreme court or a county judge being or residing within the county in which the person is detained; if there is no such judge it shall be made returnable before the nearest accessible supreme court justice or county judge. In all other cases, the writ shall be made returnable in the county where it was issued, except that where the petition was made to the supreme court or to a supreme court justice outside the county in which the person is detained, such court or justice may make the writ returnable before any judge authorized to issue it in the county of detention.”
The second sentence of subdivision (c) makes discretionary whether a Justice of the Supreme Court will make the writ returnable before himself or before a Judge authorized to issue it in the county of detention. Since this case was tried in New York County, a provident exercise of discretion warrants the production of the relator in the county where he was tried.
A writ of habeas corpus is appropriate for relief consequent on noncompliance with section 480 of the Code of Criminal Procedure. (People ex rel. Miller v. Martin, 1 N Y 2d 406; People v. Sullivan, 3 N Y 2d 196, 198.) If the writ is sustained thereon, the relator in such case is not entitled to a discharge; he will be resentenced.
People v. Huntley (15 N Y 2d 72), relied on by petitioner District Attorney, does not hold otherwise. There the court observed (p. 76): “Difficulty with the use of habeas corpus comes from the requirement (continued from Civ. Prac. Act, § 1239, subd. 3, into CPLR 7004, subd. [c]) that the writ must in most instances be returnable in the county in which the relator is detained.”
It is not within the scope of a writ of prohibition to challenge the discretion exercised in the granting of the writ of habeas corpus herein. Special Term has the power to. hear this application and a writ of prohibition does not lie.
In Matter of Fitzgerald v. Wells (14 Misc 2d 435, affd. 9 A D 2d 812, mot. for lv. to app. den. 7 N Y 2d 711) it was held that the Supreme Court could not prohibit a Surrogate from proceeding to hear and determine an application which he had power to hear.
Accordingly, the application for a writ of prohibition should be denied and the stay heretofore issued vacated.