Seevers, J.
In March, 1875, one Thompson was the owner of certain real estate consisting of eighty acres, and he executed a mortgage thereon to Yandercook. A portion of the premises so mortgaged was the homestead of said Thompson. In 1877 one Hodges recovered certain judgments against Thompson, which have been assigned to and are the property of the plaintiff. In 1879 the mortgage was fore-closéd, and on June 2, 1879, the mortgaged premises were sold; and, when the statutory period of redemption had expired, the sheriff conveyed the premises to Yandercook, and the defendant claims under him. Neither the plaintiff nor Hodges was made a party7 to said foreclosure proceeding, and the homestead of said Thompson was not platted by any one prior to the sale by the sheriff under the foreclosure proceeding, and the whole of the mortgaged premises, including the homestead, were sold together. At the time the action to foreclose the mortgage was commenced, and until March, 1880, Thompson was in possession of said premises, and he, at the last-named period, surrendered such possession to Yan-dercook, and abandoned his homestead.
I. That the mortgage was the prior lien on the whole of the premises in controversy7, including the homestead of Thompson, is conceded, and the plaintiff claims that his judgments were also a lien on said premises. But is this true as to the homestead, and, if so, when did the lien attach? The indebtedness upon which the judgments were obtained accrued after the acquisition of the homestead, and therefore did not become liens thereon prior to the time such homestead ceased to exist, and it continued to exist until it was abandoned in March, 1880. As the action to foreclose was *234commenced in April, 1879, tbe judgments were not liens on the homestead at that time. This being so, it was not necessary to make the holder of such judgment a party to the action to foreclose the mortgage, for the reason that he was not a junior lienholder. The sale under the foreclosure took place in June, 1879, and the abandonment of the homestead by Thompson took place in March, 1880, or about nine months after the sale. Therefore, the first time the judgments became liens on the homestead was when it ceased to be such; and, as Yandereook was not required to make the holder of said judgments a party to the foreclosure proceedings, it seems to us that the plaintiff, if he was entitled thereto at that time, must redeem from the sale unde;’ the statute,— that is, within nine months from the sale; if this be not true, he must redeem within nine months from the time his lien accrued; and that in no event can he go into equity and redeem, but that such right is purely statutory. This, it seems to us, must be so, for the reason that the jjlaintiff was not a proper or necessary party to the foreclosure proceedings. These views are, we think, sustained by Grant v. Parsons, 67 Iowa, 31. The court held that the plaintiff was not entitled to redeem the homestead portion of the land; and, as we understand, the plaintiff claims that, in so holding, the court erred; but we think otherwise, and this disposes substantially of the plaintiff’s appeal.-
II. The right of plaintiff to redeem was in no respect enlarged or diminished by the failure to plat the homestead, but it is provided by the statute that the homestead shall not be sold except to supply any deficiency remaining after exhausting the other property pledged for the payment of the debt. (Code, § 1993.) The plain tiff, at the time of thesale, hadalien on the land other than the homestead. It was, however, primarily liable for the payment of the mortgage, and it might have been first sold and exhausted, and the plaintiff could not justly complain except that, as to such portion of the land, he could bring an action in equity to redeem. As *235the land was not so sold, but was sold altogether, the court thought the value of the homestead at the time of the sale should be deducted from the amount bid for the whole tract, and the plaintiff allowed to redeem the residue on the payment of the balance of the bid, with interest and taxes; subject, however, to an allowance to one party for permanent improvements, and to the other party of rents and profits. As the premises were sold altogether instead of separately, we think the plaintiff should not be required to pay the whole mortgage in order to redeem that portion of the land not included in the homestead. And, as the homestead has been in fact appropriated or sold, and the proceeds applied in payment of the mortgage, it seems to us that the plaintiff has the right to have the value of the homestead, at the time of the sale, credited as a payment on the mortgage, and that he has the right to redeem the residue of the land upon payment of the balance due on the mortgage; and this we understand to be the view of the circuit court, and therefore the judgment of that court, on both appeals, is
AFFIRMED.