delivered the opinion of the court. The defendant in the original action was hound to plead his discharge, if he wished to avail himself of his exemption from imprisonment for the same cause, secured to him by the statute. If he had been convicted of perjury in procuring his discharge, he was, notwithstanding his discharge, liable to be again imprisoned, either on the old judgment, or under a new judgment recovered upon the old one, in an action of debt; and if the discharge had been pleaded, the plaintiff might have replied to it such conviction, which would have been conclusive to bar him of his exemption. The privilege from imprisonment to which' Brown was entitled under the statute, certainly might be waived, and the omission to plead the discharge in proper time was a waiver.
The judgment was regular, both in form and substance, and authorized the execution that was issued upon it, and which would have been a complete justification to the sheriff, in case he had been sued for false- imprisonment. There is no pretence for saying that either the judgment or execution was void, and admitting they were voidable, that is a point which the sheriff is not permitted to raise, and with which he has no concern. The sheriff is never allowed to allege error either in the judgment or process, as an excuse for an escape; and if he arrests the party, he is bound to keep him until he is discharged by due course of law. To these points, the cases cited by the counsel for the plaintiff are full and decisive, particularly the two cases of Reynolds *156v. Corp and Douglas, (3 Caines, 267.) and Prigg v. Adams and others. (2 Salk. 674.) Brown must, therefore, be considered as being in execution by legal process.
The next question is, whether the commissioner had a right to discharge him, and if he had no such right, yet, having actually discharged him, whether such discharge is a defence against this suit. It may well be doubted whether the statute gives to a judge or the chancellor, in vacation, a right to discharge a party imprisoned on civil process. If it were necessary to decide that question in this case, and for the first time, I should say it does not. (Ex parte Wilson, 6 Cranch, 52.) But admitting it to be settled, that the statute extends to cases of illegal imprisonment under civil, as well as criminal process, yet the power of the officers to whom the execution of it is committed, is special and circumscribed, and they are prohibited from granting a discharge whenever the party is “ in execution by legal process.” If these officers exceed their powers, or, in other words, if they discharge when they have no jurisdiction, their acts are void. If Brown was in execution by legal process, (and of which thére cannot be the least doubt,) it necessarily follows, that the commissioner had no authority to discharge him. It was upon this ground that this court decided that the discharge of Mr. Yates, under the habeas corpus act, was void. Much as I respect the commissioner who granted this discharge, it was, beyond all doubt, an interference wholly unauthorized. He had no power to declare either the execution or judgment void. He had no discretion in this case ; for, according to the clear and unequivocal words of the statute, the moment he discovered that the prisoner was in custody on a ca. sa. perfectly valid and regular, upon the face of it, his power to discharge him ceased, to all intents and purposes. The statute is peremptory, and he had nothing to do but to remand him. If this court, on motion, would not have set aside the judgment and. ca, sa. for any other purpose than to give the prisoner an opportunity to plead his discharge, how much more unauthorized was it for the commissioner to discharge him from custody, while both were in full force. The necessary consequence of these principles is, that the discharge *157is no excuse for, or protection to, the sheriff. If the discharge is void, it is as if it never had existed. This is a universal rule in regard to all things that are void. “Void things are as no things.” (22 Vin. 13. pl. 17.) Every trihunal proceeding under special and limited powers decides at its peril; and hence it is that process issuing from a court not having jurisdiction, is no protection to the court, to the attorney, or the party, nor even to a ministerial officer, who innocently executes it. This is a stem and sacred principle of the common law, which requires to be steadily guarded and maintained. The sheriff, on this execution, would have had a right to retake Brown, if he had departed from his custody without his permission, or a new execution might hayc issued against him. On this point the case of Jackson v. Smith, (5 Johns. Rep. 112.) is express. If the commissioner had no jurisdiction in this case, his discharge had no more effect than if he had not been a commissioner at all. In the case of Mr. Yates, it never was doubted by any of the judges, either in this court, or in the court of errors, that if the judge who discharged him had no jurisdiction, that the discharge would have been void. The question there was, whether he had jurisdiction or not. Those who held that he had none, considered the discharge as a nullity, and that the party might be recommitted. Those who held that he had jurisdiction, of course, considered the discharge conclusive, and that it was equally so whether the judge, in the exercise of his discretion, had decided right or wrong, so long as he acted within the scope of his powers. The opinion of the court, accordingly, is, that the plaintiff is entitled to judgment.