delivered the opinion of the court.
This case presents the question, which arises under the Code of Practice, whether a defendant who suffers a judgment to go against him by default, in an action by ordinary proceedings, gan, by a subsequent action, set up and rely upon equitable matters, which would have constituted an available defense in the first action.
The Code merely permits, but does not require, an equitable defense to be made to an action upon a legal demand. It is a privilege allowed the defendant, which he may avail himself of or not, at his own option. He “may set forth in his answer as many grounds of defense, counter-claim, and set-oif, whether legal or equitable, as he shall have” — Sec. 151. There is nothing, however, contained in the Code which precludes him, if he fails to avail himself of this privilege, and permits a judgment to go against him, from bringing an equitable action to obtain relief against the judgment. On the contrary its provisions in relation to injunctions to stay proceedings upon judgments for money, tend strongly to fortify the conclu*158sion that a defendant may, in an act ion by ordinary proceedings, permit a judgment to go against him by default, and afterwards resort to an equitable action for the purpose of obtaining relief against it.
S. When the chancellor has jurisdiction, and the case is before the court, it will retain that jurisdiction notwithstanding theexorcise of similar jurisdiction by courts of law, either by its own assumption or legislativeenactments. 3. The plaintiff in equity sought to set-off a note, assigned to him by his debtor upon the plaintiff, having a judgment agamst him, which note was assigned before judgment, on the ground of tho insolvency, and non-residenco of tho plaintiff — tho judgment being assigned to a third person. Held, that plaintiff’s equity was elder and superior to that of the assignee of the judgment, tho' the note was assigned upon condition that ihe assignee should be able to procure the set-oif.*158The inability of a defendant to avail himself in a court of law, of matters which the chancellor regarded as a sufficient equitable defense to the demand asserted against him, constitute the foundation upon which a considerable part of the jurisdiction of a court of equity has been erected. But the rule is well established, that when a court of equity has thus acquired jurisdiction it still retains it, notwithstanding the subsequent exercise of jurisdiction in similar cases, by a legal tribunal, either by its own assumption of power, or by the authority of legislative enactments.
The fact then, that the Code authorizes equitable defenses to be made in actions upon legal demands, does not, of itself, deprive a party of the right to waive this privilege, and resort to an equitable action for relief; and as the exercise of this right is not expressly or by implication prohibited by any thing contained in the Code, but on the contrary is sustained by some of its provisions, the conclusion seems to be inevitable that the right still exists.
The plaintiff in this action seeks to set-off against the judgment, a note assigned to him by Elliott, before the judgment was recovered, upon the ground that the plaintiff in the first action, who is the obligor in the assigned note, is insolvent and a non-resident. The judgment was assigned, and the contest in this case is between the assignee of the note, and the assignee of the judgment. As the note was assigned before the judgment, and the plaintiff in the judgment was insolvent and a non-resident when it was x-endered, the equity of the assignee of the note is superior to that of the assignee of the judgment, unless his equity is effected by the fact that the contract between him and his assignor is conditional, and that he is nor to pay for tho note unless ho can use it in. this case as a set-off.
*159This fact is not established by testimony, but the defendant propounded interrogatories on the subject to the plaintiff, which he refused fully to answer, from which the inference may be deduced, that such was the fact. The assignee of the judgment was, as he admits in answer to interrogatories, the creditor of the plaintiff in the judgment, and as such took the assignment in payment of his debt.
Conceding then that Elliott assigned the note to the plaintiff in the present action, for the purpose of securing the payment of his debt out of the judgment at law, and this action is carried on substantially for his benefit, does that constitute a good reason why no relief should be granted? His claim is as meritorious as that of the assignee of the judgment. They were both creditors, anxious to secure the demands which they had against an ' insolvent debtor. One of them assigned his demand to the defendant in the action before any judgment was recovered; the other obtained an assignment of the judgment as soon as it was rendered. The first one referred to acquired, through his assignee, the prior equity to the fund in contest, and the object of this suit is to render that equity available. It seems to us, therefore, that even in this state of case, the plaintiff in this action would be entitled to a judgment.
But the tenor of the interrogatories alluded to, and the partial answers thereto by the plaintiff', would rather authorize the inference that he had paid Elliott in part for the note, and was to pay him something more in the event that he succeeded in his effort to use it as a set-off against the judgment. If this be the fact, it does not affect his right as assignee to the benefit of the note. The contract between him and his assignor, unless it be one that is against the policy of the law, cannot be relied upon to deieat his claim to relief. By the assignment he is invested with the title to the note, whether it was assigned without any consideration, or upon one that is conditional in its terms, is wholly immaterial, and. does not affect his *160right to make that use of it which the law authorizes the owners to make of such demands as belong to them.
Fry & Fields for appellant; Speed & Worthington for appellees.Wherefore, the decree is reversed, and cause remanded, with directions to allow the set-off relied upon by the plaintiff.