This ease falls within the principle established in Eastman v. Foster, 8 Met. 19. It was there decided, that a mortgage made by a principal to a surety, to secure the payment of certain notes, and indemnify the surety therefrom, was not to be regarded simply as an indemnity of the surety; but constituted the surety and mortgagee a trustee for the creditors whose debts were enumerated in the condition, and created an equitable lien in their favor for the security of the notes recited or described in the condition; and that this equitable lien, being attached to the property in the hands of the mortgagee, would remain and bind the property in the hands of an assignee of the mortgagee with notice of the trust, and would also follow it into the hands of the original mortgagor or his grantee taking it with like notice of the trust. This decision rests on the broad principle of equity, that the estate of the mortgagee is to be treated as a mere security for the debt, and when the debt is assigned by the mortgagee, it carries with it in equity, as an incident, a right to have the estate appropriated for the payment of the debt in the hands of the assignee. To cony out and enforce this equity, the mortgagee is regarded as the trustee of those to whom he has assigned the debt secured by the mortgage, and can be compelled to appropriate it for their benefit. 2 Story on Eq. § 1016. Crane v. March, 4 Pick. 131, 136. Bryant v. Damon, 6 Gray, 564.
In the present case, it appears by the averments in the bill that the notes held by the plaintiffs and by those in whose behalf they prosecute this suit were signed by Hooper, and indorsed by Curtis for the accommodation of Hooper ; that the mortgages described in the bill were given by Hooper to Curtis to secure the payment of these notes and indemnify him against any liability thereon ; and that the defendants, as assignees of Hooper and Curtis, the mortgagor and mortgagee, have received *50said mortgages or the proceeds thereof with full notice of the purposes for which the mortgages were given. In regard to all these notes, Curtis, being an accommodation indorser, stood in the relation of surety for Hooper to the several persons to whom the notes were negotiated. The mortgages set out in the bill were given to Gratis to secure the payment of these notes. The property was thereby pledged as security for the debts. A trust was fastened upon it in the hands of the mortgagee for the benefit of those who should become creditors by purchasing notes secured thereby; and this trust, in the nature of an equitable lien, can be enforced against these defendants, who took that property from the mortgagor and mortgagee with notice thereof.
The case of Agawam Bank v. Morris, 4 Cush. 99, does not at all resemble the case at bar. It was not a case where a creditor sought to have a mortgage given to a surety or indorser applied in payment of a debt. The question there arose on expunging a proof of debt, and was decided on the ground that the mortgage was given not to secure the entire debt, but only such balance thereof as should remain after proof of the debt had been made and a dividend received from the estate of the insolvent.
The case of Young v. Miller, 6 Gray, 152, only decided that an indorsee of one of two notes secured by a mortgage which is not assigned to him cannot maintain a writ of entry in his own name to foreclose the mortgage.
Demurrer overruled.