The controlling questions in this cause are two, and these: If there are two deeds of trust on the same piece of land, executed by the same debtor to different parties on different dates, and a sale occurs under the first deed of trust, and an agent of the holder of the first deed and notes bids in the property for the amount of the debt, paying no money on his bid, and afterwards quitclaims to the holder of the second debt and deed, who pays in installments the full amount of such debt to such agent, who pays the same over to his principal, and such purchase is made by the junior lienor in order to protect his lien, and it afterwards turns out that such salé under the first deed of trust is defective by reason whereof no title passed thereby, can the purchaser from the agent be subrogated to the rights of the holder of the first incumbrance, and be entitled to foreclose that deed against the common debtor?
Second, if after such purchase by the junior lienor, and after taking possession by virtue of legal proceedings, he proceeds to sell under his own incumbrance, bids in the property and receives a deed which passes to him the legal title, and such sale occurs pending former litigation between the purchaser who now seeks subrogation and the common debtor, is the purchaser *16under the second deed entitled to the subrogation he seeks while he still retains the legal title and possession acquired under the second deed of trust, and yet desires to foreclose only as to the first deed of trust!
The court below took the view that the purchaser was entitled as indicated in the second question, and struck out a portion of the defendant’s answer which interposed the second deed, sale and possession taken thereunder as a bar to subrogation and foreclosure under the first debt and deed, and rendered a decree accordingly, from which the defendant appeals.
. I. The plaintiff, in this cause, as shown by the pleadings and admissions, occupies the anomalous attitude of holding possession of the mortgaged premises under a legal title duly acquired by virtue of a sale under the second or “Howerton” deed of trust, while at the same time seeking by means of the equitable right of subrogation to foreclose the first deed of trust, and the debt thereby secured, upon land which he alleges that he bought in good faith in order to protect his prior lien. In other words, being the absolute legal owner under the second deed of trust, he seeks to occupy the attitude of the mortgagee of the same premises, and to compel the defendant out of whom all title was divested by such sale to occupy the position of mortgagor. This he cannot do. A party will not be permitted to occupy inconsistent positions in court. Bigelow on Estoppel [5 Ed.] 717, et seq.; Brown v. Bowen, 90 Mo. 184.
If plaintiff is the legal owner of the premises, he has no occasion to come into a court of equity, and no right to come into a court of equity to foreclose an equity of redemption in the defendant which no longer exists. Besides, the rights of foreclosure and of redemption are reciprocal. 2 Jones on Mortgages *17[4 Ed.] sec. 1146. If one right exists, so does the other; if one is gone, so is the other.
- Now it is clear that if the defendant should choose to exercise the right of redemption, he could only do so by payment of the entire debt, and this is a condition precedent to redemption; and what is true of the original mortgage debt, is also true of a prior incumbrance which the holder of the original mortgage has paid for the benefit of the estate. In order to redeem then, the mortgagor must add the amount so paid to the mortgage debt, not only because the estate is benefited to that amount, but because by paying such incumbrance the holder of the mortgage is subrogated to the claim, and holds it as a charge on the property as much as he does the mortgage on which he has direct title. 2 Jones on Mortgages [4 Ed.] sec. 1070.
If then the defendant in this cause could not redeem without paying the sum total of indebtedness as aforesaid, neither could the mortgagee/oreeiose without foreclosing as to the whole amount due. Eor these reasons, that portion of the defendant’s answer which made claim in accordance with the foregoing views should not have been stricken out on plaintiff’s motion.
II. The law is well settled that an ineffectual or defective sale, though it pass not the legal title to the purchaser, operates as an assignment of the mortgage to the purchaser if he has paid the purchase money, and it has been applied to the payment of the mortgage debt. 1 Jones on Mortgages [4 Ed.] sec. 812.
And when one who is entitled to redeem pays a mortgage, who is under no obligation to pay it, although he takes no formal assignment of it, he thereby becomes subrogated to the rights of the mortgagee, and no proof is requisite to show intention to keep the mortgage alive, in order that he should have the *18benefit of the mortgage. 1 Jones on Mortgages [4 Ed.] sec. 877.
In like manner the same rule bolds where a mortgagee in order to bis own protection is forced to pay tbe amount of a prior mortgage on tbe property; and tbis is true though be take no assignment of tbe mortgage, and it is discharged of record. And in such case when tbe debtor sues to redeem tbe junior lienor is held entitled to be reimbursed for tbe amount so paid. 1 Jones on Mortgages [4 Ed.] sec. 878.
Subrogation in such instances arises by operation of law, and is said to rest on a basis of equity or benevolence, and is resorted to for tbe purpose of doing justice between tbe parties. 1 Jones on Mortgages [4 Ed.] sec. 874; Clark v. Wilson, 56 Miss. 753, and cases cited; Sheldon on Subrogation, secs. 12, 14, 18, 30, 45, 240; Ryer v. Gass, 130 Mass. 227, and cases cited. See also other cases from our reports, cited by plaintiff’s counsel.
III. On tbe return of tbis cause to tbe lower court, tbe plaintiff will be allowed to proceed with bis foreclosure, provided be include within its scope tbe whole indebtedness due from tbe defendant, and shall open tbe sale heretofore made by him under tbe second or “Howerton” deed of trust, and shall be treated in all respects as a mortgagee in possession.
Decree reversed and cause remanded.
All concur.