The plaintiff purchased and received a deed of certain premises, being a block of land in the city of Stillwater. The title of her grantor was obtained under a foreclosure sale, which, at the time of such purchase, though apparently valid and sufficient to pass the title, was in fact void on account of matter dehors the record, and entirely unknown to the plaintiff; and it appears to have been so adjudged. Coles v. Yorks, 28 Minn. 464, (10 N. W. Rep. 775.) Before the discovery of the defect in her title, and while she, in good faith, believed herself the absolute owner of. the property by virtue of the foreclosure proceedings, she ascertained that the premises were charged with a large amount of taxes for the years 1862 and 1880, *126and all intervening years, except the year 1873, amounting in all to upwards of $1,300, and which were at the time understood and believed by the plaintiff to be a valid lien upon the land. It having subsequently been found that the foreclosure was invalid and insufficient to pass the title, plaintiff procured a formal assignment of the original mortgage and the indebtedness thereby secured, and thereupon proceeded to reforeclose the same by action, in which the plaintiff set up the fact of the payment of such taxes, and claimed to tack the amount thereof to the amount due upon the mortgage, and to enforce the lien thereof against the property. The block of land in question included the homestead premises of the mortgagors, in respect to which the mortgage and original foreclosure were held invalid. A reforeclosure, therefore, became necessary. The court, upon issues joined and a trial thereon, adjudged the mortgage a lien upon the balance of the block after the homestead was set off, and ordered a foreclosure accordingly; but denied the plaintiff’s claim for the taxes so paid, holding and determining that the plaintiff was not entitled to have such taxes adjudged a lien on the premises, on the ground of irregularities and defects in the tax proceedings; and judgment was rendered in conformity with such findings.
By an act of the legislature approved March 9,1885, (Laws 1885, c. 261,) it is provided and enacted as follows: “Whenever money has been paid, or hereafter shall be paid, for taxes on any land, by a person who holds a mortgage on such land, or who, in good faith, believes himself to be the owner of such land under a mortgage foreclosure, which foreclosure has been, or hereafter shall be, declared void, the money so paid, with interest from the date of such payment at the rate of seven per cent, per annum, shall be refunded to such person, his executors, administrators, or assigns, whenever such taxes have been, or hereafter shall be, adjudged void in an action for the foreclosure or reforeclosure of such mortgage.” Section 2 provides for the payment of the same by the county treasurer on the order of the county commissioners, and for a reassessment of such taxes upon the lands; and section 3 requires that the moneys so refunded shall be charged to the various taxing districts in the proportion shared by them in the amount originally paid.
*127And thereafter the plaintiff presented to the defendants, commissioners of Washington county, the proofs of her claim under the act just recited, including the proof of the payment of the taxes and record of the judgment denying her relief therefor against the land on the ground stated. Their refusal to allow such claim resulted in this action.
The plaintiff insists that this case falls within the provisions of the act in question. She also claims that, independently of the statute, she is entitled to recover for money had and received, which, under the circumstances, the defendants in equity and good conscience ought not to retain. But this statute provides for an apportionment of the burden of the reimbursement of such taxes, and for a reassessment. It is therefore important that it should be construed, and its effect and validity determined, as respects the rights of the county in the premises.
1. The statute is a remedial one, and, by its terms, is intended to be retroactive. The language, as will be observed, is: “ Whenever money has been paid, or hereafter shall be paid, for taxes,” etc.; and “whenever such taxes have been, or hereafter shall be, adjudged void, ” etc. In this respect the language and purpose of the act resemble that construed by this court in State v. Cronkhite, 28 Minn. 197, (9 N. W. Rep. 681.)
2. No substantial objections can be urged against the constitutional right of the law-making power to enact statutes of this kind. It is a question of policy, of the wisdom of which the legislature is, within certain limits, exclusively to judge. In Town of Guilford v. Supervisors, 13 N. Y. 143, the court say: “The legislature is not confined in its appropriation of the public moneys, or of the sums to be raised by taxation, in favor of individuals, to cases in which a legal demand exists against the state. It can thus recognize claims founded in equity and justice, in the largest sense of these terms.” Cooley, Const. Lim. *226, *230. Town of Guilford v. Cornell, 18 Barb. 615, 640. See Blanding v. Burr, 13 Cal. 343, 351, and eases cited.
In State v. Cronkhite, supra, the statute under consideration related to the reimbursement of purchasers where tax sales are adjudged void, and it was there held that “when a tax sale has been declared *128void, a moral, if not a legal, obligation arises to refund the purchaser’s money.” Such obligation is sufficient to support retroactive legislation. Indeed, the rule stated is specially applicable to such legislation, because, as respects future transactions, purchases or payments must be presumed to have been made in reliance upon the conditions in the existing statutes. Fleming v. Roverud, 30 Minn. 273, (15 N. W. Rep. 119.) But the class of cases provided for by the act in question presents as strong claims for legislative recognition as the case of purchasers at tax sales. It appears to be the policy of the state to encourage the payment of taxes by lienholders. Gen. St. 1878, c. 11, § 104. The mortgagee pays on the faith of securing a lien, just as the tax purchaser pays on the faith of securing a lien or title, the primary obligation to keep down the taxes resting upon the land-owner. But unless a mortgagee is able to enforce his lien against the land for taxes paid by him thereon, he must lose the same unless voluntarily refunded by the land-owner; and it is clearly within the legislative discretion to provide for a return to him of such taxes by the county where paid, and for a reassessment upon the land chargeable therewith, when his lien therefor cannot be enforced because they are found to be invalid. State v. Cronkhite, supra; County of Olmsted v. Barber, 31 Minn. 256, (17 N. W. Rep. 473.) And so, also, we think the position of one claiming title under a foreclosure sale, and paying taxes under the belief that such sale is valid, but which turns out to be void, is equally favorable; for in such case he may be treated as an equitable assignee who has succeeded to the rights of the mortgagee, (Johnson v. Sandhoff, 30 Minn. 197; 14 N. W. Rep. 889,) and as having paid taxes upon lands of another under an honest mistake of fact in respect to the title and his relation thereto.
There can be no substantial distinction between the case of a tax purchaser and the case at bar. A tax purchaser is not a bona fide purchaser, in the strict and proper legal sense. The rule caveat emptor applies to him, and he takes all the risks of his purchase. Cooley, Tax’n, *329, 375, (2nd Ed. 475.) Such purchaser is authorized by statute to pay and add to the amount of his bid subsequent delinquent taxes, and statutory provisions for reimbursement are some*129times made to include such taxes also. As to such taxes he is placed on the same footing as other lienholders; but a remedial and retroactive statute which provides for the repayment of the purchase price, together with taxes subsequently paid, would hardly be held valid as to the former and invalid as to the latter. We think no such distinction can be made, but the claims are equally just and equitable in their character; and if the lienholder, in good faith, pays such taxes by the authority of the state, and the lien therefor fails through the invalidity of the tax proceedings, he has a claim founded in justice and good conscience, which the legislature may recognize by providing for reimbursement, and at the same time justice may be done to the state by providing for a reassessment, so that the property may not escape its just proportion of the public burdens. County of Olmsted v. Barber, 31 Minn. 256, (17 N. W. Rep. 473.)
The ease of State v. Foley, 30 Minn. 350, (15 N. W. Rep. 375,) is not in conflict with these views. It was there held that legislation providing for an increased rate of interest upon sums paid by purchasers at tax sales, under statutes previously existing and providing for reimbursement for taxes declared invalid, and which statutes were therefore to be considered as entering into and forming part of the contracts of purchase, was not supported by any moral or legal claim or duty. The case is manifestly distinguishable from the case at bar.
Taxes paid by a mortgagee, and to which the statute in question is intended to refer, may be “adjudged void” on account of irregularities or omissions of the officers who conduct the proceedings, and which are invalid and cannot be enforced for such cause. In the action to foreclose the mortgage in question, the court did not, in terms, declare the taxes paid by the plaintiff to be void, but we think the findings and judgment of the court are sufficient to bring the ease fairly within the provisions of the statute. The case before the court involved the determination of the question, and the court finds the existence of certain irregularities and defects in the proceedings, and, as a result and legal conclusion therefrom, determines that the plaintiff is not entitled to have such taxes adjudged alien upon the premises. This means that because of such defects the mortgagee was deprived of the benefit of the statutory lien for the taxes paid by him, *130■which was necessarily equivalent to holding them invalid. We think, though the findings are somewhat informal, that the judgment is sufficient to bring this ease within the class for which the statute in question was intended to afford a remedy.
The propriety of the provisions of the act requiring the reimbursement to be made directly by the county does not seem to be questioned by the respondent. This question was considered, and the validity of such legislation sustained, in State v. Cronkhite, supra. It will be remembered, also, that in this act special provision is made for apportioning the burden of such reimbursement among the proper political subdivisions to which the taxes had been previously distributed. We hold, therefore, that the plaintiff is entitled to recover under the statute.
This disposition of the case renders it unnecessary to consider any other grounds upon which plaintiff bases a right of recovery.
Order reversed.