The relator was imprisoned in the Monroe County Penitentiary by virtue of a certificate of conviction made by a justice of the peace of that county on the charge of assault in the third degree upon one William Pffarr, by which certificate it appears that it was adjudged that he be imprisoned in the Monroe-County Penitentiary for a period not exceeding 180 days. To the-return of the defendant to the writ of habeas corpus that the relator was in custody by virtue of the warrant of commitment or certificate before mentioned, the relator answered and demurred to-the effect that the return furnished no support to his custody by the defendant. It must be assumed that the relator was properly before the court of special sessions, and was tried and convicted for-the offense charged. Thereupon it was within the power of that court to render judgment imposing a fine not exceeding $50 or imprisonment for a term not exceeding 6 months, or both such fine- and imprisonment. Code Cr. Proc. § 717. The term of imprisonment, however, must be definitely fixed and declared by the judgment. It cannot lawfully be left to the management of the jail or penitentiary to determine the length of time which, within a certain period, the imprisonment shall continue. In that respect the-judgment of conviction and the certificate thereof, constituting the-warrant of commitment, were ineffectual to continue the relator in custody for any length of time. But it is said on the part of the defendant in the proceeding that this, at most, was merely error,, available only on review, and therefore it is not within the legitimate purpose of a writ of habeas corpus to relieve the relator from his imprisonment. While it is true that upon the return of such a writ the inquiry cannot be made into the legality or justice of the mandate or judgment of a competent tribunal of civil or crim*996inal jurisdiction when the time for which the prisoner may be legally detained has not expired (Code Civ. Proc. §§ 2032, 2034), the proceeding is founded not upon any want of jurisdiction to render a judgment of conviction against the relator, or upon any error of the court in the trial leading to the judgment, but it rests upon the alleged fact that there was no power in the court to render the judgment which was pronounced, and that the certificate of conviction, by virtue of which he was imprisoned, gave no support for his detention.
The question to be considered here is one of power of the court of special sessions, and that is not necessarily included within the meaning of the words “legality” and “justice,” as used in the statute. Although it was within the power of the court to render a judgment, unless the court had power to render the judgment pronounced, it was not the judgment of a competent tribunal, within the meaning of that term, and was void. People v. Liscomb, 60 N. Y. 559. It is urged by the learned counsel for the respondent that the sentence of the court was' for imprisonment for 180 days. While such effect might be given to the execution of the judgment, it is the nature of it, not the consequences of its execution which may follow, that determines the character of the judgment. The term of imprisonment is not so pronounced that its termination before the expiration of the 180 days would violate the direction expressed in the sentence of the court. How, then, can it be said to have been definite or certain in that respect? And, if not so, how can the judgment be treated as one which it was in the power of the court to render? It would seem, at the most, that the sentence'was one of imprisonment for no specific time, and therefore the relator was entitled to his discharge from custody in the penitentiary at any moment after he had been «confined there pursuant to the judgment, for the reason that the time for which he might legally have been detained had expired. Code Civ. Proc. § 2032. There is no opportunity to remand the relator for further action of the court and for resentence, because the court of special sessions, by which he was tried and convicted, ceased to exist for the purposes of that case when the judgment was pronounced and the certificate of conviction was made; and it cannot be reorganized to take further proceedings in the matter of that prosecution of the relator. People v. Smith (Sup.) 9 N. Y. Supp. 181; People v. Norton, 76 Hun, 7, 27 N. Y. Supp. 851. It is otherwise when a judgment of conviction of a court of record is void by reason of a want of power to impose the punishment pronounced by it. Then the prisoner may be remanded for resentence, and the record may be corrected accordingly. People v. Kelly, 32 Hun, 536, 97 N. Y. 212.
These views lead to the conclusion that the order appealed from should be affirmed. All concur.