delivered the opinion of the Court.
The agreement stated in the defendant’s plea in bar having been proved, upon a trial of the issue tendered thereon by the plaintiff, and joined by the defendant, it is now contended, that the matter set forth in the plea does not constitute a legal defence to the action, and that judgment ought to be rendered for the plaintiff, notwithstanding the verdict. And the plaintiff is right in this course (although it would have been more convenient to have demurred to the plea), provided the defendant has not shown a legal defence to the action.
The plaintiff contends that this agreement did not constitute a mutual credit between the bankrupt and the defendant; because it was made at a time subsequent to the original contract; and because no debt actually existed from the bankrupt to the defendant at the time of the bankruptcy and assignment ; but that the demand of the defendant depended upon the contingency of his being compelled to pay or actually paying the sum due on the bond, in which he was surety for the bankrupt.
But we consider that, at the time of the assignment of the bankrupt’s effects to the plaintiff, the defendant had * a good and legal defence against an action upon the [ * 484 ] note, by the agreement ; and that this defence could not be taken away by the assignment ; no better right passing to the assignee, than the bankrupt himself had in the note. When the agreement was made, the note was due ; the promissee might have coerced payment of the whole. He, however, applied to the promissor to become surety for him in a bond payable at a future day, and agreed that such balance should be left due upon the note as would indemnify the defendant against that bond. The giving of the bond by the promissor was a sufficient consideration for this agreement; and the promissee could not have recovered the whole amount of his note, in violation of this agreement.
*422Nor is the agreement inconsistent with the written contract, it being made subsequently, and after the contract was broken by nonpayment ; so that it may be considered as a mode of payment agreed upon by the parties. It may be considered as a new debt, contracted at the time of the agreement for the balance due up: n the note, with a stipulation that payment should not be exacted ; but that.a sufficient sum should remain unpaid in the hands of the debtor, to indemnify him against a liability he then assumed for his creditor ; and we think that the creditor could not coerce payment of his demand in violation of his agreement. It is not like the case of Dow vs. Tuttle,(1) cited at the bar ; for there the promise in writing was to pay on demand, and the agreement offered to be proved was, that a year’s credit was to be given, which was directly contradictory to the note. Nor is it like the case of Holland vs. Makepeace,(2) also cited in the argu-, ment; for there the demand prayed to be set off was a note or notes purchased by the promissor, without any privity of the promissee, so that a mutual credit could not exist. Besides which, the purchase was made after the failure of the promissee, with a view to speculate upon his own debt, to the prejudice of other creditors. This note may be considered invalid in the sense of the term as used by the Court in that case, as a payment of part would show that it was , invalid for that part.
[*485] *Nor is it important in this case, that it was uncertain whether the defendant would be obliged to pay the bond in which he was surety ; for, although a contingent debt cannot be set off under a commission of bankruptcy, yet the agreement of the party bankrupt, that his claim shall not be enforced against his debtor while the debt remains contingent, may be a good defence at law in an action by the assignee, as was settled in the case of Dobson & al. vs. Lockhart,(3) cited by the defendant’s counsel.
It has been said, however, by the plaintiff, that, as the note was in possession of the bankrupt when the commissioners made the assignment, it passed to the assignee free from any right in the promissor to avoid it on the ground taken by him, according to the provision of the twenty-seventh section of the United States statute of bankruptcy. But that provision contemplates goods and merchandise which might be deposited with the bankrupt under certain circumstances ; and the object of the provision was, to defeat secret and fraudulent contrivances between the bankrupt and those who might claim property ostensibly his, on pretence that it was deposited with him as a trustee or factor. It certainly will not do to extend this provision to notes of hand, or other securities for the payment of money. For, if it was so extended, even evidence of payments made, but not indorsed, *423could not be received to diminish the amount apparently due, which would be altogether unjust.
Upon this reasoning, we are satisfied that the defence shown in the plea is sufficient; and judgment must be entered on the verdict.†
4 Mass. Rep. 414.
8 Mass. Rep. 418.
. 5 D. & E. 133.
Sargent vs. Southgate, 5 Pick, 312. — Peabody vs. Peters, 5 Pick. 1. — Stockbridge vs. Dawson, 5 Pick. 223. — Maynard vs. Fisher, 6 Pick. 355.