*321The opinion of the court was delivered by
William R. Smith, J.:This was a suit to foreclose a first mortgage on a section of land. The pleadings and agreed facts show that the owners, Gilman and Stewart, executed two mortgages on the property, one for $2500 to a trustee, for the benefit of plaintiff below (plaintiff in error here), and another, subject to the first, to McKinley & Heliker, for $500, with notes corresponding in amounts. The second mortgage was foreclosed and the land sold, subject to the first. C. C. Rush became the purchaser. A sheriff’s deed was executed and delivered to him on November 1,1889. Rush neglected to pay the taxes for the year 1889, which were payable on the day he received his sheriff’s deed. The land was sold by the county treasurer thereafter, in September, 1890, and purchased at a tax sale by one Eyman, who paid the subsequent taxes for the years 1890, 1891, and 1892. A tax deed was executed to him by the county clerk on October 5, 1893. Rush continued to be the owner under his sheriff’s deed until April, 1896, when he sold and conveyed the land to the Alfalfa Irrigation and Land Company, which, in October, 1900, procured from Eyman a quitclaim deed for his title to the property under his tax deed. Thereafter the alfalfa company sold and conveyed to the City Real-estate Trust Company, and the latter deeded to James Bragg in April, 1902.
In this suit to foreclose the first mortgage Bragg and the original mortgagors were made parties. The district court held that the tax deed issued to Eyman on October 5, 1893, conveyed absolute title, and by reason thereof the first-mortgage lien of plaintiff below was lost. All questions arising under the statute of limitations have been removed from the case by agreement of the parties.
In our opinion the court below erred in its conclusion. Rush, the purchaser at the foreclosure sale, took *322all the title the mortgagors had. His position was the same as if he had taken a deed to the land from the owners subject to the first mortgage, which plaintiff sought to foreclose in this suit. In Lee v. Bermingham, 30 Kan. 312, 315, 1 Pac. 73, Mr. Justice Brewer, speaking for the court, said:
“The purchaser at a sheriff’s sale is a purchaser in the same sense as he who makes a voluntary purchase and takes an ordinary conveyance from the party in whom, by the record, the legal title is apparently vested.”
If the rights of the purchaser at the foreclosure sale are to be tested by the rule stated by the learned justice, it is clear that he could not have suffered the taxes on the property to become delinquent and then obtained any advantage from his default against the first mortgage, after taking a deed from the mortgagors transferring the legal title from them to him subject only to the first mortgage. It was the legal duty of the mortgagors, when they owned the land, to pay the taxes, and it was no less incumbent on the purchaser of their title to pay them. It will be noted that under section 7615 of the General Statutes of 1901 all taxes become due on November 1 of each year. Rush received his sheriff’s deed on November 1, 1889, and, neglectful of his legal duty, did not pay the taxes for that year, continuing his default until a tax deed was issued to Eyman. When, after several conveyances, the legal title acquired by Rush at the sheriff’s sale vested in the Alfalfa Irrigation and Land Company it stood in the shoes of Rush, and was chargeable with his default. His neglected duty to pay the taxes cannot be made the foundation for a valid tax title against the first mortgage.
In the case of Waterson v. Devoe, 18 Kan. 223, it was held that the mere relation of mortgagee will not prevent the person so related from acquiring title to the mortgaged premises by purchase at a tax sale. After deciding that Waterson, the mortgagee, was un*323der no legal obligation to pay the taxes, the court said, at page 233:
“Devoe [the mortgagor] was not only under obligation to pay the taxes on the land he owned, but he was under duty to protect the lien, or security, of Water-son, by providing for the payment of the taxes, so that such lien or security should not be destroyed by his default or negligence. It is a well-settled rule of equity, that a party shall not take advantage of his own wrong.”
Rush, after he took title at sheriff’s sale, stood toward Gibson, the first mortgagee, in the same relation that Devoe occupied toward Waterson in the case cited, with the exception that he was not personally liable for the amount of the first mortgage. His land, however, was charged with its payment. (Black, Tax Titles, 2d ed., §278.) In Shrigley v. Black, 66 Kan. 213, 217, 71 Pac. 301, 302, it was said:
“It will not be contradicted that the makers of a mortgage cannot defeat the lien created thereby by the purchase of the premises at tax sale for taxes which they should have paid. We hold that the same rule applies to the grantees of such makers, and that the rights of the grantee in this respect cannot rise higher than those of the grantor.” (See, also, Frank & Darrow v. Arnold et al., 73 Iowa, 370, 35 N. W. 453.)
Section 7616 of the General Statutes of 1901 has no application to conveyances made by the sheriff pursuant to a judicial sale.
The contention that the pleadings did not present to the court below the proposition that a purchase of the Eyman tax title by the alfalfa company was in legal effect a payment of the taxes is not well founded. The district court considered the question as if it had been raised properly, and an examination of the answer and reply satisfies us that their averments justified the court in determining the point.
The judgment of the district court is reversed, with direction to enter judgment in favor of the plaintiffs.
All the Justices concurring.