
    Nathan Gaskill et al., appellants, v. Edmond L. B. Wales’s Executors, respondents.
    1. The principle of subrogation is one of equity merely, and it will accordingly be applied only in the exercise of an equitable discretion, and always with a due regard to the legal and equitable rights of others.
    2. W. lent money to G. to be secured by mortgage of land on which, it was agreed between them, it was to be the first encumbrance; it being agreed that part of the money should be used in paying off two mortgages already on the land. The mortgage was given and the former ones were paid off accordingly. They were canceled of record by W.’s attorney. Before W.’s mortgage was given, the mortgagor had begun a building on the land, and lien-claims for money due for work and materials were subsequently filed against the house and curtilage, and they were sold under judgment and- execution thereon. The purchasers at that sale had no notice of any claim or right except what tlie records showed. — JJeld, That W.’s claim, to be substituted in the stead of the former mortgagee to the extent to which his money was used to pay them off, could not therefore be allowed.
    On appeal from a decree in equity by Parker, J., rendered in the Burlington circuit court, on the following opinion:
    On the 8th day of March, 1872, Joseph Grubb was seized of a tract of land situated in the township of Burlington, in this county, containing twenty-two and seventy-one hundredths acres. On the 9th day of April, 1872, said Grubb executed a mortgage on the whole of said premises to Caleb Wilkins, to secure the-sum of $1,000. On the 9th day of April, 1873, said Grubb executed another mortgage to said Wilkins, on the same property, to secure the sum of $200. 0.n the 1st day of May, 1874, Grubb commenced the erection of a dwelling-house on said premises. On the 11th day of May, 1874, Grubb executed a mortgage on the whole tract to the complainant, to secure the payment of $2,000, which mortgage was delivered and recorded on the 23d day of May, 1874. On the 23d day of May, 1874, the two Wilkins mortgages were canceled of record. On the 25th day of September, the whole tract of twenty-two and seventy-one hundredths acres was conveyed by Grubb to Walter A. Barrows.
    On the 27th day of April, 1875, Laumaster & Wright filed in the Burlington county clerk’s office a mechanics’ lien-claim for $255.95, against Joseph Grubb, builder and owner, on the building which had been erected on said tract of land, and the curtilage whereon the same was erected, which curtilage is described in the lien-claim as containing about one-half acre of land, for materials furnished for said building.
    On the 4th day of May, 1875, Samuel E. Hancock filed a similar lien-claim for $73.50; and on the same day Nathan Gas-kill filed a similar claim, for work on said dwelling-house, for the sum of $66.
    Judgments were recovered and executions, both general and special, issued on said lien-claims, by virtue of which the sheriff sold the said dwelling-house and curtilage of one-half acre on the 11th day of December, 1875, to said Hancock, Laumaster and Wright.
    On the 11th day of July, 1879, complainant filed a bill to foreclose his mortgage, which bill was amended on the 22d day of August, 1881.
    The bill charges that the complainant’s mortgage or part thereof is a first lien on the whole tract of twenty-two and seventy-one hundredths acres described therein; that, although the said mortgage of complainant wqs dated and recorded after the commencement of the building against which and its curtilage the said mechanics’ liens were filed, yet that by reason of the complainant’s paying to said Grubb, only a part of the moneys loaned to him, and paying the sum of $1,294.50, the amount then due to said Wilkins on his said two mortgages, he is in equity entitled to have that portion of his mortgage which represents the moneys which he ’paid Wilkins for his said two mortgages decreed to be a lien on the whole of said mortgaged premises prior to said lien-claims, and prior to any right and interest which the purchaser at sheriff’s sale, under the judgments obtained upon said claims, may have. And that he is entitled to be subrogated to the interest, estate and security in said mortgages which Caleb Wilkins had at the time he paid said Wilkins the amount of the said two mortgages held by him.
    The question in the cause is whether the complainant is entitled to be subrogated to the rights Wilkins had at the time complainant paid him the moneys for his mortgages to the extent of such payments. If complainant be entitled to such subrogation, he has the first lien on the whole premises to the extent of what he paid Wilkins, and interest on the same from the time of payment, for Wilkins’s mortgages were a lien on the whole premises, before and at the time the building was commenced; but if complainant is not entitled to such subrogation, the liens were prior to the whole of complainant’s mortgage, because such mortgage was not executed until after the house was commenced.
    
      To determine this question of subrogation it is important to inquire what was said and done on the 23d day of May, 1874, the day when complainant’s mortgage was recorded, the money paid by complainant, and the Wilkins mortgages canceled. Mr. Barrows is the only witness on this subject. His evidence is as follows, viz.:
    
      “ I am a practicing attorney-at-law, and was also practicing in 1874; in the spring of that year Joseph Grubb, of the township of Burlington, applied to me for a loan of §2,000, to be secured on a first mortgage on his farm, which is the farm described in complainant’s mortgage and bill; I suggested the application for this loan to the*complainant, and he agreed to make the loan to Grubb on condition of having the first lien on the farm in question for security; the record then showed, what Grubb had already informed me; that there were two mortgages on this farm made to Caleb Wilkins; I also learned' that Franklin B. Levis, Esq., was then acting as attorney for Caleb Wilkins in the collection of these two mortgages; when the money was furnished to me by complainant to complete the loan to Grubb, in pursuance with the agreement that complainant was to have the first lien upon the premises, and at the request of Joseph Grubb, I paid to Franklin B. Levis, attorney of Caleb Wilkins, out of the money so loaned by complainant to Grubb, the principal and accrued interest of the two mortgages held by Wilkins; one of these mortgages was for §1,000, and bore date April 9th, 1872; interest was due on it from April 9th, 1873; the other mortgage was for §200, and bore date April 9th, 1873; interest was due on it from its date; the amount so paid by me in satisfaction of these two mortgages was §1,294.51; I paid this sum to Mr. Levis and received from him the two mortgages ; I then caused the two mortgages to be satisfied of record, and placed complainant’s mortgage upon record; all this was done on the 23d day of May, 1874.”
    Upon cross-examination, Mr. Barrows says: •
    
      “ In carrying out the loan of this money Mr. Wales took no part in it except furnishing the money and requiring a certificate of the record, that is, of the liens upon it; I acted as his agent in perfecting this loan; Mr. Wales compensated me for making the said loan.”
    Mr. Barrows further testifies that he understood he was also acting for Grubb, for securing and perfecting the loan to him. And that he does not remember what he did with the Wilkins mortgages, and his old papers being stored away, he does not know whether they are in his possession or not. He adds that his aim was and he intended to have the Wales mortgage a first lien, according to the agreement, and all he did was to that end.
    Mr. Barrows was agent of complainant in the transaction, and his agreement and acts must be considered the agreement and acts of the complainant.
    It will be observed that the debtor Grubb, upon the negotiation of the loan, and at its consummation, agreed that complainant should have the first lien on the mortgaged premises to secure the money he was about loaning. To make it certain that he should have the first lien, complainant took it upon himself to see that the Wilkins mortgages, .should be paid. He did not give all the money to Grubb, to do with it as he might see fit, but he gave Grubb only a part of the money, reserving an amount sufficient to take up the Wilkins mortgages. He did pay these mortgages and they were delivered to complainant, and not to Grubb. Subrogation is the substitution of a new for an old creditor in succession to' his rights.
    When a man pays a debt which could not properly be called his own, but which it was his interest to pay, the law subrogates him to all the rights of the creditor. H Born. Law Bio. 417.
    
    This definition includes the case now under consideration. The complainant paid the debt, not his own, but which it was his interest to pay.
    I have examined all the cases on this subject that were cited on the argument, many of them do not apply, but a few are directly in point. In Coe v. New Jersey Midland R. R., 1$} C. E. Or. 113, Paine v. Hathaway, 3 Vt. %1% is referred to approvingly. In that case it was held that if a person who has agreed with a debtor to advance money, to be secured by mortgage on land, to discharge a debt secured by encumbrance on that land, himself pays the debt with the inoney and discharges the encumbrance, he is not to be regarded as a volunteer; and after such agreement with the debtor, he will not be considered a stranger with regard to the debt he has paid, but in equity will be entitled to the benefit of the security which he has satisfied. In Horneojpathie Mut. Ins. Co. v. Marshall, 6 Stew. Eq. 11H, it was held that the complainant was entitled to the rights of the mortgagee whose mortgage was paid, where the encumbrance was on the property when the money was loaned to pay the mortgage.
    The facts of the case reported in Barnett v. Griffith, 12 G. E. Gr. 201, are almost identical with those proved in this case. The complainant in that case had advanced the money paid on two former mortgages on security of his mortgage, and to release the premises from the encumbrance of those mortgages which were prior liens to his mortgages and to lien-claims. It was held that complainant was 'entitled to be subrogated to the rights of the mortgagee, under the two mortgages, to the extent of the money paid for them and interest thereon.
    It is clear that complainant is entitled to be subrogated to the rights of Wilkins in the two mortgages he paid.
    These mortgages were prior to the commencement of the building on which defendants’ liens were filed. Complainant’s lien for the amount of those two mortgages and the interest thereon, from the time complainant paid the same, is first in order of priority.
    Let there be a decree to sell the whole of the premises, and that there be paid out of the proceeds of sale in the first place to the complainant, the sum of $1,294.50, the amount paid by complainant for the two mortgages, which were given to Caleb Wilkins, and interest thereon from the 23d day of May, 1874, and costs of complainant, and in the next place to the defendants, Samuel E. Hancock, Henry Laumaster and Noah E. Wright, the purchasers under the lien-judgments, the sum due-on said judgments, principal, interest and costs, on the day of the delivery of the deed by the sheriff to them, December 11th, 1875, being the sum of and in the third place to pay the balance of complainant’s mortgage.
    
      Mr. F. Voorhees, for appellants.
    
      Mr. W. A. Barrows, for respondents.
   The opinion of the court was delivered by

The Chancellor.

This is an appeal from a decree of the Burlington circuit court-in a suit for foreclosure of a mortgage held by the respondents’ testator, Hr. Edmond L. B, Wales, on land in that county. The mortgaged premises are a tract of twenty-two and seventy-one hundredths acres. They were owned on the 11th day of May, 1874, by Joseph Grubb, and were then subject to two mortgages thereon, given by him to Caleb Wilkins, one for $1,000 and interest, and the other for $200 and interest. On that day Grubb borrowed of Dr. Wales $2,000 on mortgage of the property, and it was agreed between them that the mortgage should be the first lien thereon. It was given accordingly. With part of the $2,000 the Wilkins mortgages were paid, and they were then, by direction of Dr. Wales’s attorney, canceled of record. On the 1st of May, 1874, a few days before the Wales mortgage was given, Grubb began the building of a dwelling-house on part of the property. The firm of Laumaster & Wright and Samuel E. Hancock furnished materials for the house, and Nathan Gaskill did work thereon. They filed and prosecuted to judgment lien-claims under the mechanic’s lien law, for money due them therefor, and under executions on those judgments the dwelling-house and the curtilage thereof were sold, December 11th, 1875, to Hancock and the firm of Laumaster & Wright. The respondents claim that they are in equity entitled to be subrogated to the rights which Wilkins had under his mortgages when they were paid off, to the extent to which the money lent by their testator was used in the payment of those mortgages, and that for that amount and interest they are entitled ’ to priority over the purchasers of the property under the lien-claims. The principle of subrogation is one of equity merely, and it will accordingly be applied only in the exercise of an equitable discretion, and always with a due regard to the legal and equitable rights of others.

In the case in hand, the Wilkins mortgages were canceled of record, and the purchasers under the executions had no notice of any kind of the existence of any claim to the equity. They had no notice except what the records afforded. To give the respondents’ mortgage priority over the lien-claims would therefore manifestly be highly unjust to the purchasers who bought in ignorance of any right or claim to such priority. In the absence of any other notice they, of course, had a right to rely on the condition of the records, and having done so they cannot be defeated or prejudiced by a latent equity. Their title, therefore, to the dwelling-house and curtilage is paramount to the respondents’ mortgage. The decree will be reversed, with costs, with directions to the circuit court to enter a decree for the foreclosure and sale of the rest of the property only.

Deoree unanimously reversed.  