This is an action under the statute, now § 6236, Wyo. Comp. Stat. 1920, for the recovery of real property. George H. Sprachlen, being the owner of the land in question, gave three mortgages upon it. The first, in 1903, to George I. Lambe, to secure a note for $414; the second, in 1904, to Pauline Bolln, as administratrix, to secure a note for $264; and the third, in 1907, to George I. Lambe, to secure a note for $1681, which included the debt secured by the first mortgage. While the land was thus encumbered, Bolln, as administratrix, the holder of the second mortgage, commenced a foreclosure action in which Sprachlen was the sole defendant, and in 1909 obtained in that action judgment for the debt secured by the second mortgage, with decree for its foreclosure by sale of the mortgaged lands. In 1910, before levy or sale under that decree, Sprachlen gave a warranty deed of the lands to George I. Lambe, the holder of the first and third mortgages. This deed recited a consideration of $2500.00. It contained no reference to the mortgages or the judgement, and upon its face was unconditional. By parol evidence, it was proved at the trial that the consideration for this deed was the payment of the amount owed Lambe by Sprachlen, and the promise by Lambe to pay “the Bolln mortgage and judgment.” Sprachlen’s notes, held by Lambe, were to be delivered to the former, but it does not appear whether or not this was done, and the mortgages by which they were secured were not released. It was proved, also by parol, that it was agreed between Sprachlen and Lambe, at the time of giving this deed, that Sprachlen should have a year “to redeem the land; that is, Sprachlen should have the land back if, within a year, he paid Lambe 'the consideration mentioned in the deed. Upon the delivery of this deed, Lambe took possession of the land, and he and his grantees have continued in possession.
*341The Bolin judgment was not paid, and in 1911, under an order of sale issued thereon, the mortgaged premises were sold to Pauline Bolin, the plaintiff in this action, for $645, which was about $200 more than the amount of the judgment, and in June, 1912, after the expiration of the redemption period, sheriff’s deed was executed and delivered to her. In September, 1912, George I. Lambe and Anna R. Lambe, by warranty deed, conveyed to Thomas H. Lambe and George A. Lambe; in 1915, Annie R. Thomas EL, and George A. Lambe conveyed by quit-claim deed to S. H. Clammer, who in the same year by similar instrument conveyed to the defendant. In none of these deeds is any reference made to any mortgage, judgment or other lien affecting the property. All of the evidence in the case was introduced by plaintiff, and the facts proved, as stated above, are undisputed.
This action was commenced in 1917. Trial was to the court without a jury, and resulted in a judgment for defendant. The plaintiff brings error.
The acceptance by Lambe of the third mortgage, which included the amount due on the first mortgage, did not, in the absence of an agreement to the contrary, discharge the lien of the first mortgage. (1 Jones on Mtgs. § 355, 930; First Nat’l. Bank v. Citizen’s State Bank, 11 Wyo. 32, 70 Pac. 726; Bachman v. Hurtt, 26 Wyo. 332, 184 Pac. 709.) Lambe continued to hold first and third liens on the property, unaffected by the decree foreclosing the second mortgage, as he was not a party to that action, but he did not have, by virtue of his mortgage liens, any legal title or right to possession (Robinson Merc. Co. v. Davis, 26 Wyo. 484, 187 Pac. 931), and could not have maintained ejectment even after condition broken, before foreclosure and sale.
The defendant, conceding the foregoing, claims a right'to possession as a “mortgagee in possession.” It contends that Lambe, who, on the delivery to him of the deed from Sprachlen, in 1910, entered into possession with the eon-*342sent of the mortgagor, was thereafter entitled to hold possession, by virtue of the lien of his first mortgage, until the debt was paid, and that defendant, as the successor of Lambe, was entitled to the same right.
The defendant does not claim that Lambe acquired any title to the land by virtue of the deed from Sprachlen to him, given after the judgment against Sprachlen in the foreclosure proceedings; nor does it assert that the mesne conveyances thereafter had any effect pertinent to the issues in this ease, except to assign to defendant Lambe’s first mortgage, and his right thereunder as mortgagee in possession.
The decision of the case does not require a discussion of the law regarding the rights of a mortgagee in possession. The doctrine is stated and explained in' 3 Pomeroy Eq., §§ 1189, 1190, and 2 Jones Mtgs., § 715, 716, .and the cases there cited. Lambe, after taking possession of the'land, was entitled to invoke this doctrine to protect his possession unless it appear that the lien of his first mortgage was extinguished or postponed so as to give the judgment lien of the Bolin or second mortgage priority over it.
The evidence did not prove that the deed from Spraeh-len to Lambe was intended as a mortgage. In Weltner v. Thurmond, 17 Wyo. 268, 98 Pac. 590, it is stated that the result of a transaction will not be held a mortgage unless there is proof of the continuance of the debt as a personal obligation of the grantor. Other authorities agree that this is the true test. (1 Jones Mtgs., §§ 265, 267, 269; Conway’s Exrs. v. Alexander, 7 Cranch. 218, 3 L. Ed. 321; McNamara v. Culver, 22 Kans. 661; Carroll v. Tomlinson, 192 Ill. 399, 61 N. E. 484, 85 Am. St. Rep. 344; John R. O’Reilly, Inc., v. Tillman, (Wash.) 191 Pac. 866; Bailey v. Trust Co., 188 Mo. 483.) It is clear there was no intention that the debt of Sprachlen to Lambe should be continued in force after the passing of- the deed, but on the other hand the uncon-tradicted evidence showed the intention that the debt be paid, and therefore, applying the foregoing test, the deed *343cannot be considered a mortgage. When it was stated that Sprachlen had a year to redeem the land, it is evident that the word “redeem” was used in the sense of repurchase. Weltner v. Thurmond, supra. As no one now claims any right under this verbal agreement for repurchase, and the time for its enforcement having elapsed, it is not necessary to inquire into its validity or enforceability.
We have, then, this situation; Lambe, the first mortgagee, took from Sprachlen, his mortgagor, a deed to the mortgaged premises, and as the consideration therefor, agreed that the first mortgage was thereby paid, and that he would pay the second mortgage debt, then in judgment. That is, the amount due on the judgment, being a part of the purchase price, was not' paid but was retained by Lambe, and became immediately due as a primary obligation from him to the second mortgagee, who had become the judgment creditor. Such an agreement to assume a mortgage debt may be by oral promise, and is not within the statute of frauds. (19 R. C. L. pp. 373, 375, 381; 2 Jones Mtgs. § 740; Woodburn v. Harvey, (Kan.) 190. Pac. 620; Goode v. Bryant, 118 Va. 314; 87 S. E. 588.)
This brings us to the question decisive of the case, which is, whether Lambe V first mortgage is still subsisting and retains its priority, or whether it is in reality, though not perhaps in form, extinguished. The question may be considered in connection with the rules concerning merger. It is well established law that, where there are two mortgages upon an estate, and the first mortgagee takes a conveyance of the equity of redemption, his first mortgage will not necessarily be merged, but he may keep it alive against the second mortgage. This rule against merger is invoked when the justice of the case requires it, and to carry out the intention of the parties,- which intention may have been either expressed by their actions, or may be presumed from a consideration of their interests. Its object is to protect the purchaser of the equity of re*344demption from a junior lien which, he is not obligated to pay. (2 Jones Mtgs., § 848; 2 Pomeroy Eq. § 792.) But where, as in this case, the first mortgagee, taking the conveyance of the equity of redemption, agrees to pay the second mortgage, his own mortgage is merged and discharged, so that the junior mortgage takes precedence. This is stated as a general rule in 2 Jones on Mortgages, § 740, on authority of Fowler v. Fay, 62 Ill. 375. The principle is recognized in Brown v. Stead, 5 Sim. 535, 58 Eng. Reprint 439; Grace v. Gill, 136 Mo. App. 186, 116 S. W. 442; Huebsch v. Scheel, 81 Ill. 281; Rogers v. Herron, 92 Ill. 583; Goos v. Goos, 57 Nebr. 294, 77 N. W. 687; and Kneeland v. Moore, 138 Mass. 198. We have not been able to find any authority to the contrary. The cases of Woodward v. Davis, 53 Ia. 694, 6 N. W. 74, and McElhaney v. Shoemaker, 76 Ia. 416, 41 N. W. 53, justify the inference that this rule was there recognized and would have been applied if the evidence had shown a promise by the grantee of the equity of redemption to pay the junior liens. See also Nelson v. Ferris, 30 Mich. 497, similar in theory, but where the right to personal property was in question, and Barry v. Garth Educational Soc. (Ky.) 217 S. W. 674, where it is held that a grantee who had agreed with his grantor to pay a mortgage could not set up, as superior thereto, an- outstanding title which he had acquired.
We are therefore of opinion that the plaintiff was entitled to possession of the land in question by virtue of the legal title acquired by her purchase at the sale on foreclosure of the second mortgage which had become the senior encumbrance upon Lambe’s agreement to pay it. After that agreement, neither Lambe, nor the defendants ¡as his assignee, had any lien upon which to predicate a :right as mortgagee in possession.
The judgment will be reversed, with directions that a judgment be entered for plaintiff for possession of the Hand.
.PotteR, C. J., and Blydbnburgh, J., concur.