Pelt, J.
Appellee brought this action against appellants to foreclose a mechanic’s lien on certain real estate in the city of Princeton, Indiana. The complaint contains the usual averments, and it is also alleged that subsequent to the filing of notice of the lien, Winfield P. Larcy and Julia E. Larcy, his wife, sold and conveyed the real estate to Jonah G. Lagrange, who now holds the same subject to the lien of appellee; that appellant, Margaret Lagrange, is the wife of said Jonah G., and the other appellants severally assert some title to, and lien upon said lands, or some part thereof; that neither of said parties has any title or lien upon the land that is not junior and subject to appellee’s lien.
To that part of the complaint which claims priority of lien, appellants, other than the Peoples National Bank, filed an answer which avers in substance that on October 25, 1907, appellant, Joñah G. Lagrange, as surety, and Win-field P. Larcy, as principal, executed their note to the American National Bank for $5,000, payable six months from date in consideration of a loan then made to Larcy for that amount; that Larcy received all of the consideration and Lagrange at no time received any part thereof; that at the time of the execution of the note, and to induce Lagrange to sign it as surety, Larcy promised and agreed to execute to Lagrange a mortgage on all of the real estate described in the complaint and certain other real estate, all of which real estate Larcy agreed to and did purchase with the $5,000 so borrowed by him; that said mortgage was executed on January 18, 1908, pursuant to their agreement and duly recorded and has never been released of record or cancelled; that at the date of the execution of the mortgage said Larcy was the owner of all the property described in it; that all of the property owned by Larcy was not of the value of more *491than $5,000; that Larcy and Lagrange renewed said note from time to time until December ■ — , 1909, when Larcy left the State and went to parts unknown, leaving no property out of which said indebtedness could be collected, except the property mortgaged to Lagrange; that the entire indebtedness to the American National Bank is still owing; that Larcy has never returned to the State and has never acquired any property in this State since his departure; that on April 28,1910, said Larcy by power of attorney, his wife Julia E. Larcy joining in the deed, conveyed all the real estate included in the mortgage to appellant, Jonah G. Lagrange; that the conveyance was made to Lagrange “solely in consideration of his release of said Winfield P. Larcy from personal liability on the aforesaid indebtedness; but with the further agreement that the lien of said mortgage should remain unimpaired”; that after the execution of said deed of conveyance to him, Lagrange as principal, and his codefendants, naming them, as his sureties, renewed the note held by the American National Bank, and the original indebtedness contracted to the bank by Larcy now evidenced by the last note is owing and unpaid; that to indemnify the sureties on such note Lagrange and his wife executed to his sureties a mortgage on said real estate, which mortgage is duly recorded; that by reason of the aforesaid facts the title of the defendants, Lagrange and wife, and the interest in and lien upon the real estate described in the complaint of the sureties on said last named note, and of said bank, are superior to any lien of the appellee on said real estate.
The appellants Jonah G. and Margaret Lagrange-filed a separate partial answer averring substantially the - same facts.
To each of these paragraphs of answer appellee demurred for insufficiency of the facts alleged to constitute a defense. The demurrers were sustained and exceptions reserved. Appellants refused to plead further and the court found for appellee and against the appellants and rendered judgment *492in its favor for $178.37, and for foreclosure of the lien. The rulings on the demurrers áre separately assigned as error.
1. Appellee concedes the general principle, that a valid mortgage is superior and paramount to a subsequently acquired lien under the mechanic’s lien daw of this State, but asserts that the mortgage relied on by appellants .has been legally satisfied. It is the contention of appellants, however, that the original mortgage lien was not relinquished and is still in force and effect and prior to appellee’s lien. The correctness of the'rulings on the demurrers to the answers depends on the effect of the conveyance of the real estate to appellant,' Lagrange. If the legal and equitable titles evidenced by the deed to Lagrange and by the mortgage which he seeks to preserve for his benefit, merged, the rulings were correct. If, on the facts averred, such estates did not merge, and the lien of the mortgage was preserved for the protection of appellants agáinst appellee’s lien then the rulings on- the demurrers were erroneous.
2. 3. Where a purchaser of real estate, for the purpose of protecting his title thereto, pays and discharges an encumbrance thereon, which in equity he was not bound to pay and discharge, the lien of such encumbrance will be kept alive and enforced for his benefit. In law, when the estate in fee and the equitable or mortgage estate meet in one person there is a technical merger of the estates, and the equitable estate is absorbed by the legal; but in equity the merger will be averted and the lien preserved when -necessary to satisfy the ends of justice. This rule applies where one purchases real estate On which there is an encumbrance which he is not obligated to pay, but which he discharges to protect his title. If the purchaser of the legal title was primarily liable to discharge the encumbrance, his payment of the debt, or legal satisfaction of the lien, would not enable him to invoke the equitable rule to protect his property against valid- liens *493thereon held by other persons. Birke v. Abbott (1885), 103 Ind. 1, 4, 1 N. E. 485, 53 Am. Rep. 474; Springer v. Foster (1901), 27 Ind. App. 15, 20, 60 N. E. 720; Shirk v. Whitten (1892), 131 Ind. 455, 456, 31 N. E. 87; Coburn v. Stephens (1894), 137 Ind. 683, 687, 36 N. E. 132, 45 Am. St. 218; Hanlon v. Doherty (1887), 109 Ind. 37, 40, 9 N. E. 782; Opp v. Ward (1890), 125 Ind. 241, 243, 24 N. E. 974, 21 Am. St. 220. Where one pays' a debt or discharges an encumbrance he is primarily obligated to pay or discharge, such debt or lien is thereby extinguished. Klippel v. Shields (1883), 90 Ind. 81, 82; Ritter v. Cost (1884), 99 Ind. 80, 86; Birke v. Abbott, supra.
4. 5. 6. In the ease at bar Lagrange, the grantee, was liable as surety to the bank, before he obtained the legal title to the land on which he held the indemnifying mortgage. By the provisions of the deed he made himself principal and beeame primarily liable to the bank for the debt, but the' bank was not bound to release Larcy from his obligation on the note. Gregory v. Arms (1911), 48 Ind. App. 562, 568, 96 N. E. 196; Birke v. Abbott, supra. In a sense Lagrange made himself primarily liable but not in the same sense as a grantee who assumes the payment of a mortgage debt for which he was not previously liable. In obtaining the legal title he shows a clear intention to preserve the lien and prevent a merger. Intention expressed, or gathered from the facts and' circumstances, is an important and often controlling factor in determining whether a merger did, or did not take place. Where such intention when carried into effect does not work injustice, but leads to equitable results, the merger may be averted and the lien preserved for the benefit of the party who pays the debt. Coburn v. Stephens (1894), 137 Ind. 683, 686, 36 N. E. 132, 45 Am. St. 218; Swatts v. Bowen (1895), 141 Ind. 322, 326, 40 N. E. 1057; Chase v. Van Meter (1895), 140 Ind. 321, 333, 39 N. E. 445; Stuckman v. Roose (1897), 147 Ind. 402, 406, 46 N. E. 680; *494Shirk v. Whitten (1892), 131 Ind. 455, 457, 31 N. E. 87; Boos v. Morgan (1891), 130 Ind. 305, 308, 30 N. E. 141, 30 Am. St. 237; Pugh v. Sample (1909), 123 La. 791, 49 South. 526, 39 L. R. A. (N. S.) 834; Capitol Nat. Bank v. Holmes (1908), 43 Colo. 154, 95 Pac. 314, 127 Am. St. 108, 16 L. R. A. (N. S.) 470; 2 Pomeroy, Eq. Jurisp. §§798,1212. The intention to preserve the lien is clearly expressed in the deed. It is also averred that the property was not worth more than the amount of the mortgage debt. The mechanic’s lien was junior to the mortgage. Appellee’s security was not lessened by the transfer of the legal title, and on equitable principles it would seem that the lien of the mortgage should' be preserved for the benefit of the grantee in the deed.
Both appellants and appellee have cited authority that apparently gives support to their contentions. On slightly Varying facts decisions may be found tending to support both views. But the case of Coburn v. Stephens, supra, removes all doubt as to the rule that should apply here. The issues, facts and circumstances are identical in every essential element with the ease at bar. The Supreme Court held that the holder of a mortgage who acquired the legal title to the mortgaged premises, upon which a mechanic’s lien had been acquired subsequent to the execution of the mortgage, was entitled to preserve the mortgage lien for his protection against such lien, and that the lien of his mortgage was not merged in the legal title. We therefore hold that the trial court erred in sustaining the demurrers to each of the paragraphs of answer. The judgment is reversed with instructions to overrule the demurrers to each of the paragraphs of answer, and for further proceedings not inconsistent with this opinion.
Note. — Reported in 108 N. E. 873. Merger in the case of a mortgage, see 99 Am. St. 100. Merger of estates as dependent upon intention of parties, see 7 Ann. Cas. 700; Assent of. creditor as essential to novation by substitution of debtor, see Ann. Cas. 1914 A 839. *495See, also, under (1) 27 Cyc. 1171; (2) 16 Cyc. 665; 27 Cyc. 1377, 1381; (3) 27 Cyc. 1377; (4) 27 Cyc. 1378, 1417; (5) 27 Cyc. 1379; (6) 27 Cyc. 1381.