On the trial of this case, which was an action of assumpsit by the defendant against the plaintiff in error, for money had and received, the plaintiff below introduced as evidence a deed of trust, executed by Robert Smith to Joseph J. Drake, the defendant, which recited that the said Robert Smith was indebted to the said Drake in the sum of three hundred and eighty-five dollars and eighty-three cents, by a promissory note, and also to Nathaniel T. Moore, the plaintiff, by a judgment, rendered by a justice of the peace in the State of Tennessee, for ninety-six dollars and thirty-eight cents, against Wm. P. Smith and Thomas Hill in favor of Joseph Mason, in the year 1537, which had been staid by the said Robert Smith, who thereby became liable for the same, upon which judgment, *598a suit had been commenced in the County Court of Perry, in the name of Mason, for the use of said Moore, against the said Robert Smith; and in consideration of said indebtedness the grantor conveyed certain property to Drake, authorising him to sell the same and from the money arising from the sale to pay and satisfy debts. The plaintiff also proved that the property had been sold and that the proceeds were sufficient to pay the debts in full, and that before this suit was brought the plaintiff had demanded payment of the defendant. The defendant then proved that he had been notified by Robert Smith, the grantor, not to pay this debt, and also introduced proof tending to show that the judgment had been paid in Tennessee, in the year 1838, by the principal debtor, and further, that the transcript on which the suit had been commenced in the County Court of Perry, was a forgery. There was no proof of any assignment or transfer of the judgment by Mason to the plaintiff, further than the suit that had been commenced in the County Court of Perry, in the name of Mason for the use of the plaintiff. It was also shown that this transcript of the judgment had been shown to the grantor before the deed of assignment was executed, and he had been induced to secure this debt, in consideration of indulgence given to him on another debt he owed to the plaintiff, Moore.
Upon this evidence the court charged the jury that neither fraud in obtaining the deed of trust, nor the payment of the judgment, would constitute a defence to the action at law. To this charge the defendant excepted and now assigns it as error.
It is not denied but that if one, acting under the belief that he is liable for a debt, makes provision for its payment by executing a deed of trust upon property, still he may show that the debt is not in fact due, and thus avoid, its payment. But it is argued that the trustee cannot make this defence at law, even with the assent or under the instructions of Smith, the grantor. To this argument we cannot assent. We admit that the trustee could not, in opposition to the wishes of the grantor, or without his consent, deny the existence of the debt, unless the payment of it would operate as a fraud upon the rights of other creditors secured by the deed; but under the instructions of the grantor not to pay it, the trustee may resist the payment, if the grantor himself could. In the case of Dunklin v. Wilkins, 5 Ala. 199, *599it appeared that the plaintiff claimed title to the slaves through Judge, who was the original owner of them. They had been kept in the possession of Dunklin as the agent of Judge, and during the time they were in Dunkin’s possession, Wilkins obtained from Judge a bill of sale for them, but under the instructions of Judge, Dunklin refused to deliver them on demand to Wilkins. Upon this refusal Wilkins brought an action of detinue, which was defended, on the ground that the bill of sale was obtained from Judge by fraud. The court held that the defendant could resist a recovery on the ground of the fraud, as he held the slaves as the agent of Judge, and defended the suit under his instructions, but admitted that he could not have availed himself of the fraud had he not defended under the instructions of the owner. This authority, we think, conclusive of the question before us; for although the defendant does not stand in the relation of an agent, yet he occupies the position of a trustee, not only in reference to the plaintiff, but also towards Robert Smith the grantor in the deed of trust, for the object of the deed was only to secure the debts, and the surplus, if any, was to returned to him. In all such deeds the trustee owes duties to the grantor, as well as to the creditors secured thereby, and he ought to protect the rights of the one, as well as of the other. Indeed, it is the duty of a trustee to protect the rights of all who are interested in the trust fund, and if the grantor has been induced to secure a debt, upon the supposition that he is bound for its payment, and it afterwards appears that the debt has been paid, we can see no reason why he may not defend against it at law through the trustee, for the defence, if successful, would enure to his benefit and not to the benefitof the trustee. In the case ofDunklin v. Wilkins, the defence was made through an agent, and for the benefit of the principal; here it was offered to be made through a trustee and for the benefit of one of the cestuis que trust. There is no distinction in principle between the two cases.
I, however, think, that the court erred for another reason. The plaintiff was entitled to maintain the action only on the ground that the defendant had money, which, ex equo et hono, he (the plaintiff,) was entitled to. — Hitchcock et al. v. Lukens & Son, 8 Port. 333, and cases there cited. This being the ground of the action, any evidence, which tended to show that he ought not, ex equo ct bono, to recover, is admissible to defeat *600the suit; for the same principle that enables the plaintiff to recover in this action may be invoked by the defendant to defeat the action in the whole or in part. — Eddy v. Smith, 13 Wend. 488; Hall v. Shultz, 4 Johns. 240, and note. If the judgment in fact had been paid by the principal debtor, then it would be inequitable to compel Robert Smith the security to pay it again, and when it was shown that the defence was made under his instructions and for his benefit, I think it was then shown that the plaintiff ought aotex equo el bono to recover.
Let the judgment bejreversed and the cause remanded.