Shanks' Case

Fancher, J.

It will be proper to dispose of some preliminary questions before considering the merits of this matter.

1. During the proceedings it was objected by the district attorney of Kings county, that the writ of habeas corpus was improvidently issued by a justice of the supreme court when the court was in session. The statute under which the objection is made is itself an answer to the objection. It provides that application for the writ shall be made by petition, (1) to the supreme court during its sitting, or (2) during any term or vacation of the supreme court, to any one of the justices of the supreme court, or any officer who may be authorized to perform the duties of a justice of the supreme court at chambers, &c„ The common practice in this district is to apply for the writ to the justice of the court, sitting at chambers, and the writs are uniformly granted on such application. It has never been doubted that such jurisdiction is conferred by the statute on a justice of the court, though a term of the court may at the time be held (Exp. Beatty, 12 Wend., 229 ; People ex rel. Trainer v. Cooper, 8 How. Pr., 288; People ex rel. Bentley v. Hanna, 3 Id., 39).

2. It is objected that the writ should have been made returnable in the oyer and terminer while it was *41in session. The statute under which the objection is made (2 Laws of 1847, ch. 460, p. 599, § 27; same statute, 3 Rev. Stat., 5 ed. 1066, § 27) is not applicable to this case. It relates only to prisoners confined in the •common jail of the county, upon a criminal charge. There is no pretense that the petitioner was actually or constructively confined in the common jail of New York county on a criminal charge.

3. It is further objected that the writ should have been returnable before some court or officer in Kings county. The objection is founded on section 38, formerly section 24, of the habeas corpus act (2 Rev. Stat., 564, § 24; same stat., 3 Id., 5 ed. 884, § 38.) It provides that whenever application for the writ be made to “ any officer,” not residing within the county where the prisoner shall be detained, he shall require proof that there is no officer in such county authorized to grant the writ. There are two answers to this objection. (1.) The petition on which the writ of habeas corpus issued, expressly averred that the petitioner was then “confined and restrained of his liberty by the sheriff of Kings county, in the court-house of the city and county of New York.” (2.) If it be conceded that the imprisonment was constructively in Kings county, it has been held both at special and general term of the supreme court, that the section referred to does not apply to a justice of the supreme court: and that a justice of that court can, even when sitting at chambers, award a writ of habeas corpus that shall run to any part of the State, although there is an officer in the county where the imprisonment exists who could issue the writ (People ex rel. Bentley v. Hanna, 3 How. Pr., 39 ; People ex rel. Trainer v. Cooper, 8 Id., 288 ; People v. Folmsbee, 60 Barb., 480-487).

4. Another point is made on § 5 of the habeas corpus act (2 R. S., 560, § 5, same stat., 3 Id., 5 ed., 877). It provides that whenever any person shall be committed on *42any criminal charge, and a habeas corpus to testify be issued, the shall be remanded after having testified.” I have doubted whether this provision of the statute is not mandatory on the court or judge, in habeas corpus proceedings. But further consideration has convinced me that the section was intended to apply to the court or officer before whom the prisoner is brought to testify, and that it does not prohibit an inquiry on habeas corpus as to the lawful imprisonment of the petitioner. To give the section so extended a construction as to deny an inquiry on habeas corpus into an alleged unlawful detention, would virtually nullify various provisions of the habeas corpus act, especially section 48 (2 Rev. Stat., 569, § 48; same stat., 3 Id., 5 ed., 889, § 64.) That section provides that the party brought before the court or officer, on the return to a habeas corpus, may deny any of the material facts set forth in the return, or allege any fact, to show either' that his imprisonment or detention is unlawful, or that he is entitled to his discharge, and thereupon such court or officer shall proceed in a summary way to hear the proofs and allegations; and to dispose of such party as the justice of the case may require. Effect cannot be given to this section if it be held that the section on page 877 (§ 5) has any other intention than to prescribe to the court before whom a prisoner is brought to testify, a direction to remand him. I think the section was not intended to sweep away the positive provisions of the habeas corpus act. Habeas corpus is a great bulwark of liberty, and the operation of the statutes which give it power should not be restrained by doubtful and unnecessary construction.

Another question is raised on section 43 of the habeas corpus act (2 Rev. Stat., 568, § 43 ; same statute, 3 Rev. Stat., 5 ed., 838, §58.) It provides that if it appear that the party has been legally committed for any criminal offense, if he appear to be guilty of the offense, although *43the commitment be irregular, the court or officer shall remand him. This question touches the merits. Perhaps it would be an answer to the point raised on this section that the petitioner here was. not committed for any criminal offense, but was committed for an alleged contempt. But independent of that answer, does it appear that “the party has been legally committed ? ” It was decided in Hackley's case, 21 How. Pr., 103, that if a party be detained in custody for any contempt, it must be plainly charged in the commitment, by some court having authority to commit for the contempt charged, and that “there must be sufficient on the face of the commitment to enable the court to see that the commitment does charge a contempt, and that the contempt charged was one for which the committing court or body had authority to commit.” The court had in this matter authority to commit for “ a term not exceeding thirty days.” It had no jurisdiction to order an unlawful commitment. Suppose the court had ordered the petitioner to be confined in a prison for thirty years. Would it be contended that relief could not be had on habeas corpus from such, an unlawful commitment %

There is no difference in principle between the case supposed and the case under consideration. A commitment for an indefinite time is not authorized by law, and the court has no jurisdiction to make it. In People v. Hicks, 15 Barb., 153, it was held by the general term of this district that a commitment for contempt could not be discharged, if it appeared that the court or officer committing had power to require the act to be done, and authority to enforce the decision. It comes back to the question of power. There are cases' where, on habeas corpus, the inquiry into the practice: or legality of the order or judgment directing imprisonment cannot be made. Thus, where the legality of the. order can be tested on an appeal, there an appeal must be the remedy But the decisions which affect such *44cases are not applicable to this case, for the order of commitment is not an appealable order.

It was also held by the court of appeals in the Hackley case (24 N. Y., 74; affirming 12 Abb. Pr., 150), that the rule referred to, respecting the inability of the court on habeas corpus to examine the cause of commitment, has its qualification ; and that the court or officer on habeas corpus may inquire “whether the conduct charged as constituting the contempt” was such that delinquency or misbehavior can be predicated of it. The doctrine of the court of appeals in that case is to the effect that an adjudication of the court in which the alleged contempt occurred cannot establish as a contempt that which the law entitles á party to do. It is equally clear, on principle, that an adjudication of the court in which an alleged contempt has occurred cannot prescribe an unlawful punishment for the contempt. It is not intended to deny that the court of oyer and terminer in Kings county had authority to inquire into the alleged contempt. The commitment cannot be impeached for that cause. On habeas corpus the court is deprived by statute of any power “to inquire into the justice or propriety of any commitment for any contempt made by any court, officer or body, according to law, and charged in such commitment” (2 Rev. Stat., 568, § 42 ; same statute, 3 Id., 5 ed., 888, § 57). The essential qualification of a valid commitment for contempt is that it be “according to law.” The justice or propriety of the commitment cannot be inquired into if it be “ according to law.” There is meaning in those words of the statute.' This will appear on perusal of the entire section with the correlative sections of the habeas corpus act. The former part of section 57 [42] provides that no court or officer on habeas corpus shall have power to inquire into the legality or justice of any process, judgment, decree or execution specified in the preceding section 22. Turn*45ing to that section we find that the “ process ” referred to is process of the courts and judges of the United States, in cases where, by law, they have exclusive jurisdiction ; and the judgments and decrees referred to are final judgments and decrees. The section adds “but no order of commitment for any alleged contempt . . . shall be deemed a judgment within the meaning of this section.”

Appeals are the proper remedy for illegal judgments, and therefore they may not be inquired into on habeas corpus. The language of the statute is different when a commitment for a contempt is mentioned. There the only limitation is against an inquiry into the justice or propriety of any commitment for a contempt made “according to law.” If the commitment be not according to law, its “legality” may and should be inquired into.

The office of the writ of habeas corpus is to vindicate the right of personal liberty. It is a high prerogative writ, and whenever demanded on a proper petition must be issued, under severe penalty for refusal, imposed on the officer to whom the application is made. It lies in all cases of imprisonment, commitment, detention, confinement, or restraint, for whatever cause or under whatever pretense, except in the few specified instances where the statute forbids its use (2 Rev. Stat., 563, § 22 ; same statute, 3 Id., 5 ed., 883, § 36). The duty in all cases is to grant release where the imprisonment, detention or restraint is illegal. As was said by the court in Watson’s Case (5 Lans., 466 ; affirming 3 Id., 408): “If the magistrate who issues the process to imprison had not the right to issue such process, the imprisonment is illegal.” The same remark is applicable to a court. There is a wide differ-\ ence between an informal commitment and an illegal Í commitment. The former, if it be one which a court, could make for a contempt, plainly charged, is suffi- | *46cient, though in some form or part it be defective ; for example, where it is not directed to any officer. But the latter, which on its face is shown to be illegal, is insufficient; for example, where it is directed by a civil court to a.military officer; or enjoins a perpetual or indefinite imprisonment. It was held in the People ex rel. Mitchell v. Sheriff of New York (29 Barb., 622; S. C., 7 Abb. Pr., 96), that upon habeas corpus to inquire into the detention of a person committed for contempt, two questions can be examined: first, the jurisdiction of the tribunal by which the party was committed ; and second, the form of commitment. An examination of the form of the commitment in this case under which the petitioner was restrained when the writ issued, shows that' it was an illegal commitment, which no court had the power to issue. The statute (2 Rev. Stat., 278, § 11; same statute, 3 Id., 5 ed., 470, § 9), limits the period of imprisonment for contempt to thirty days, and is higher than the court which commits the petitioner for an unlimited period. Of course I refer to the commitment under which the petitioner was imprisoned in Kings county, and upon which he was afterward detained in Hew York county. This was the sheriff’s only warrant for such detention when the habeas corpus was issued and served. The commitment states that the court had adjudged the petitioner guilty of a criminal contempt. The proof shows conclusively that the subsequent paper was not delivered to the sheriff until after the hearing on the habeas corpus case had commenced. Hor was it according to the order of the court. I cannot regard this ex post facto paper as of any validity in this case, for two sufficient reasons. It is proved that the relator was not imprisoned or detained under it; and a man cannot be first imprisoned and afterward adjudged in contempt. The judgment must precede the imprisonment. It appears from the evidence of the district-attorney that the *47“ Exhibit B” was not signed by the side justices until October 23, whereas the imprisonment took place on October 22, and the sheriff of Bangs county held him in custody under “Exhibit A,” which is in my opinion an illegal commitment. The second commitment was not executed until the 23rd, and could not legalize an existing imprisonment.

The result of these remarks is that the petitioner must be discharged.