The opinion of the court was delivered by
Carpenter, J.The principal reason assigned in this case, as a ground to set aside and vacate the discharge, is, that the debtor at the time when he filed his petition, was not in a position to apply. His petition recites, that, having been arrested by virtue of a writ of capias ad respondendum, &c., he had afterwards at a *392certain time mentioned duly surrendered himself into the custody of the sheriff. The.act, by which this application was supposed to have been authorized, extends, the right to petition for the benefit of the insolvent laws, to the case, “ where the defendant shall have been surrendered in discharge of his bail.” Act 15th March 1837. Elmer’s Dig. 258. The time and mode of making a surrender in discharge of his bail by a defendant who has been arrested by virtue of a ca. ad resp. are prescribed by the Practice Act, which in this particular follows the English practice. It must be subsequent to the return of the writ, and either before or after judgment, provided, such render be made at or before the appearance day of the first scire facias against the bail returned scire feci, or of the second scire facias returned nihil, and not after; but in either case the special bail shall pay the costs of the said scire facias, and judgment for the same shall be entered against them accordingly. It is a matter which involves the exercise of judicial discretion, and can therefore only be done before the court or a judge, and the court or judge must then make an entry or minute of such render and commitment; and thereupon the defendant shall be committed to the custody of the sheriff, or jailer attending the said court or judge. Not only so, but on such render and commitment being duly certified to the clerk of the-court, if in vacation, or not done in open court, it is the duty of the clerk to enter an exoneretur on the bail piece and thereupon the bail shall be discharged ; and further the bail shall give immediate notice of such render to the plaintiff or his attorney. Elm. Dig. 427. pl. 61. 63. 64. 1 Archb. Pr. 312, et seq. 1 Sellon, 165. 167. Even if a defendant is in custody for other cause, a habeas corpus is necessary to bring him up, for the purpose of being surrendered; and under any circumstances, the judicial action of the court or of a judge is necessary before he can lawfully be retained in custody by the sheriff, and his bail be discharged. In order to authorize the application, a proper surrender of the defendant was necessary, although doubtless a voluntary surrender would have been legal and proper. In this case, the act alleged to have constituted a surrender, was not only of the mere volition of the defendant, but no action was had by the court or a judge, no entry made in the minutes of the court, and *393no committitur to the custody of the sheriff. In fact the sheriff not only did not receive him into h'is custody, but he had no authority to do so; and if, which was not the case, the defendant had actually submitted to a voluntary imprisonment within the walls of the prison, the sheriff must have discharged him whenever he chose to demand liberty of egress. The pretended surrender in discharge of his bail, was a mere nullity, and could neither relieve the bail, nor entitle the defendant, under the act of 1837, to file his petition for the benefit of the insolvent laws. The subsequent proceedings after the filing of the petition, if valid and sufficient for other purposes, can by no means, by relation, lay a ground to sustain the petition in this case. It was necessary tc have been surrendered in discharge of his bail at the time of the delivery of the bond to the sheriff, to entitle the defendant to apply for the benefit of the insolvent laws. The case of Woodruff v. Barrett, 3 Green’s Rep. 40, stands upon different principles. In that case this court simply decided, that a person, who had given bond to the plaintiff, at whose suit he had been arrested, conditioned that he would duly apply for the benefit of the insolvent laws, and if refused a discharge immediately thereafter surrender himself to the sheriff, &c., and who was afterwards refused his discharge and had immediately thereupon surrendered himself in compliance with the condition of his bond, without any action of the court, was legally in the custody of the sheriff on the original execution, and that the sheriff having discharged him was liable for an escape. This decision was doubtless rightly made on the words of the statute, and to give effect to the condition of the insolvent bond, but has no relation to, or bearing on the point under consideration.
I am of opinion therefore that this discharge should be set aside, vacated and for nothing holden.
Discharge set aside.
Cited in Race v. Dehart, 4 Zab. 41; Van-waggoner v. Coe, 1 Dutch. 201; Steelmam, v. Mattix, 9 Vr. 251.