The facts in this case are very simple, but their application involves an interesting question of law.
Erendenberger, in 1864, bought a lot in the city of Logansport, from Mary A. Smith, paying four hundred dollars cash, and executing a mortgage for twelve hundred dollars, the remaining purchase-money. Mrs. Smith, in July, 1867, assigned the mortgage to Allen Richardson. In 1865, Erendenberger improved the property and in said improvement incurred a debt of thirteen hundred dollars, for which he gave a second mortgage to said Richardson. Both mortgages were duly recorded. Prior to 1867, two hundred dollars of taxes accrued and became a lien upon said property. In March, 1867, Levy and others recovered a judgment against Erendenberger for nine hundred and twenty-five dollars. In September, 1867, Richardson instituted, in the Cass Circuit Court, a foreclosure suit upon his two above described mortgages. After service of process, and pending said suit, and to avoid the costs and expense thereof, he having no means wherewith to pay, Erendenberger reconveyed the property to Richardson. This deed was dated September 27th, 1867, and the same day Richardson conveyed to Troost who purchased the property in good faith, and immediately thereafter improved the same, to the extent of twenty-five hundred dollars, in a permanent brick structure, Troost paid sixteen hundred dollai’s to Richardson for the property, which, at that time, was its full value. At the time of said conveyance, the taxes, the mortgage for the purchase-money, and the improvement mortgage, all of which were prior liens to the Levy judgment, amounted to nearly twenty-six hundred dollars.
This suit was brought by Troost, on the 13th of Decern*36ber, 1867, setting forthtbe above facts, and alleging,that since his said purchase and improvement, Levy and his co-partners had issued an execution, and said entire property was levied upon thereunder, and the same was advertised by the sheriff' (who was made a party in the bill), for public sale December 28th, 1867;. and praying that an account be taken of the property and its value September 27th, 1867, the date of his purchase, and if found to be greater than the prior liens, then offering to bring the same into court, in cash, to be applied to the payment of said judgment; and, pending said account, praying that said sheriff’s sale be enjoined.
To this complaint the defendants filed a general demurrer, and the same was sustained, and the bill dismissed for want of equity, and plaintiff' charged with the costs of the application.
This demurrer presents the sole question in the record. Did the court err in sustaining it?
That, for the purpose of protecting the. equities of Troost, the mortgages held by Richardson will be kept on foot, unless extinguished by Richardson’s purchase of the lot, cannot be regarded as an open question in this State.
In the case of Peet v. Beers, 4 Ind. 46, this point is settled. Peet recovered a judgment at law in the Roble Circuit Court against one Rimmons. At the date of the recovery the judgment-debtor owned no real estate. He subsequently purchased a tract of land in Roble county, and simultaneously executed a mortgage on the premises to the vendor, to secure the remainder of the purchase-money. The Peet judgment was still unpaid. Rimmons sold the land to Beers, who, as part of the consideration, assumed the payment of the mortgage-lien; the remainder he paid to his vendor. Beers, in ignorance, as he alleged, of the Peet judgment, paid off the mortgage to Rimmons’ vendor. Execution was issued in favor of Peet and levied on the land. Beers filed his bill in chancery and prayed that he might be subrogated to the right of the mortgagee whose *37prior lien lie liad discharged. The court sustained his bilL In affirming the ruling, this court, after citing authority, use this language: “All that could have been levied upon, had Himmons still held the land, is yet subject to Peet’s excution. He is restricted in his levy to the interest of Himmons, the judgment-debtor, in the property. So that the injunction cuts him off from no security which he ever had any right to claim. We therefore conclude that, as against Peet, Beers is entitled to be subrogated to all the rights and equities of the vendor whose lien he has paid.”
It remains to inquire whether the mortgages held by Eichardson were extinguished when he became the owner of the legal-title and on the same day executed the deed for the land to Troost.
The clear weight of the authorities is, that merger never takes place except where the legal and equitable estates unite in the same person; and not even then when it is the clear intent of all parties In interest that it shall not take place; and such intent is indicated by the taking of an assignment of the mortgage in place of a satisfaction of the same. Mickles v. Townsend, 18 N. Y. 575; Champney, Administrator, v. Coope, 32 N. Y. 543; Bascom v. Smith, 34 N. Y. 320.
In the case of Thompson v. Chandler,7 Maine, 318, it was held, that if the purchaser of an equity of redemption takes an assignment of the mortgage, this shall not operate to extinguish the mortgage, if it be for the interest of the assignee to uphold it.
In Wells v. Morse, 11 Ver. 9, 'this language is used: “ This court will keep the mortgage on foot, if necessary for the purpose of justice, although the interest of the mortgagee and the equity of redemption unite in the same person.”
The same rule is also announced in Howe v. Woodruff, 12 Ind. 214.
In Glidewell v. Spaugh, 26 Ind. 319, we adopted the language used by Chancellor Walworth in Keirsted v. Avery, that “it is now settled that a judgment-lien, being merely *38a general lien on the land of the debtor, is subject to every equity which existed against the land in the hands of the judgment-debtor at the time of the docketing of the judgment. And the court of chancery will protect the equitable rights of third persons against the legal lien, and will limit that lien to the actual interest which the judgment-debtor has in the estate.” That interest, at the date of the docketing of the judgment in this case, was subject to the lien of the mortgage executed to Mrs. Smith for the purchase-money, and to the mortgage to Richardson for the improvements. It must remain so. The amount of the mortgage debts at the date of the sale to Troost was some twenty-six hundred dollars; the value of the lot was only sixteen hundred dollars. If Troost had at that time brought this action, he could have extinguished the judgment-lien by a sale under the mortgage. Rut having no actual notice of the judgment, he went on in good faith, believing the property free of incumbrance, and erected valuable improvements worth twenty-five hundred dollars. Shall the judgment-creditor have the benefit of this increased value given to the property, or will equity protect the purchaser?
As between the parties, the execution of the deed to Richardson, pending his foreclosure proceedings, was equivalent to a foreclosure and sale,and purchase by Richardson. The light of the judgment creditors to redeem, however, was not affected. Richardson and, as his assignee, Troost, were in'possession as though under a foreclosure to which junior creditors had not been made parties.
The rule undoubtedly is, in states where the distinction between the forms and actions at law and suits in equity still exist, that if a party can enforce his lien at law, a court of equity will not interfere or relieve a purchaser or bona fide possessor, on account of money laid out'in repairs or improvements, but if resort must be had to a court of equity to secure the relief, as in case of redemption, then equity will only grant the relief upon equitable terms, and will require the payment of all expenditures for. improvements *39which acid value to the premises. Story Eq. §§ 1237, 1238.
But in our State, where the “distinction between actions at law and suits in equity and the forms of all such actions and suits are abolished,” and where an equitable defense may be set up to a legal claim, it seems inconsistent to assert,that because a party is enforcing a right under a legal form, equity will not give the same protection to equitable rights that they would receive if the proceeding was under equity forms. All these distinctions in forms, as well as actions and suits, are abolished; and equity can be invoked under all circumstances where an equitable right calls for protection or enforeement.-
Thus, although the execution-plaintiffs, have a complete legal remedy to enforce their lien, yet upon the application of the mortgagee who has become the purchaser of the real estate subject to such lien, and, without actual notice of such incumbrance, expended money in valuable permanent improvements, where without such improvements the value of the property would not exceed the mortgages, equity will compel the execution-plaintiffs to exercise their legal rights subject to the equitable right of the purchaser.
"What, then, are his equitable rights in regard to the improvements of a permanent character, as against the judgment-creditor having a lien on the land?
In the case of Wetmore, Executor, v. Roberts, 10, How. Pr. 51, the Supreme Court of Hew York held, that where an assignee of a junior mortgage, whose assignment was re-' corded, was not notified of a statute foreclosure and sale under a prior mortgage, he had a right to redeem. But, it appearing that at the time of such sale the interest of the assignee was not worth anything, and that the purchaser purchased in good faith, supposing he was getting a good title in fee to the premises, and went on and made valuable improvements; in an action by the assignee far a foreclosure of his junior mortgage and sale of the premises, it was held, that the value at the time of this latter sale, of the perma-*40iient improvements so made upon said premises must be deducted; out of which sums the mortgagees of the purchaser who made the improvements, and other liens created by such purchaser, were to be paid, according to their priority, and the balance, if any, paid to the original purchaser, the remainder, if any, after such deduction, to be applied to the junior mortgage assignee and his costs.
In the case of Mickles v. Dillaye, 17 N. Y. 80, the Court of Appeals expressly approve the decision in Wetmore v. Roberts, supra, and they also hold, that where valuable and permanent improvements have been made in good faith, by a person standing upon the legal footing of a mortgagee in possession, but who supposed himself to have acquired the absolute title, and such mistake was favored by the omission of the mortgagor, for several years before and after the improvements, to assert any interest in the premises, the mortgagor, •on asking the aid of equity to redeem, will be compelled to .allow the value of the improvements, though exceeding the rents and profits received.
In Benedict v. Gilman, 4 Paige Ch. 58, the plaintiffs had purchased under a statute foreclosure which did not cut off the rights of judgment-creditors whose liens were subsequent to the mortgage, and he had taken possession and had made permanent improvements in ignorance of the existence of certain judgments in the hands of the defendants. He filed a bill claiming a strict foreclosure unless the defendants would pay up the mortgage and the value of the improvements, and this was decreed.
Judge Story, indeed, states the doctrine broadly, that where the party making the improvements has acted bona fide and innocently, and there has been a substantial benefit conferred on the owner, he ought to pay for such benefit. Story Eq. § 1237.
The case before us is a strong one for the appellant. But for the improvements, the creditor could not secure anything by his lien, and he now seeks to avail himself of the money expended in good faith by an innocent party, to se*41cure Ms debt. We tMnk the demurrer should have been overruled. If on the final trial tbe averments of tire complaint shall be sustained, tbe court should determine the amount of increased value added to the property by the improvements made in good faith,-and add thereto the amount of the mortgages and taxes, and charge the plaintiff with the value of the rent of the property, as it would have been without the improvements, for the-time hold by him, and then order a sale of the property, paying out of the proceeds the sum found due the plaintiffj and applying any balance to discharge the judgment and costs, and paying over the residue, if any, to the plaintiff. If no bid shall be made for the property exceeding the sum ascertained as due the plaintiffj the property should be struck off’ to him, and a deed ordered, free from the lien of the judgment.
P>. P. Baldwin, for appellant. S. T. McConnell and M. 'Winfieldjfor appellees.The case is reversed, and remanded for further proceedings. Costs here.