The petitioner sues out the writ of habeas corpus, claiming to be illegally deprived of his liberty by the sheriff of Oneida county. That officer makes return to the writ that he holds him under a commitment of W. M. Fox, Esq., a justice of the peace of the town of Annsville, of which the following is a copy :
“ County of Oneida—ss. : In the Name of the People of the State of New York:
“ To the Sheriff of the County of Oneida : An order having this day been made by me that Bert Day be held to answer to the court of Oneida county, next session grand jury, upon a charge of breach of peace, in threatening on different occasions to kill one John Armstrong, of above county .and town of Annsville, or until sufficient bail is secured by said Day, you are *335commanded to receive him into your custody, and detain him until he be legally discharged.
“Dated at the village of Taberg this 5th day of July, 1898,
“ W. M. Fox,
“ Justice of the Peace of the Town of Annsville,”
To the return of the said sheriff to the writ of habeas corpus, that the relator was in custody by virtue of the above warrant of commitment, the relator answers that the said return and said paper writing called a “ commitment ” are insufficient to justify the detention of the said relator, or his imprisonment by the said sheriff, etc.
The Code of Criminal Procedure, after providing for the arrest of a prisoner who has threatened to commit a crime, and the examination of complainant and witnesses, etc., further provides :
“Sea 89. Security to Keep the Peace; When Required. If, however, there be just reason to fear the commission of the crime, the person complained of may be required to enter into an undertaking, in such sum, not exceeding one thousand dollars, as the magistrate may direct, with one or more sufficient sureties, to abide the order of the next court of sessions of the county, and in the meantime to keep the peace towards the people of the state, and particularly towards the complainant.
“ Sec. 90. If the undertaking required by the last section be given, the party complained of must be discharged. If it is not given, the magistrate must commit him to prison, specifying in the warrant the cause of commitment, the amount of security required, and the omission to give the same.
“Sec. 91. If the person complained of be committed for not giving security, he may be discharged by any two justices of the peace of the county, or police or special justices of the city, upon giving the security.”
It will be noticed that the warrant of commitment in question recites that “ an order having been this day made by me that Bert Day be held to answer to the court of Oneida county, next session grand jury, upon a charge of breach of peace,” etc. It *336does not recite or show that the relator was required to give an undertaking in any sum or amount, or the omission to give security. There is no provision of law by which a person can be held to await the action of the grand jury for an alleged threat to commit a crime. He may be compelled to give security to keep the peace, and the justice of the peace could only commit him for a failure to give the undertaking, which specified the amount, not exceeding $1,000. The committing magistrate is the person to fix the amount of such undertaking. This warrant recites, “or until sufficient bail is secured by said Day.” Who, then, is to be the judge of the amount of what the under taking shall be ? The magistrate has not fixed the amount Shall the sheriff fix it, or if he applies to the two justice of the peace for his discharge, under section 91, above, shall or can they fix the amount ? That section provides that he may be discharged upon giving “ the ” security. This clearly refers to the security prescribed by the committing magistrate, and specified in the warrant of commitment. In the case of Bradstreet v. Furgeson, 23 Wend. 641, the court, in the opinion, referring to a warrant of commitment for failure to give the security to keep the peace, says:
“ By the common law a warrant of commitment for an offense must, upon its face, show the cause of commitment, and the nature of the offense charged, so far at least as to show that the same was within the jurisdiction of the committing officer. Where the commitment is not for an actual offense, but merely to obtain security against an apprehended offense, the warrant must, upon its face, show the cause of committal ; that is, the direction of the magistrate that the party should find surety and the neglect of such party to do so. This is in accordance with the provision of the Revised Statutes on this subject, which directs the warrant to specify the cause of the commitment, and the sum in which security was required to be given. 2 Rev. St. p. 704, § 5.”
I find no material difference in the statute above cited and the provisions of the Code above referred to.
In People v. Webster, 92 Hun, 379, 36 N. Y. Supp. 995, Bradley, J., says:
*337“ 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, by which certificate it appears that it was adjudged that he [relator] be imprisoned in the Monroe county penitentiary for a period not exceeding 180 days. * * * It was within the power of that court [special sessions] to render judgment imposing a fine not exceeding $50, or imprisonment for a term not exceeding six 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 for 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 on review, and therefore it is not within the legitimate purpose of a writ of habeas corpus to relieve the relator from hi's imprisonment. While it is true that upon the return of such a writ an inquiry cannot be made into the legality or justice of the mandate or judgment of a competent tribunal of civil or criminal jurisdiction when the time for \yhich the prisoner may be legally detained has not expired (Code Civ. Proc. §§ 2032, 2033), this proceeding is founded, not upon any alleged want of jurisdiction to render a judgment of conviction against the relator, or upon any alleged 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, was no warrant for his detention. * * * 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 *338reason that the time for which he might legally have been detained had expired.”
It follows that the warrant of commitment issued by the justice aforesaid was without authority of law and void. The writ is sustained, and the relator is discharged.
Ordered accordingly.