The relator -seeks by mandamus to enforce repayment from the treasury of Washington county of money paid by her for the purchase of lands in that county at tax sales made during the period from 1858 to 1862, and also taxes paid by her upon the same lands subsequent to her purchase at tax sale, and extending over the period from 1862 to 1876, inclusive, with interest upon all of such sums at the rate of 10 per cent, per annum. In 1878 the tax sales were duly adjudged to have been void and were annulled, the reason therefor being stated in the judgment. Any objections which might have been raised to the form of the remedy are waived, and it is conceded on the part of the respondent, that the relator is entitled to recover the purchase price paid at -the tax sales, with interest as demanded. As to the taxes paid from 1S62 to 1876, the right of recovery is contested, it being claimed that such right exists only by force of Gen. St. 1878, c. 11, § 97, (as amended by Gen. Laws 1881, c. 10, § 19,) and it seems to have, been claimed in the court below that such act could not operate retroactively, so as to give a right of recovery not before existing, without -violating constitutional guaranties. But, in the brief of the respondent now before us, the point is not distinctly made that that act is unconstitutional, and no allusion *352is made to the statute in force when the tax sales were made, or to the effect of such statute. The case, however, involves questions of such general interest and importance, that we deem it incumbent upon us to consider and decide the questions which are necessarily involved, although they have not been formally raised in the briefs.
The statute in force when the tax sales were made contains this provision, viz.: “If, after the conveyance of any land sold for taxes, it shall be discovered that the sale was invalid, the board of county commissioners shall cause the money paid therefor on the sale, and all subsequent taxes and charges paid thereon by the purchaser or his assigns, to be refunded, with interest on the whole amount at the rate of 7 per cent: per annum, upon the redelivery of the deed to be cancelled.” Rev. St. 1851, c. 12, § 74; Rub. St. 1858, c. 9, § 95. This statute 'remained unaffected by subsequent legislation until 1866, when the legislature, by the general repealing provisions of Gen. St. 1866, c. 122, assumed to repeal that part of the Revised Statutes of 1851 which embraced this provision. We here assume that the statute recited, which was in operation for a period of 15 years, and, so far as we know, without question as to its validity, and which was afterwards followed by other statutes of a like nature, so far as constitutional objections could be involved, was constitutional. State v. Cronkhite, 28 Minn. 197; Fleming v. Roverud, ante, p. 273. By force of this statute the relator was clearly entitled to reimbursement of the taxes paid by her upon the faith of the existing law, and while it was still in force, — that is, from 1862 to 1866, —with interest at the prescribed rate of 7 per cent. Whether 10 per cent, interest is now recoverable upon such taxes will be considered further on.
Did the repeal of this law in 1866 affect the right of the relator to recover, by force of the original act, the taxes paid by her subsequent to such repeal ? There was coupled with the general repealing clause above cited a provision to the effect that such repeal should “not affect any act done or any right accruing, accrued, or established.” Gen. St. 1866, c. 121, § 4. If, by virtue of the prior statute, and her purchase at tax sale while it was in force, the relator had acquired a “right” to continue to pay the taxes as they should be charged upon *353the property, and have reimbursement in the event of the failure of her tax title, then, by the conditions of the repealing act, such case was excepted from its operation, and, so far as necessary to secure such right, the former statute remained in force. The relator did acquire such right. The purchase at the tax sale had the effect of a contract between the state and the purchaser, the terms of which are to be found in the law in force when the sale took place. Hillebert v. Porter, 28 Minn. 496; Fleming v. Roverud, ante, p. 273; Dikeman v. Dikeman, 11 Paige, 484; Robinson v. Howe, 13 Wis. 341; Cooley on Taxation, 370. One of these conditions, having the force of a contract stipulation, was that which we have above recited, relative to the reimbursement of taxes which the purchaser should pay subsequent to the tax sale. This provision is also to be considered in connection with certain other statutory provisions then and ever since in force. By such statutes it was required that taxes be assessed yearly upon all land subject to taxation; the duty rested upon the owner to pay these taxes, and, upon default, the title, whether acquired by tax sale or otherwise, would be defeated by subsequent tax sale or by forfeiture to the state. It was thus a practical necessity that one purchasing at tax sale should, for the protection of his own title, pay the taxes subse_quently assessed upon the property. Presumably every purchaser contemplated this necessity, imposed by the law, when he became a purchaser, but he contemplated also the concurrent protection from ultimate loss, in the event of the failure of his tax title, in the provision for reimbursement of the taxes he would be compelled to pay. 'This right of payment for the protection of his title, and of reimbursement in the event of its failure, were important elements in the contract, and would continue to be valuable to the purchaser so long as the state should continue to levy taxes and enforce payment against the land itself. We are, hence, of the opinion that this right was preserved unaffected by the general repeal of the statute. Madland v. Benland, 24 Minn. 372. For the same reason that the purchase under the prior statute had the effect of a contract, it would have been beyond the constitutional power of the legislature to impair this right of the purchaser by subsequent enactment. See cases *354above cited. The relator is hence entitled to recover the taxes in question, with interest at the rate of 7 per cent.
Can she recover interest at the rate of ten per cent. ? This depends alone upon the provisions of Gen. Laws 1881, c. 10, § 19, amending the statute of 1878. The act has by its terms both a prospective and retrospective operation. It gives the right to the relator to recover 10 per cent, interest upon taxes paid by her from 1862 to 1876, if such legislation is not unconstitutional. The decision in State v. Cronkhite, 28 Minn. 197, in effect supports such right of recovery; but in that case the attention of the court was not invited nor given to the fact that the later act, (1878,) under which a recovery was awarded, provided for a higher rate of interest than was authorized by the statute in force when the tax sale took place. We hence feel at liberty to consider the question, as it is involved in this case, as one not hitherto decided.
The purpose for which the act of 1881 requires the payment of the additional 3 per cent, must be regarded as a private and not a public one. In its prospective operation the act is calculated to secure results in which the state has an interest; that is, it tends to promote the payment of taxes. But, in its retrospective operation, it neither offers an inducement to the paying of taxes, nor accomplishes any possible purpose connected with the administration of public affairs, or in which the state is concerned. It only bestows a gratuitous reward for the past payment of taxes which were due to the state, and the payment of which was no matter of favor to it, or of peculiar merit in the person paying. It neither assumes to impose a penalty, nor to award damages for the withholding of anything previously due. No right of reimbursement existed until 1878, when the relator’s tax title was found to be invalid, nor was any claim or demand made therefor until December, 1881, after the passage of this act. The validity of the act cannot rest upon the principle, which has sometimes been asserted, that the legislature has power to compel municipal corporations to recognize and discharge obligations of a merely equitable or moral nature, although no recovery could have been enforced at law, or in a court of equity. The legislature cannot have contemplated the existence of any such moral obligation towards the *355class of persons who are made the beneficiaries under this act, in its retrospective operation. When they became purchasers at tax sale, and placed themselves under the necessity of paying the taxes which should be thereafter assessed upon the land, they were already provided with statutory guaranties from the state, having the force of a contract, for the reimbursement of such- payments, with interest at the same rate as that prescribed by tlie general law, and which was then deemed by them to be satisfactory; otherwise they would not have voluntarily purchased under such a law. Under these circumstances a law passed subsequent to jfhe payment of taxes, and which reaches backward 20 years in this case, and gives an additional 3 per cent, per year in excess of the statutory contract under which it was paid, was not called for upon any ground of equity or morals. It was a simple gratuity. '
We have, hence, no need to consider what limitations may exist upon the power of the legislature to appropriate money in a county treasury to any public purpose, or to compel taxation for public purposes. The inquiry in this case is narrowed to the question whether the legislature may appropriate money already in the county treasury to a private purpose, in which neither the state nor county has any interest, and in respect to which there exists no obligation, legal or moral, either upon the state or the county; or whether the process of taxation may be resorted to to raise money for such a purpose ? The payment of the additional 3 per’cent., required by this act, must be made in reality either from money in the county treasury not specifically appropriated by law to public- purposes, or by taxation to supply the necessary funds. For, if payment be made from funds in the treasury which are appropriated or required for public purposes, such as the support of the poor, the maintenance of schools, or the construction of roads and bridges, resort must be again had to taxation to replace the moneys needed for such purposes; for the county is not absolved by this act from the discharge of its general public duties. This would be in effect, although indirectly, a resort to taxation for the payment of such demand.
We first consider whether the legislature has power to require such payment to be made from money in the treasury which is not specific*356ally appropriated by law to public purposes. Counties are created and exist primarily for governmental purposes, but, having a legal existence, they are also endowed by law with the capacity to acquire, take, and hold property for their own benefit. Thus, by our statute, counties, which are made bodies corporate, are authorized to purchase and hold real and personal estate for their own use; to receive conveyances of real and personal property, with the same effect as if made to the inhabitants thereof; and such property is to be deemed the property of the county. Gen. St. 1878, c. 8, tit. 2. The proceeds of the sale of unclaimed property in the hands of common carriers, warehousemen, and inn-keepers belong to the county, and are subject to the disposal of the county commissioners. That counties may in many ways become vested with the ownership of property, to be used for their own purposes, cannot be doubted. It may be conceded, for our present purposes, that this ownership of such property is subject to these qualifications, viz.: First, that in reality it is acquired only for public purposes, and that the right to use and dispose of it is correspondingly limited; second, that the legislature, in the exercise of its general control over public affairs, may designate the particular public purpose to which the property so held shall be applied. We know no other possible qualification of the ownership of such property by the county which can affect the power of the legislature over it. Let both these propositions be accepted as true, they suggest no reason for the conclusion that there exists any greater authority in the legislature to appropriate the property to a private purpose than it would possess in respect to the property of an individual. Nor can such power exist. It is inconsistent with ownership in the county. A legislative enactment that the property of a county, acquired and held by it for its own general benefit, shall be gratuitously bestowed upon any person, or class of persons, is not legislation. It has been defined to be a decree under legislative forms. Loan Association v. Topeka, 20 Wall. 655. It is a violation of that provision of the constitution which forbids that any person shall be deprived of property without due process of law. That constitutional security is inherent in a legal ownership of property held *357for the use and benefit of the owner, whether ,the owner be a private citizen, a private corporation, or a municipal body.
Our conclusions as to the capacity of counties to acquire property, and its protection under the constitution from arbitrary legislative interference, are abundantly sustainéd by the authorities. Dartmouth College v. Woodward, 4 Wheat. 518, 694; Inhabitants of Hampshire v. Inhabitants of Franklin, 16 Mass. 76; Atkins v. Town of Randolph, 31 Vt. 226; People v. Batchellor, 53 N. Y. 128; People v. Ingersoll, 58 N. Y. 1; People v. Common Council of Detroit, 28 Mich. 228; County of Richland v. County of Lawrence, 12 Ill. 1; Town of Milwaukee v. City of Milwaukee, 12 Wis. 93, 100; State v. Haben, 22 Wis. 629; Milam Co. v. Bateman, 54 Tex. 153; Grogan v. City of San Francisco, 18 Cal. 590; Cooley, Const. Lim. 238.
Neither had the legislature the power to compel taxation to accomplish the end under consideration, or, what practically leads to the same-result, require payment to be made out of funds in the treasury appropriated by law or required for public purposes. The clause of the constitution, which protects the owner of property in its possession and enjoyment until he shall have been divested of it by due process of law, is not applicable to the subject of taxation. But the power of taxation does not extend to the exacting of contributions from the people for a merely private purpose, unconnected with any duty, moral or legal, on the part- of the state or of the political subdivision upon which the burden is imposed. Such a proceeding would not be taxation at all. Taxation comprehends only the imposition of charges for public purposes. Davidson v. County of Ramsey, 18 Minn. 432, (482;) Sanborn v. County of Rice, 9 Minn. 258, (273;) Loan Association v. Topeka, 20 Wall. 655; Lowell v. City of Boston, 111 Mass. 454; Allen v. Inhabitants of Jay, 60 Me. 124; People v. Mayor of Chicago, 51 Ill. 17; State v. Tappan, 29 Wis. 664; Weismer v. Village of Douglas, 64 N. Y. 91; Cooley on Taxation, 78.
It is unimportant, as affecting the question of the,constitutionality of the law, that the act of 1881 undertakes■ t,o provide.a way of reimbursing the county the sums.which.it may be compelled ,to pay, by charging upon the land as a tax the sum paid. Assuming that, after the tax upon the land had been once paid by the holder of the tax *358deed and the land thereby discharged from the tax under existing laws, the legislature may by subsequent enactment authorize the tax to be again charged upon the land, with 10 per cent, interest, and compel its payment by the owner, still it does not do away with the constitutional objections. Property which the owner is entitled to enjoy and control for his own benefit may not be transferred to another by an act of the legislature, even though it is provided that security shall be afforded for reimbursement. In many of the cases we have cited, provision was made for reimbursement of the sums to be raised by taxation, or for security to the municipality whose credit or bonds were'to be used for private purposes, but it did not affect the result.
The act of 1881 is hence unconstitutional and inoperative, in so far as it assumes to increase the rate of interest which the holders of tax titles may recover during a period prior to its enactment on account of taxes previously paid. Of course, the same principles would apply to the increased interest on the purchase-money paid at tax sale, but upon the stipulation of the parties we will not disturb the result in that particular.
The demand of the relator exceeding the limits of her right, she would not have been entitled to enforce her right by mandamus; but we give effect to the waiver and stipulation of the parties, and remand the case to the district court, with directions to modify the order appealed from, so that interest at the rate of 7 per cent, only shall be computed upon the yearly taxes paid subsequent to the tax sales.