The return shows that, on the 21st of August, 1884, at a court of Special Sessions, held by a justice of the peace, the relator was duly convicted of the crime of petit larceny, and was thereupon sentenced to imprisonment in the Onondaga county penitentiary for the term of one year. A commitment in the usual form, reciting these facts, constitutes the authority and true cause of the imprisonment of the relator.
By section 56 of the Code of Criminal Procedure, jurisdiction is conferred upon courts of Special Sessions to hear and determine certain charges, and among others petit larceny. By section 535 of the Penal Code, petit larceny is declared to be a misdemeanor, and by section 15 a person convicted of a crime declared to be a misdemeanor, for which no other punishment ■is specially prescribed by statute, is punishable by imprisonment in a penitentiary or county jail for not more than one year, or by a fine of not more than $500, or by both. There seems to be no other provision of law now in force fixing the punishment for this offense.
By section 717 of the Code of Criminal Procedure, the greatest punishment that can be inflicted by a court of Special Sessions upon any offender convicted before it, is a fine not exceeding $50, and imprisonment not exceeding six months. The magistrate who imposed sentence upon the relator apparently had in mind section 15 of the Penal Code, and disregarded section 717 of the Criminal Code. The sections cited from the Penal Code do not expressly nor impliedly repeal the section cited from the Criminal Code, as will be seen by comparing the last section of both Codes. Each Code provides *440that when construed in connection with other statutes, it must be deemed to have been enacted on the fourth day of January, 1881. Criminal Code, § 963; Penal Code, § 727. Nor does it necessarily follow that' the two Codes are inconsistent, for it may have been the intention of the Legislature when it conferred exclusive jurisdiction upon courts of Special Sessions to hear in the first instance a large number of offenses, to prevent those courts, usually held by inexperienced men, from inflicting as severe punishment for an offense as could be imposed by a court of record upon the removal of the case thereto. Code Crim. Pro. §§ 56, 57.
It is conceded on the part of the people that the court of Special Sessions had no power to sentence the relator for the term of one year. It is, however, contended that the whole sentence is not void, but only so much thereof as was unauthorized, arid that hence the prisoner should be detained for the longest term that the court could have legally imposed.
If under any circumstance, or upon any state of facts, the court of Special Sessions, had power to inflict the punishment specified in the commitment, it might be held that the error was not one that could be reviewed upon habeas corpus. People ex rel. Devoe v. Kelly, 32 Hun, 536. In such a case the relator might not be entitled to the writ, because his detention would be by virtue of the final judgment of a competent tribunal of criminal jurisdiction, and hence his only remedy would be to appeal, and have his sentence modified or corrected in that way. Id.; Code of Civ. Pro. § 2016. But this commitment shows upon its face that it was issued to enforce a judgment that the court not only had no power to render, but was actually prohibited from rendering. The judgment was not merely erroneous. It was not merely unauthorized. It was forbidden by law. The statute says that the court of Special Sessions may render judgment “ of fine or imprisonment, or both, but the fine cannot exceed fifty dollars, nor the imprisonment six months.” Code Cr. Pro. § 717.
The judgment is, therefore, one that the court could not under any circumstances have pronounced, and is as absolutely void as if the relator had been sentenced to death. People ex *441rel. Tweed v. Liscomb, 60 N. Y. 559, 568. It is my duty to' order the discharge of the prisoner.
Note.—There is an obvious distinction between the present case and People ex rel. Devoe v. Kelly, ante, p. 428. In the case at bar, the relator was undergoing a void sentence, in the latter case the prisoner was still in custody of the sheriff, under a valid judgment, and the void sentence had not yet been executed.