The facts material to a determination of the questions involved are not in dispute, and are as follows: J. P. Sharman and the defendant, Marion Sharman, are husband and wife, and for a long • time prior to the execution of the mortgage in controversy in this suit they had a homestead, consisting of a dwelling house situated on a lot in the city of Des Moines. The title to the property was in the defendant, Marion Sharman. On the twenty-sixth day of September, 1885, the said Sharman and wife executed and delivered to the New England Loan & Trust Company a mortgage upon said homestead to secure the payment of a note or bond, signed by both of the mortgagors, for the sum of eight hundred dollars, with interest at the rate of seven per cent, per annum, payable semiannually. The note became due October 1, 1890. The plaintiff is a resident of the city of St. Louis. In the month of March, 1890, and for some time before,that, J. P. Sharman was in that • city. He was without means to pay the principal or interest of the mortgage-debt, and being fearful of a foreclosure of the mortgage, and to prevent a loss of the homestead, he applied to the plaintiff for assistance. The plaintiff was a longtime acquaintance of Sharman and his wife, and after repeated solicitations on the part of Sharman, she procured a bank draft in an amount sufficient to pay the mortgage debt, and indorsed the draft to the Des Moines Savings Bank, and delivered it to Sharman, with the express agreement that Sharman should forward the draft to the bank, and purchase the note and mortgage for the plaintiff, and have them properly assigned to her as security for her loan. The draft *357was forwarded by Sharman to the bank, inclosed in a letter, of which the following is a copy:
“St. Louis, March'29, 1890.
“Mr. Simon Casady.
“Dear Sir: — Enclosed a draft for eight hundred and twenty-eight dollars, to be paid the New England Loan & Trust Company; and take up mortgage which they hold against me. Will you be kind enough to take up the mortgage and insurance papers, and forward the same to my address? The mortgage is payable at the New England Loan & Trust Company’s office. As I can not be in Des Moines to transact the business myself, I trust you will look after it for me.
“J. P. Sharman.
“3128 Lafayette Ave.”
The note and mortgage was not owned by the New England Loan & Trust Company when the above letter concerning the remittance of the draft was received by the bank. Soon after their execution the loan and trust company assigned them to the Brattleboro Savings Bank of Vermont, but it was the custom of the. loan and trust company to receive payment, and give notice to the holders of notes and mortgages sold by it. The notice was given, and the holder of the mortgage and note sent them to the loan and trust company, and the latter, after canceling the note and mortgage, and cutting out the signatures thereto, and releasing the mortgage of record, sent the note and mortgage to J. P. Sharman, at St. Louis. The plaintiff discovered at once that her agreement with Sharman had not been carried out, and that the transaction in form amounted to a payment instead of an assignment of the mortgage. Sharman acknowledged that it was not right, and he signed a new boncf and mortgage to the plaintiff, and the same was sent to the defendant Marion Sharman, for her signature, together with a letter from her husband explaining the whole matter. *358The papers were returned with the information that Marion Sharman refused to execute them. The defendant continues to hold the property as a homestead, and, at the time the plaintiff parted with her money, J. P. Sharman was insolvent, and he still remains in that financial condition. The plaintiff advanced her money in the full belief that its repayment was to be secured by an assignment of the mortgage ; and she intended to extend the time of payment to accommodate Sharman and his wife, who were long time acquaintances and friends.
The question to be determined upon the foregoing facts is, whether the plaintiff is entitled in equity to have her claim established as a lien upon the property, and a decree foreclosing the same, with the same effect as if the mortgage had been assigned to her.
I. It is important at the outset of the consideration of the question to make plain the exact status and relation of the parties to the transaction at the time it occurred, and their present relation to the controversy. J. P. Sharman and his wife, the defendant herein, were jointly and severally liable for the payment of the debt for which their homestead was mortgaged. They were not only joint obligors; they were both principal debtors. One was not a surety for the other. The plaintiff’s money was applied in payment of the debt, and, as the mortgagors are insolvent, the effect is that they have used the plaintiff’s money to discharge the lien upon the homestead, and are just that much benefited, without making any recompense to the plaintiff; and, if the wife is permitted to hold the homestead discharged from the claim of the plaintiff, she has acquired a right as against the plaintiff without the plaintiff’s consent. If the lien of the plaintiff is established, the defendant suffers no injury because she would be in precisely the same condition that she was before the plaintiff paid off the mortgage. These propositions, *359which at once arise in the mind, appear to us to present the strongest equitable considerations in favor of the claim of the plaintiff.
Is there any equitable principle which requires us to hold that the plaintiffs has no right, except a right of action, against J. P. Sharman for failing to perform his contract by procuring an assignment of the mortgage? It does not appear to us that the fact that the property is a homestead in any manner affects any right to a lien which the plaintiff might have if there were no homestead right. The homestead was charged with the payment of the mortgage, and, if the plaintiff has an equitable right to .a lien, it must be worked out through the mortgage; in other words, it must be in the nature of subrogation to the rights of the mortgagee. The primary meaning of “subrogation” is the act of putting one person in the place of another, or the substitution of another person' in the place of the creditor, to whose rights he succeeds in relation to the debt. Formerly the right of subrogation was limited to transactions between principals and sureties, as, when a surety paid the debt of his principal to the creditor, the surety was entitled to have the full benefit of all mortgages or collateral securities for the debt, both of a legal and equitable nature. It has always been held that a party who, on his own motion, discharges the debt of another, without any agreement with either the debtor or creditor in relation to how he shall be reimbursed, is regarded as a mere volunteer, or, as some of the cases express it, an intermeddler, and is not entitled to the benefit of the mortgage or collateral security held by the creditor. While this may be said to be the rule now observed in' courts of equity, yet the ancient doctrine of subrogation has been very much modified in recent decisions. It has been held that the right of subrogation is not founded on contract, but is the creation of equity, and enforced *360solely for the protection of persons who, by paying the debts of others, should in good conscience be substituted in the place of the original creditor. But now it is held by many of the courts that where a third person pays the debt at the instance of the debtor, and upon an agreement or understanding with the debtor that he shall be entitled to the benefit of the security held by the creditor, equity will compel the debtor to do justly, and will substitute the person who discharges the debt to all the rights of the creditor whose claim the third person has discharged. Crippen v. Chappel, 35 Kan. 495, 11 Pac. Rep. 453; Detroit F. & M. Insurance Co. v. Aspinall, 48 Mich. 238, 12 N. W. Rep. 214; Levy v. Martin, 48 Wis. 198, 4 N. W. Rep. 35; Cobb v. Dyer, 69 Me. 494; McKenzie v. McKenzie, 52 Vt. 271; Emmert v. Thompson 52 N. W. Rep. (Minn.), 31; Baker v. Baker 49 N. W. Rep. (S. D.), 1064. Without reviewing these authorities, it is sufficient to say that they fully sustain the rule above announced. In some of them there does not appear to be even an express contract that the substitution shall be made, but the right was enforced because of a mere understanding or expectation of the transfer of the security; in others the contract was that the mortgage should be paid, and a new one substituted for it; and in others, where new mortgages were made which were held to be invalid, it was held that the person making the payment was entitled to be subrogated to all the rights of the original mortgagee. This principle commends itself to us as eminently just.
II. ' It is contended with great confidence in behalf of the appellee that the question under consideration is not an open one in this state, and' that, following the case of Bailey v. Malvin, 53 Iowa, 371, the decree of the district court in this case must be affirmed. The cases are clearly distinguishable. It is true the facts in the two cases are somewhat similar, so far as those *361in the cited case appear. It is stated in the opinion that “the pleadings are very obscurely set out in the abstract.” The principle decided in the case is that a debtor can not pay a note secured by a mortgage, and then reissue it to another, and authorize him to enforce the mortgage, not as against the mortgagor, but as against the other lien holders. In the case at bar no rights of third persons are involved. It is a question directly between the plaintiff and the mortgagor.
III. It is true, as claimed in behalf of the appellee, that she was not directly a party to the agreement that the mortgage should be assigned to the plaintiff. But ought she to be allowed to profit by the transaction without complying with the contract made by her husband and co-obligor with the plaintiff? It appears to us that every equitable consideration forbids it. She is in no position to demand that the satisfaction of the mortgage shall not be disturbed, and her property remain free and unincumbered. If she accepts the benefit of the plaintiff’s money, she should be held to abide by the contract, under which the plaintiff made the payment. This is within the principle of the rule announced in Eadie v. Ashbaugh, 44 Iowa, 519, and Davenport Sav. Fund and Loan Ass’n v. North American Fire Ins. Co., 16 Iowa, 74.
IV. It is insisted in behalf of the appellee that the Brattleboro Savings Bank was not bound to assign the mortgage, and could not have been compelled to do so, and the plaintiff can not be allowed to treat the transaction as an assignment because Sharman, who .was her agent, violated his instructions, and paid the debt. The defendant ought not to be allowed to reap the benefit of the mortgage debt by the plaintiff for any such reason. It is purely a matter of speculation as to whether the savings bank would have assigned the mortgage. That proposition was not presented to its officers. It would have been a matter of entire indif*362ference to the savings bank whether it assigned the mortgage without recourse, or delivered it over as paid. The rights of the savings bank are in no manner involved in this action.
The decree of the district court is reversed.