Corson, P. J.
This case comes before us upon a petition for a rehearing. The opinion is reported in 9 S. D. 341, 69 N. W. 14, and the facts are fully stated in the opinion. The appellant in its petition for a rehearing so confidently insists that the court in its decision departed from the settled adjudications upon the questions discussed that we have re-examined the authorities with great care, and arrived at the conclusion that our decision is not only not against the weight of authority, by is fully sustained by it. The relation sustained by mortgagees to each other and the mortgagor, in regard to the payment oi taxes on the mortgaged property, is thus stated by Mr. Justice Cooley in Insurance Co. v. Bulte, 45 Mich. 113, 7 N. W. 707: “It certainly cannot be said that the second mortgagee owes any duty to the first mortgagee to protect his lien as against tax sales. Neither, on the other hand, does the first mortgagee owe any such duty to the second mortgagee or to the owner. To the state each one of the three may be said to owe the duty to pay the taxes, and the state will sell the interest of all, .if none of the three shall pay. As between themselves, the primary duty is upon the mortgagor; but, if he makes default, either of the mortgagees may pay, and .one of the two must do so, or the *516land will be sold and his lien extinguished.” It would seem to logically follow that when the junior mortgagee’s lien is extinguished by the sale and conveyance of the mortgaged property for a valid tax, the relation of the junior mortgagee to a prior mortgagee and to the mortgagor ceases, and he may deal with a tax title to the property as a stranger, unless he is in possession of the property under a foreclosure of his mortgage or has in some manner obligated himself to pay the taxes. The law, as laid down upon this subject by Mr. Justice Dixon in his concurring opinion in Smith v. Lewis, 20 Wis. 350, seems to be fully sustained by the authorities. That learned judge says: “It will be found on examination of the adjudged'cases, that the turning point in all of them was the obligation of the party setting up the tax title to pay the taxes. If he was under such obligation, either from having been in possession and liable to pay the taxes at the time of assessment, or from their having been properly assessed against him, or by reason of any covenant or promise to the party against whom he claimed the title, the deed in such cases has been held unavailing. It is void because it was obtained in violation of the duty of the person claiming title under it. * * * Lewis was under no obligation to pay the taxes. He was not bound to keep them down, either for his own protection or that of the mortgagor, or of the first mortgagee (Williams v. Townsend, 31 N. Y. 415); and consequently he might under a properly executed deed, have acquired a title valid both as against the mortgagor and first mortgagee, unless there was something in the nature of his purchase at the foreclosure sale which forbade it. ” In that case, the junior mortgagee, being in possession, claiming the equity of redemption, the judge concludes he could not set up his tax title as against the mortgagor. In Waterson v. Devoe, 18 Kan, 223, the supreme court of Kansas, in a well considered opinion by Mr. Justice Horton, in which Mr. Justice Brewer concurred, takes the broad ground that a mortgagee, not being in possession of the mortgaged property, nor under any special *517obligation to pay the taxes, has the right to buy the mortgaged property at tax sale, and assert such title as against a prior mortgagee or the mortgagor; and cites and quotes from Williams v. Townsend, 31 N. Y. 415; Smith v. Lewis, 20 Wis. 369; Chapman v. Mull, 7 Ired. Eq. 292; Walthall v. Rives, 34 Ala. 91; Harrison v. Roberts, 6 Fla. 711. That court bases its decision upon the fact that by the law of Kansas (which is the same in this state) the mortgagee does not take the legal title, but only acquires a lien upon the property, and hence is under no legal obligation to pay the taxes. And that court calls attention to the fact that, in states in which the legal title passes to the mortgagee, the duty is imposed upon such mortgagee, by virtue of his legal ownership of the property, to pay the taxes. But we are not inclined to go to the full extent of the Kansas case, and adhere to our former decision that had Wickem, directly or indirectly, purchased the property at the tax sale, or purchased or contracted for the tax certificate, before his mortgaged lien was extinguished, he would have held his tax title subject to plaintiff’s equity. The evidence, however, was undisputed that Wickem did not, directly nor indirectly, purchase the property at the tax sale, or make any contract in reference thereto, until the tax title had vested in Dillon & Preston, and the mortgage liens were extinguished. The petitioner seems to rely very greatly upon the cases of Horton v. Ingersoll, 13 Mich. 409, and Insurance Co. v. Bulte, supra; but, in the view we take of them, they do not support the petitioner’s position. In the former case the defendant had foreclosed his junior mortgage, and bid in the property, and at the time he took the tax title he still held the equity of redemption. In the latter case the defendant had not only foreclosed its junior mortgage but was in possession of the mortgaged premises when the tax title became vested in it. Both cases come clearly within the rule laid down in Smith v. Lewis, supra. Rehearing denied.
Mr. Justice Haney took no part in the decision.