This was a suit in equity to foreclose a mortgage. The facts, as found by the referee, briefly stated, were: The defendant Demas L. Grover was the owner of the premises described in the plaintiff’s complaint, and on August 5, 1889, he executed and delivered to Frank M. Weatherwax the bond and mortgage therein mentioned to secure the payment of the sum of $300 and interest one year from date. The mortgage was duly recorded in Jefferson county, where the premises were situated, August 6, 1889. The money thus secured was borrowed by Grover for the purpose of building a cottage on a portion of the premises described, but was not used for that purpose. The defendant Huntley acted as agent in procuring the loan. When Mrs. Weatherwax learned that the money had not been so applied, she saw Huntley about it, and on January.15, 1890, he and the defendant McFarran, to allay her fears, guarantied the collection of said bond and mortgage. Afterwards, and on April 2,1890, Grover and wife, by warranty deed, conveyed the premises to the defendant Huntley. The deed was recorded in Jefferson county, April 5, 1890.' This deed contained a clause by which the defendant Huntley agreed to assume and pay the mortgage as a part of the consideration for such deed. On August 26,1889, Eugene Petit obtained a judgment against Demas L. Grover for $207.21,. which was assigned to the defendant Battese ReVoir by an assignment which recites that $143.40 was due thereon January 14, 1889. The assignment was filed in Jefferson county, August 27,1889, and a transcript of the judgment was filed therein on the same day. There is unpaid thereon the amount last mentioned. This judgment became a lien- on the premises in question prior to the sale by Grover. The mortgage in suit became due August 6, 1890,.but was not paid by Huntley when due, although he was then, and since has been, financially able to pay it. About December, 1890, Huntley was informed of the ReVoir judgment, and that an execution would be issued against the premises unless it was paid. After receiving this information, Huntley raised money on his own note, and used it to pay the Weatherwax, mortgage in full. Instead of taking a satisfaction, he procured an assignment of the same to his wife, the plaintiff'in this action, which assignment was recorded in Jefferson county, January 3, 1891. The money used to pay the mortgage was the money of T. F. Huntley; At the time the money was paid and assignment taken Huntley knew that a fore-, closure of the mortgage would operate to cut off the lien of ReVoir’s judgment, and procured the assignment thereof to his wife, for the purpose, partly at least, of having the mortgage foreclosed, to cut off that judgment. Soon after the assignment was filed in the clerk’s office, the plaintiff commenced this action to foreclose the mortgage assigned to her.
As conclusions of law the referee, in effect, held: (1) That when Huntley received from Grover and wife a deed of the premises in question, and assumed and agreed to pay the Weatherwax mortgage as part of the purchase price, the lots became the primary fund for the payment of the mortgage, and Huntley, the principal and primary debtor, bound to pay and discharge the mortgage debt; (2) that when Huntley, with his own money, paid or caused the mortgage to be paid, the debt was paid and satisfied, and the mortgage security was likewise paid, satisfied, and discharged,-and the lien of the mortgage on the premises was wholly discharged, and the mortgage title of said Huntley was merged and lost in' his fee to said lots; (3) that Huntley, being *922principally and primarily liable and bound to pay the mortgage, could not, out paying the same, keep the mortgage security alive, and preserve the lien thereon, by taking an assignment to his wife; (4) that when Huntley paid the mortgage he obtained thereby no equity which entitled him to preserve the lien of the mortgage for the purpose of foreclosing the same to cut off the lien of a bona fide junior incumbrancer, whose incumbrance was prior to the purchase by Huntley, and of which he had notice before paying the mortgage; (5) that when the mortgage passed to the plaintiff by the assignment it was paid and discharged, and the lien on the premises was lost, and the plaintiff was not entitled to maintain an action to foreclose the mortgage; (6) that the defendant ReVoir was entitled to judgment dismissing the complaint in this action with costs, and judgment was ordered accordingly. The evidence, as well as the findings of the referee, render it manifest that it was not the intention of Huntley, the plaintiff, or Mrs. Weatherwax, to pay or discharge the mortgage in suit, but that it was their intention to continue it in force, and thus transfer it to the plaintiff. That there was no intention to extinguish it is obvious from the transaction between them and the assignment of the mortgage. James v. Morey, 2 Cow. 246; Mickles v. Townsend, 18 N. Y. 582.
The ground upon which the respondent seeks to uphold the judgment is that, when the defendant Huntley accepted the deed from Grover, and thereby assumed and agreed to pay the mortgage as a part of the purchase price, he became the principal debtor as to the mortgage debt, was obliged to pay it, and, when he did pay it, it became merged in his title,'and the lien of the mortgage was discharged, as he could not keep it alive by assignment to a third person. On the other hand, the appellant contends that .no duty was imposed upon the defendant Huntley to pay the mortgage in exoneration of the land, but that the land remained the primary fund for the payment of the mortgage debt. Thus the real question to be determined is whether, by reason of the provisions in his deed to assume and pay the mortgage as a part of the purchase price of the premises, the defendant Huntley became personally and primarily liable to pay the mortgage debt without recourse to and in exoneration of the land, or whether the land remained the primary fund for its payment, with an additional liability on the part of the defendant Huntley to indemnify his grantor against any deficiency that might arise on the sale of the mortgaged premise's. Whatever the rule may be elsewhere, we think it is the settled doctrine of equity in this state that, where premises are conveyed subject to a mortgage, and the deed contains a covenant by which the grantee assumes and agrees to pay the mortgage debt, the land is the primary fund for its payment. The purpose of the covenant is to indemnify the grantor for any deficiency that may arise on the sale of the mortgaged premises, and the liability of the purchaser is that of indemnitor, as between himself and the grantor. This question arose and was considered by Chancellor Kent in Cumberland v. Codrington, 3 Johns. Ch. 229, where, after a careful examination of many of the English and American authorities bearing upon the question, it was held that, where a person takes a conveyance of land subject to a mortgage, and covenants to indemnify the grantor against the mortgage, the land is the primary fund for its payment, and that this is so even where the purchaser has rendered himself liable at law to the mortgagee or creditor for the debt. The doctrine of that ease was also recognized in King v. Whitely, Hoff. Ch. 476. In Halsey v. Reed, 9 Paige, 446, it was held that, where a mortgagor sells and conveys the equity of redemption subject to the mortgage, the purchaser retains enough of the purchase price to satisfy the mortgage, and agrees to pay it, the mortgagor and purchaser stand in the relation of principal and surety,—the latter as security for the former to the extent of the mortgage debt; and the premises are primarily chargeable with the payment of the mortgage. The principle of that case was affirmed in Russell v. Pistor, 7 N. Y. 171, 174; Bowne v. Lynde, 91 N. Y. 92, 96; *923Rubens v. Prindle, 44 Barb. 345. In Slauson v. Watkins, 86 N. Y. 597, it was held that such an agreement was, in substance, an agreement to indemnify the mortgagor, and the effect of the transaction was to make the mortgaged premises primarily liable for the debt, and the grantee the principal debtor as between himself and his grantor; but that, until there was a sale of the premises, leaving a deficiency, no action could be maintained against the purchaser. In Wilbur v. Warren, 104 N. Y. 192, 10 N. E. Rep. 263, it was held that one who purchases land subject to a mortgage makes the land thereby the primary fund for the payment of the mortgage debt, although'the deed contains a covenant on the part of the grantee to pay it. The covenant is to indemnify the grantor against the contingency that the land may not bring enough to pay such debt. In discussing this question in that case, Andrews, J., said: “It is the settled doctrine in equity that one who purchases land subject to a mortgage makes the land thereby the primary fund for the payment of the mortgage debt. It is otherwise as between mortgagor and mortgagee, when the bond of the mortgagor accompanies the mortgage in the absence of any statute regulation. In that case the bond is the principal thing, and the mortgage is the incident. The debt is represented by the bond, and the mortgage is a collateral security for the personal obligation. But on a conveyance by the mortgagor, subject to the mortgage, the plain meaning of the transaction between the parties is that the land shall pay the mortgage debt in exoneration of the personal liability of the mortgagor on his bond, and in equity, on such a conveyance, the land is treated as the principal debtor, and the mortgagor as surety for the mortgage debt. If the deed, in addition, contains a covenant on the part of the grantee to pay the mortgage, the land still remains the primary fund for the payment of the mortgage. * * * This is in accordance, also, with the real intent of the transaction. The essential purpose of such a covenant is to indemnify the mortgagor against the contingency that the land may not bring enough to pay the mortgage debt, and thereby leave him exposed to a claim for a deficiency. Although the covenant may be in the form of a direct undertaking to pay the mortgage debt, and not a mere covenant of indemnity, yet that is its essential character. The covenant is treated as an additional security for the mortgage debt, and inures as a promise to the mortgagee; yet it is settled that it will support an action by the mortgagee only when the immediate grantor of the covenantor is himself liable for the mortgage debt. * * * The giving of a covenant by the grantee does not work a novation of the mortgage debt. It does not make the debt his own, except in respect to the estate, (Butler v. Butler, 5 Ves. 534,) and his liability is auxiliary, and not primary. ” Assuming, as we must, the principle established by the cases cited, it follows that Huntley was in no way bound to pay the mortgage debt in exoneration of the land which was the primary fund for its payment, and therefore the defendant BeVoir, as judgment creditor, had no right to insist that the payment was in 'satisfaction of the mortgage, when it clearly appeared that it was not the intention of the parties to that transaction. It is only where the person paying the mortgage debt is the principal and primary debtor, and is liable, personally and primarily, for the debt secured, that he cannot prevent the incumbrance from merging where an assignment is taken to a third person for his benefit'. Hence we are of the opinion that the learned referee’s conclusions of law were erroneous, and that he erred in directing a judgment for the defendant BeVoir. For these errors we think the judgment should be reversed. Judgment reversed, and a new trial ordered, with costs to abide the event. All concur.