We are asked to consider whether there was error in the allowance, by the judge of the common pleas, of the writ in this case? Whether he had any jurisdiction thus to interfere with the question of Collier’s imprisonment, inasmuch as he was detained ■on process issued by a judge of the district court of the United States, and for an alleged infraction of the law of Congress ?
This court is not prepared to assent to the argument of the district attorney for the United States. It denies to the state judiciary an important power, the exercise of which, if limited by the rule claimed by him, will endanger the personal liberty of the citizen, and open, dangerously wide, the door of oppression. The “privilege’’ of the writ of habeas corpus is secured by our national and ■state constitutions to every citizen It can only be suspended or withheld in cases of rebellion or invasion, when the public safety may require it. Subject to that reserved right of the national or state governments, to be employed in the extreme cases named, each citizen is vested with this ancient and sacred shield of liberty. To the judicial department of the government, is delegated the ■duty of enforcing applications for its invaluable benefits, when properly demanded. Our statute relating to the subject gives to *59, 60the judges of the courts, separately, at chambers, jurisdiction of the subject-matter in all cases, except when the person is convicted of a crime or offense, and stands committed for it; or where he is committed-for treason or felony, the punishment whereof is capital, plainly expressed in the warrant of commitment. Not only is such jurisdiction given to the judges, but when the person who is unlawfully deprived of his liberty makes his application to one of them, as provided in the law, for the benefits of the writ, it is made the duty of such judge forthwith to issue it. The exempted cases of convicted persons who *stand committed, and of treason [59 or felony, punishable capitally, are the only restrictions upon the power of a single judge. The common-law courts are clothed with power adequate for those and for all other cases which may arise. In the exercise of this power by a single judge or a court, every case of unlawful imprisonment may be reached and examined into. It can make no difference whether the detention is by color or authority from a court of the United States; or from any officer, commissioner, agent, or other functionary of the federal government; or by virtue of any writ issued, or authority claimed by one of the states of this republic, or by a' foreign government. The true test of jurisdiction is, whether the relator is detained or imprisoned without legal authority? The source from which the imprisonment emanates, or the authority by which it is sought to-be enforced, operates as no barrier to the allowance and validity of the writ. The power exists to make inquiry into the cause of the caption and detention, and it may be pursued without regard to the origin of the imprisonment, or the condition of the imprisoned. In fine, we may well give our sanction to, and adopt the expressive and emphatic rule of Judge Coulter, in 7 Barr. 338: “No matter where or how the chains of captivity were forged, the power of the judiciary, in this state, is adequate to crumble them to the dust, if an individual is deprived of his liberty contrary to the law of the land.”
In thus stating the rule, we must be understood as referring solely to the power to grant the writ, and to examine into and decide upon the cause of caption and detention of the petitioner. But the view which we take of this case relieves us from the necessity of deciding whether the judge who discharged Collier was correct or incorrect in the conclusions by which he was governed in ^setting him [60 free. Upon that point we express no opinion.
*61This proceeding is brought here by the marshal, on certiorari. It is supposed that he relied, in the adoption of this form, on section 10 of the amendatory act securing the benefit of the writ of habeas ■corpus, passed February 8, 1847 (Swan’s Stat. 454), which provides: “ That the proceedings on any writ of habeas corpus shall bo recorded by the clerks, and may be reviewed on writs of error and certiorari, as in other cases now provided by law.”
At the time of this enactment, writs of error and of certiorari were, by law, the remedies in use for reviewing and correcting proceedings at law, in civil or criminal cases; but section 530 of the code, which took effect July 1, 1853, declares that writs of error and certiorari, to reverse, vacate, or modify judgments or orders in civil •cases, are abolished; and the petition in error is, by section 515 of the code, substituted in their place.
"We regard this in the nature of a civil jiroceeding. But if it be in the nature of a, criminal proceeding against a prisoner charged with crime, it is subject to the fatal objection that no such remedy ■can bo maintained in favor of the prosecution against the defendant. The right to prosecute a writ of error or certioi-ari against one who is indicted and tried for a crime or offense, is not given to the state, nor to those who. prosecute offenders under its laws.
Section 604 of the code enacts, “ That until the legislature shall otherwise provide, this code shall not affect proceedings on habeas corpus,” etc. It may be claimed that this clause, by its peculiar phraseology, saves the habeas corpus act, and all of the remedies .given by it, from the operations of the code. The word “proceedings” includes, we think, nothing mox'e .than the doings of the judge who allows the writ, and is limited to the hearing before him. The 61] filing of a petition in ei’ror is a proceeding before ^another tribunal. It is new in its character, and affects a review of the decision of the judge, without forming any part of the case before him.
The allowance of the writ; the bl'inging forward of the petitioner before the judge; the inquiry into the cause of his caption and detention ; the introduction of evidence, and the liberation, or other disposal of the relator; are all to be governed by the act relating thereto; and, as to other questions, to be determined by some other tribunal, though arising out of the case made on the writ, the code prescidbes the form by which they are to be governed.
We adopt this construction, the more willingly, as it secures uniformity of practice in cases of error in civil proceeding’s, which *62seems to be a prominent object of tbe code (see section 605); and, if carried out, will be found useful to the profession.
The writ is dismissed for want of jurisdiction.
Bartley, C. J„ and Swan, Brinkerhoee, and Scott, JJ., concurred.