By the Court,
Whiton, C. J.The return of the plaintiff in error to the writ of habeas corpus sets.out as the cause of the detention of the relator a writ or commitment issuing froni the Circuit Court of Milwaukee county, of which the following is a copy:
“State op Wisconsin, | 7 > ss. Circuit Court, for the County of Milwaukee. 1
“The state of Wisconsin to the sheriff of the county of Milwaukee, greeting.
“ Whereas, on the tenth day of October, of October term, in the year one thousand eight hundred and fifty-three, the Walworth county Circuit Court in equity, made a final decree in a certain cause' depending in said court, wheréin Sophia Q-unn, by her next friend, John W. Cary, is complainant, and Gaylord Blair is defendant,.which is in substance1 as follows, to wit:
“ This cause haying been brought on for a hearing upon the pleadings and proofs therein, at a regular term of this court, held at the court-house. in the village of Elkhorn, before his honor Wyman Spooner, circuit judge, presiding, on the tenth day of October, A. D. 1853, the said plaintiff by John W. Cary, her next friend and counsel appearing, and no one appearing for the said defendant.
And'it appearing to this court that the defendant was duly appointed the executor of the last will and testament of one Joel Blair, and that he duly accepted and 'entered upon the trust as such executor, and it also appearing that the said plaintiff was one of the heirs at law and legatees under the will of the said Joel Blair, and that the said defendant as such executor received of the proceeds of the estate of the said Joel Blair, the sum of three thousand one hundred and seventy-two dollars and fifty-five cents, which said sum belonged to the said plaintiff, and by the terms and provisions of the said will, the said Gaylord Blair was required to invest the same in permanent securities for her, the said plaintiff (she being a married woman), and whereas, it also appears that the said Gaylord Blair neglects and refuses to pay over or account for the interest on said sum of thre.e thousand one hundred and seventy-two dollars and fifty-five *528cents, to the said complainant, and also neglects and refuses to invest said sum of three thousand one hundred and seventy-two dollars and fifty-five cents, in permanent securities, as required by.the terms of said will. And it further , appearing to this court, that by a decree made by the Supreme Court of New York, on the fifth day of November, A. D. 1851, and entered in the clerk’s office of Monroe county, after'.a litigation in which both parties appeared by counsel, that it was ordered, adj udged and decreed that the said defendant, Gaylord Blair, as such executor, on the first day of September, A. D. 1851, had in his hands of the proceeds of the estate of the said Joel Blair, deceased, the sum of five thousand and thirty-nine dollars and twenty cents, which was held by the said defendant, Gaylord Blair, for the use of the complainant Sophia Gunn, according to the provisions of the will of the said Joel Blair, deceased, as set forth in the proceedings and pleadings in said cause, and that the said complainant was entitled to have the sum of three thousand one hundred and seventy-two dollars and fifty-five cents thereof, invested in permanent securities upon interest, payable annually, and that she was entitled to receive the annual income thereof during her life, according to the terms of said will, and that she was entitled to receive1 the residue .of said sum, being at that time one thousand eight hundred and sixty-six dollars and sixty-five cents, with the interest which might accrue thereon, and upon the said sum of three thousand one hundred and seventy-two dollars and fifty-five cents, until the same should be invested as aforesaid, to her own use, together with the costs of said suit to be taxed, which said costs were on the 24th day of October, 1851, taxed at three hundred and twenty dollars and eighty - three cents. And it further appearing that said decree now stands in full force unreversed and unsatisfied; therefore, on motion of John W. Cary, next friend and of counsel for the said complainant, it is ordered, adjudged and decreed that the said defendant, Gaylord Blair, within ten days from the filing of this decree, pay to the clerk of the Circuit Court of Walworth county, the sum of three thousand one hundred and seventy-two dollars and fifty-five cents, to be invested under the direction of this court, in permanent securities bearing interest, and that the income thereof be paid annually to the complainant, Sophia *529Gunn, during ber life, and that the said Gaylord'Blair within the same time, pay to the said Sophia Gann, the sum of three thousand and two dollars and sixteen cents, with interest on the sum of six thousand one hundred and seventy-five dollars and seventy-one cents, from the date of this decree to the time of-such payment, together with her costs in this suit to be taxed. And in case the said Gaylord Blair shall make default in such payment within the time aforesaid, then it is further ordered, adjudged and decreed, that the complainant have execution against the said Gaylord Blair, for the collection of the said sum of six thousand one hundred and seventy-five dollars and seventy-one cents, and interest from the datetof this decree, together with the complainant’s costs to be taxed, to be, when collected in part invested, and the residue paid as above directed.
“ By the Court, WymaN Spooneb, Judge, Sc.
“ And whereas, said Gaylord Blair was personally served with a copy of said decree on the 29th day of November, A. D. 1853, and personal demand made of the said Gaylord Blair, by, or on behalf of the said Sophia Gunn; that he pay over the several sums of money mentioned and ordered to be paid over in and by said decree, according to the terms thereof; and also that he pay the amount of costs as taxed in said suit; and whereas, the said Gaylord Blair hath hitherto neglected and refused and still neglects and refuses to pay the same or any part thereof; and whereas, said cause has been’ duly transferred by an order of said Walworth county Circuit Court, on account of the disability of the judge of the first judicial circuit, under a provision of the statute in such case made and provided, from said Walworth county Circuit Court to Milwaukee county Circuit Court, where the same is now pending.
“ Now, therefore, we command you to take the body of the said Gaylord Blair if he shall be found in this state, and commit him to the common jail of said county of Milwaukee, and keep and detain him there under your custody until he shall pay the said sum of money mentioned and specified in said decree to be paid, and fully perform said decree, -together with your fees on this writ. And you are to make and return to the Mil waukee county Circuit Court in equity on the third Monday of September next, a certificate under your hand, of the manner in *530wbicb you shall have executed this writ, and have you then and there this writ.
“ Witness, Hon. Levi Hubbell, judge of the second judicial circuit of said state, at Milwaukee, the seventh day of August, A. D. 1854. “ Matthew Keenan, Gler7c.”
It appears further by the return to the writ of habeas corpus, that the writ above set forth was issued by the special order of the court not bailable.
At the hearing before the justice of this court who issued the writ of habeas corpus, Sophia Grunn, by her solicitor, presented a petition in which she set forth in substance, that she was the party in interest in the decree mentioned in the return to the writ of habeas corpus ; that the writ of attachment was granted by the Milwaukee Circuit Court in equity on her application after notice to the relator, who appeared by counsel and resisted the application; that the relator afterwards filed a petition in the said court setting forth that he was imprisoned by virtue of the writ of attachment mentioned in the return to the writ of habeas corpus; that said imprisonment was for a debt arising on contract, and was in contravention of the provisions of the constitution of this state, and praying to be discharged therefrom. That the said petition came on to be heard before said court in equity, was argued by counsel and denied by the court.
This petition was verified by the oath of the solicitor and by a certified copy of the minutes of the Cii cuit Court for Milwaukee county ; and upon the petition the petitioner moved that the writ of habeas corpus be quashed, which motion was denied by the justice. The matter of the petition of the relator for the writ of habeas corpus and to be discharged from imprisonment, was then heard, and the justice made an order for his discharge. To reverse that order the writ of certiorari in this case has been sued out. Before proceeding to consider the questions presented by the return of the writ of habeas corpus, it may be well to notice the matters relied upon before the justice of this court who discharged the relator, as reasons for quashing the writ. Those matters are: 1st. That a writ of habeas corpus can be granted only by the courts, and not by an officer, in this state. 2d. That a writ of habeas corpus can issue only from some court of record in this state, the application for which must first be properly al*531lowed, and that the writ cannot be in the form adopted in this cause, nor can it issue under the sign manual of the officer. Bd. That the proceedings showed that the relator was in custody by virtue of the final process and decree of a court of competent jurisdiction; and 4th. That the application for the discharge of the relator had been already decided by the Milwaukee Circuit Court in equity, and must be considered res adjudicate and the decision of that court could only be reversed by the Supreme Court on appeal.
It seems to be quite clear, that the first position taken cannot be sustained. The statute {Rev. Stat., chap. 124, §§ 8, 6), we think, clearly confers the power to issue the writ to the officers therein named.
The second reason assigned for quashing the writ merits more - consideration. The writ in this case was not merely granted or allowed by the justice of this court, who discharged the relator, but was issued by him under his sign manual. It is said by the counsel for the respondent, that no 'person can issue a writ; that the power to issue writs belongs exclusively to courts. It is further claimed by him, that as our statute in regard to writs of habeas corpus is almost a literal transcript of the statute of New York upon the same subject, the practice of the courts of that state ought to be followed by us, and we are referred to various authorities to show that in that state writs of habeas corpus, though granted or allowed by officers, are always issued by the courts; the allowance of the writ by the officers being only the authority for the clerk of the proper court to issue it. See 2 Burr. Pr. 199. We have examined the provisions of the New York statute, and compared them with those of our own, and we find that although they are similar in their general provisions, in one important respect they are essentially different.
The statute of New York contains a provision to the effect that in all cases the writ shall issue from the court, while in ours no such provision is found.
Our statute {Rev. Stat., chap. 124, § 6) provides that any officer empowered to grant the writ “ shall grant such writ without delay,” and by the other provisions .contained in the chapter of the Revised Statutes above referred to, the person for whose relief the writ is issued is to be brought before the officer who *532grants the writ. We think that these provisions authorize the officer to whom application for the writ is made to issue-it, as was done in the present instance. ' We are the more confident' that this is the correct interpretation of the statute on account of the uniform practice of the judicial officers who have been called •upon to act under it since it went into effect in 1839. Our pres» ■ent Revised Statutes are, in .this respect, a transcript of the statute of the territory, and the practice of the territorial judges, as well. as that of the state officers, has been the same as that adopted in this case. We see no reason for changing it..
The third cause for quashing the writ would have been sufficient if it had been true in point of fact. For it is a well-settled principle, that a writ of habeas corpus does not perform the office of a writ of error, and that however erroneous the judgment or order’of the court or officer may be, by virtue of which the relator is imprisoned, he cannot be discharged while the judgment or order is in full force, if the court or officer had authority to make it. See the case of the People vs. Cassels, 5 Hill R. 164, and the cases there cited. But it is evident that if the court or magistrate acted without authority, the judgment or order would have no force or effect, and the imprisonment would be illegal, From such imprisonment a writ of habeas corpus will discharge the relator.
We do not propose to discuss the questions arising upon this part of the motion at present, as they will be considered when we come to discuss the matters presented by the return.
The fourth cause for quashing the writ we think not sufficient for that purpose, because if the imprisonment of the relator was without authority and illegal, a writ of habeas corpus is the proper process to release him. If a court or officer illegally imprisons a person, arid afterward, upon an application for his release, refuses the application, the matters involved can no more be said to be res adjudicata than if no application for his release had been made. In either case the person is in prison by the order of the court or officer, and any number of adjudications by such court or officer affirming the legality of the imprisonment, cannot change its character, nor affect the rights of the relator.
We come now to consider thp questions presented by the return to the writ.
*533It will be apparent from what we have said in relation to the third reason given for quashing the writ in the motion which we have considered, that the case turns upon the fact whether the court had authority to make the order for the imprisonment of the relator in the case which was pending before it. If it had, then the remedy of the relator, for any injustice which was done him by the order, could be obtained only by appeal.
The writ of attachment, by virtue of which the relator was imprisoned, sets out a decree made in'the Circuit Court for the county of Walworth, which decree recites in substance that the defendant was the executor of the last will and testament of Joel Blair, and as such received the sum of $3,172.55, which belonged to the plaintiff as one of the legatees under the will of said Joel Blair; that the relator’s duty under the will required him to invest the money in permanent securities for the plaintiff; that the relator refused to invest the money, or to account for it in any way to the plaintiff. And further, that by a decree made in the Supreme Court of the state of New York, “ after a litigation in which both parties appeared by counsel,”-it was adjudged that the relator had, on the 1st day of September, A. D. 1851, in his hands, of the proceeds of the estate of said Joel Blair, the sum of five thousand and thirty-nine dollars and jtwenty cents, which was held by him for the use of the complainant under the provisions of the will of said Joel Blair, and that the complainant was entitled to have the sum of three thousand one hundred and seventy-two dollars and fifty-five cents thereof invested in permanent securities upon interest, and was Entitled to receive the' annual income thereof during her life, according to said will, and that she was "entitled to receive the residue of said sum, being at that time one thousand eight hundred and sixty-six dollars and sixty-five cents, with interest, &c., together with her costs. And further, that.it appeared that said decree was in full force, and not reversed; it was therefore ordered and decreed, that the relator should pay to the clerk of the court within ten days the sum of $3,172.55 to be invested, and .within the same time pay to the complainant the sum of $3,002.16, and interest on the sum ■of $6,174.71 from the date of the decree, together with costs. And further, that in case the relator should make default in such payment within said time, then that the complainant should have ■ *534execution against him for the sum $6,174.71, and interest and costs, to be invested in part, and residue paid as above provided. The writ of attachment further sets out, that the relator was personally served with a copy of said decree, and a demand made upon him on behalf of the complainant to pay over said money according to the terms' of said decree; that he neglects and refuses so to do; that the case had been duly transferred to the Circuit Court for Milwaukee county according to the statute, where it was then pending.
The writ then" commands the sheriff to take the body of the relator, and .commit him to the common jail of the county of Milwaukee, and keep and detain him there in custody, until he should pay the money mentioned in the decree, and fully perform the decree.
The simple question is, whether the court had any authority to make an order for this writ.
We have no doubt that it was wholly without such authority. The.suit which was pending before it gave it no power to imprison the relator under the constitution and laws of this state. 1 Const. Wis., art. 1, § 5, 161.
The clause of the constitution above referred to, in terms expressly prohibits imprisonment for debt arising out of, or founded on a contract.
This provision must have the effect to render void any order or judgment of any court or officer in this state, which directs the imprisonment of a person in any case where the debt for, or on account of which he is imprisoned, arises out of, or is founds ed on a contract, and the decree against the relator in this case was of this description. The decree which was made in the Circuit Court for Walworth county, decides that a part of the money which the relator was decreed to pay to, and for the benefit of the complainant, came to his hands as the executor of the last will and testament of Joel Blair, and was to be invested for the benefit of the complainant; and the remainder came to his hands also as executor of said will, and was held by the relator for the use of the complainant, according to tte decree of the Supreme Court of the state of New York. But how or whenthe remainder came to his hands does not appear except by said decree of the New York court.
*535It appears that tbe relator was a trustee in respect of this money, having received it as tbe executor of the will. It was bis duty to pay it to the complainant, and tbe decree was right in awarding an execution against him in ease it was not paid. But tbe facts recited in tbe decree did not authorize the imprisonment of tbe relator, because they showed only that he owed money to the complainant which came to his hands as trustee. The debt arose out of, and was founded on a contract.
It was endeavored to be shown- at the argument, that the imprisonment of the relator was for a contempt in refusing to pay the money as he was required to do by the decree of the Circuit Court for Walworth county.
But the proceedings had in the Circuit Court for Milwaukee county, which issued the process by virtue of which he was imprisoned, show nothing of the kind. They do not show that he was convicted of a contempt, or that any proceedings were had in that court, with a view to such conviction. The writ by virtue of which he was committed, sets up nothing but the decree in Walworth county, and the fact that he refused to pay the money when it was demanded of him. This shows that no proceedings were had to convict him of a contempt, and that it was only because he owed money which he had received as trustee and did not pay, that he was imprisoned. If the court had determined that he had the money then in his hands, and consequently had the ability to pay it, as well as the fact that he did not pay it, we might be called upon to decide whether under the constitution of this state, the refusal to pay the money, would constitute a contempt for which he might be imprisoned. But as the case stands, he may have lent the monéy innocently, or he may have spent - it or converted it to his own use fraudulently; or he may now have it in his possession. Before he can be imprisoned, he must be convicted of a contempt, and as this has not been done or even attempted, we must hold that the imprisonment was unlawful.
It was insisted on the part of the relator, at the argument, that the decree in the Supreme Court of New York changed the relations of the parties, and that the decree of that court could only be enforced in our courts like an ordinary decree for the payment of money, and further, that we could not look be*536hind it to determine whether the relator was a trustee or not.
Whether this is a correct view of the matter or not, we do not decide. We have, for the purposes of this discussion, considered him as a trustee, as this view of the subject is most favorable to the plaintiff in error.
The order of Justice Smith is affirmed..