delivered the opinion of the court.
From the facts, as stated in this case, and as they appear from the record, the main question for the court to decide is, had the circuit court of St. Louis county, or the judge thereof, in vacation, the power and authority to issue a writ of habeas corpus on the petition of tbe prisoner John Jackson ? If this question be answered in the affirmative, then no matter how indiscretely or how erroneously the said circuit court, or judge thereof, may have acted in discharging the prisoner Jackson, nevertheless such discharge will be a full and complete justification to the ministerial officer or jailor in obeying it.
Our statute upon the subject of habeas corpus, secs. 1 and 2 article 1st declares, that “ every person committed, detained, confined, or restrained of his liberty, within this State for any criminal matter or under any pretence whatsoever, except, when according to the provision? of this act, such person can neither be discharged or bailed, or otherwise relieved, may prosecute a writ of habeas corpus as hereinafter provided, to inquire into the cause of such confinement or restraint.
Sec. 2. Application for such suit shall be made by petition, signed by tbe party for whose relief it is intended, or by some person in his behalf, to some court of record in term, or to the (a) judge of the supreme court, or circuit court, or any justice of the county court. ” By this statute, power to grant or issue writs of habeas corpus is expressly given to the circuit court or to a judge thereof. This power is given with this restriction—see the exception in the first section of the act above recited—“except when according to the provisions of this act, such person can neither be discharged or bailed or otherwise relieved.” The prisoner John Jackson was indicted in the Saint Louis criminal court, for an offence which by our law is bailable, and was in confine*475.ment under process upon said indictment. Could the circuit court of St. Louis county, or the judge thereof, in vacation admit the prisoner to bail? See Revised Statutes 1844-5, practice and proceedings in criminal case art. IY secs. 19, 20, 21.
Sec. 19. “ Where the indictment is for a bailable offence, the defendant -may be let to bail by the court in which such indictment is pending, or if such court be not setting, by the judge thereof, 'or by any judge or justice of the county court of the county in which such indictment is pending.
Sec. 20. When the indictment is for a misdemeanor the sheriff may himself admit to bail, the defendant with sufficient security, in a sum proportioned to the offence, and which in no case shall be less than one hundred dollars, and the recognizance shall be signed by the prisoner and his securities, and attested by the sheriff.
Sec. 21. No court or officer, other than those specified in the two last sections, shall let to bail any person indicted for an offence.”
Do the words “ any judge or justice of the county court ” in the 19th section mean the same officer? Without giving any opinion as to the power of the St. Louis circuit court or the judge thereof in vacation to let to bail a prisoner confined upon indictment, found by another court of competent authority ; the prisoner Jackson may have been entitled to some other relief. At any rate the St., Louis circuit court and the judge thereof in vacation had the power to grant and issue the writ. This gives to. such court or judge jurisdiction over the subject matter-; and though the statute expressly declares- that “ no person imprisoned on an indictment found in any court of competent jurisdiction, or by virtue of any process or any commitment to enforce such indict-men can be discharged under the provisions of this act; but may be let to bail if the offence be bailable, and if the offence be not bailable, he shall be remanded forthwith.” See habeas corpus act art. Ill sect. 12. Yet this section does not take away the jurisdiction, but orders and directs what shall be done. A circuit judge, therefore, discharging against this provision of the statute, may be considered as acting indiscretely, even erroneously; yet having jurisdiction over the subject, his order discharging, must be considered a justification to the jailor in turning out the prisoner, thus ordered to be discharged. The rule is, if the court have jurisdiction over the subject matter, the sheriff must obey the writ. See 1st vol. Missouri Rep. 418, Berry and Smith vs. Burckhart; Sewell’s law of sheriff, Law Library vol. 44 p. 92.
When the court hath jurisdiction of the cause, and shall proceed *476“ ¿re verso ordine ” or erroneously, there the officer or minister of the,court, which shall execute the precept or process of the court, is excucusable so as no action will be against him; but when the court hath no jurisdiction of the cause, then all the proceeding is “ coram non judice,” and therefore an action will lie against the officer without any regard had of the precept or process of the court.
The distinction taken between the erroneous judgment of a court having jurisdiction and the want of jurisdiction, is thus illustrated by Dalton: “If the justices, of the peace arraign a person of treason in the session who is convicted and executed ; this is felony as well in the justices as in the sheriff or officer who executed the sentence, but if he had been indicted of a trespass, found guilty and hanged, though this had been felony in the justices, yet it would not be so in the sheriff, because, a matter in which they, the justices, had jurisdiction, and in which they only were to blame in exceeding their authority.”
The circuit judge here having authority to issue the writ of habeas corpus, (and this point the. attorney for the State in his brief admits, but contends that all the subsequent acts of the judge are not only against but are beyond his jurisdiction, and are utterly void,) his act afterwards in discharging the prisoner John Jackson, although it may have been erroneous and contrary to law, yet it could not be said to be an act “ coram non judice.” There is. a broad and obvious distinction between the illegal judgment of a court having jurisdiction and the act of a court without jurisdiction—and the authority from Dalton I consider sufficiently discriminating.
The defendant Martin must be considered as justified in obeying the order of the circuit judge; and. from the answer of the said Martin to the rule of the criminal court against him, it appears that he only acted in obedience to the order of the circuit judge, without any intent or design to disobey the order of the criminal court.
I feel bound to state, that in my opinion, the defendant Martin purges, all contempt, aud that he should have been discharged without fine. In the matter of the fine then my opinion is, the criminal court erred, and such being the opinion of my brother judges, its judgment is reversed'..