DARGAN, C. J.
The defendants in error brought suit against Ewing to recover for services rendered as attornies. At the September term 1842 of the Circuit Court, judgment by default was rendered in their favor, but the inquiry of damages was not had until the next succeeding March term. In December preceding the execution of the writ of inquiry, Ewing obtained a final certificate as a bankrupt, but did not appear or controvert his liability at the time the writ of inquiry was executed and the final judgment rendered. An execution afterwards issued on this judgment and was returned by the sheriff no property. An alias being issued, Ewing moved to set it aside, but his motion was overruled, and to review the judgment of the court overruling the motion this writ of error is prosecuted.
A final certificate of discharge duly obtained by a bankrupt is a complete and perfect defence to all suits founded on debts owing by the bankrupt at the time of filing his petition for the benefit of the bankrupt act, except such debts as are exempted from the operation of the act. If no judgment has been rendered at the time he obtains his certificate, he may plead it in bar of a recovery; or if judgment be then rendered and execution is afterwards issued, he may move to set it aside. — Cogburn et al. v. Spence et al. 15 Ala. 549; Maybry et al. v. Herndon, 8 ib. 848. But the right of the bankrupt to protect himself from the payment of all debts from which be is discharged is perfect and unqualified, and he is therefore entitled to a day in court to make his defence without regard to the condition of the suit that may be pending against him at the time he obtains his certificate. If, however, mo judgment has been obtained against him and he has had an opportunity to plead his certificate in bar and fails to do so, he is then bound by the judgment and his certificate cannot protect him from its payment. So, too, if one has a release against a demand or other good defence and fails to make it when sued, he will be precluded from afterwards insisting upon it. The inquiry therefore is whether Ewing had the right to plead his certificate in bar before the inquiry of damages was had? If he had not, he may supersede the execution. After a judgment by default has been rendered, although it may be necessary to execute a writ of inquiry to ascertain the damages, the defendant has not the legal right to *342plead to the merits of the action. It is true he may move the court on affidavit of merits to set aside the default and allow him to plead to the merits, and the court may grant his motion on terms, which usually are the payment of costs, that he will plead issuably, and go to trial without delay. — Tidd’s Practice, vol. 1, 568. But whether the court will set aside the default and allow the plea is a matter within the discretion and control of the court. — 4 Taunton, 885; Tidd’s Practice, vol. 1, 569. If the court should refuse to set aside the default and allow the plea, such refusal could not be reviewed on a. writ of error. Guided by these rules, we think the court erred in refusing the motion; for it is certain that he could not plead his certificate in bar at the time of the execution of the writ of inquiry without setting aside the default, and whether the court would allow this was a matter of discretion ; and to hold that he must submit to the discretion of the court whether he should be allowed to interpose his certificate to protect him from the payment of a debt barred by it, would be in our judgment to subject an absolute and legal right to the control and discretion of the court. But the defendants in error contend that there is a distinction to be taken between a defence acquired after a judgment by default and a defence that existed anterior to it; that though it is a matter of discretion whether the court will set aside the judgment and allow the defendant to plead the latter, yet the defendant has the legal right to plead the former. We have examined the authorities to which we have been refered with some care, but we cannot find that such a distinction has ever been recognised. Indeed it must be apparent from the very condition of the suit, that whether the defence was acquired before or after the default, the defendant cannot plead it without an application to the court to set the judgment aside, and this application to set aside the judgment and allow the plea is addressed to the discretion of the court, whether the defence existed before or was acquired subsequent to the rendition of the judgment. We are therefore of the opinion that the defendant did not have the legal right to plead his certificate in bar, and consequently must have the right to set the execution aside. In the case of Palmer v. Hutchins, 1 Cow. 42, the cause was at issue on the 3d day of October, when the defendant gave a relicta and cognovit: On the 8th day of the same month he *343obtained a certificate of discharge as an insolvent debtor: At the next subsequent term judgment was entered for the plaintiff as of the October term preceding, and the defendant being arrested on a ca. sa. issued on the judgment, moved his discharge. The court said that where the defendant has had an opportunity to plead his discharge and failed to do it, he cannot be relieved on motion, but granted the motion on the ground that he could not have pleaded his discharge after giving the relicta and cognovit. So in the case of Baker v. Taylor, 1 Cow. 165, a verdict was rendered in 1819, but the judgment was not entered until 1S23. Intermediate the verdict and judgment the defendant obtained his discharge. A Ji. fa. being issued on the judgment the defendant moved to set it aside. The court said the discharge was too late to admit of its being pleaded and granted the motion. These authorities we think sustain the view vve have taken, for although the cognovit was given in the one instance and a verdict rendered in the other, yet no final judgment had been rendered. Until this is done the record of the cause is in fieri and under the control of the court. The court had the right to set aside the verdict and to allow the defendant to plead bis certificate, but a motion for that purpose is addressed to the discretion of the court and is not a matter of legal right. We can see no difference in principle between the case cited and the case at bar. The court could have set aside the default and allowed the plea, but it was a matter of discretion whether the court would do it or not. The court could have imposed terms in setting aside the default, and if the motion had been refused it would not have been an error that could have been reviewed by this court. The right, however, of the defendant to insist on his discharge in bar of the collection of the debt is absolute and unqualified, and he is not bound to submit either to the discretion of the court, whether he will plead it or not, nor to terms as' a condition on which he shall be allowed to plead it. But if the condition of the suit be such when he obtains his certificate that he has not the legal .right to plead it in bar, he may move to set the execution aside.
The judgment must be reversed and the cause remanded.