This action was brought to recover the sum of $365.82, paid by the appellant to the respondent as treasurer of Cass county to redeem certain parcels of land from sales made for the collection of taxes levied upon the same by the proper authorities of the said county for the year 1882, and for subsequent taxes paid by the purchaser at the sale. The land in question was a portion of the lands granted by the United States to the Northern Pacific Railway Company to aid in the construction of its railway, and at the time the taxes were assessed and levied no part of the cost for surveying, selecting, and conveying the lands had been paid by the railway company or its agents into the treasury of the United States.
At the time the plaintiff made the redemption he was the owner of a valid and subsisting mortgage, covering all the land redeemed; and at the time of making the payment of redemption he served upon the treasurer a written protest, setting forth specifically the facts constituting the invalidity of the taxes, and notifying him that he would at once institute suit against him to recover the amount paid as money paid by an unlawful exaction.
The lands were sold for taxes October 10,1883; the redemption made October 13, 1885, after the purchasers at the sale were entitled to a deed, and when the same was. about to be issued.
To the complaint setting forth the foregoing facts the defendant demurred on two grounds: (1) That there is a defect of parties defendant; (2) that the complaint does not state facts sufficient to constitute a cause of action. The court below sustained the demurrer, and, the plaintiff electing to stand thereon, judgment for costs was awarded the defendant. Prom the order sustaining the demurrer, and from the judgment entered, the plaintiff appeals to this court.
1. The contention of the defendant in support of the first ground of demurrer was, that the county of Cass should have been made the defendant, instead of Burke, its treasurer. This we consider untenable. It seems to be the well settled doctrine of law that, where an action properly lies for the recovery of money paid for illegal taxes, the agent cannot exonerate himself from personal liability by paying it to his principal after he has notice not to pay it over, or where it is paid to him under protest, *482with notice that suit will be instituted to recover it. As holding this doctrine, see Elliott v. Swartwout, 10 Pet. 137; Falkner v. Hunt, 16 Cal. 167; and Meek v. McClure, 49 id. 623.
2. Does the complaint state facts sufficient to constitute a cause of action ?
The assessment and levy of taxes upon this land was unauthorized and void. Railroad Co. v. Traill Co., 115 U. S. 600, 6 Sup. Ct. Rep. 201. The plaintiff had knowledge of this fact at the time he redeemed the lands from sale, and stated the facts constituting the invalidity in his written protest and notice furnished the defendant treasurer. But he claims that such knowledge would not have the effect of making his payment voluntary, for the reason that the record of the assessment and levy, and all the proceedings regarding the sale, were regular and valid upon their face, and consequently bore the appearance of legality ; and that? inasmuch as it would require extraneous evidence to establish their invalidity, sufficient existed to create a cloud upon the owner’s title, and that by paying under protest the necessary amount to redeem, and thus clearing the title, an action to recover the amount paid could be maintained.
Had this action been brought by the owner in fee of the land in question, the contention of the plaintiff would be pertinent, and probably correct. But the difficulty in applying this reasoning to the case at bar arises from the fact that the owner of the fee is not in court. This plaintiff has no title, legal or equitable, to the land in question. He is simply a mortgagee. The taxes levied being void, the deed, had it issued, could not have affected his lien, nor in any degree lessened the value of his security. Should the plaintiff finally succeed to the title of the land, he could maintain a suit to remove any cloud created during his-mortgagor’s ownership ; but until that time, until he has acquired title to the property, and becomes more than a sti’anger, his acts will be construed as voluntary.
It follows, therefore, that, inasmuch as the plaintiff had no interest in the property redeemed by him which could in any manner ' be impaired by the issuance of the deed threatened, such z’edemption was voluntary, notwithstanding his protest, and the demurrer to the complaint was properly sustained. The order and judgment *483appealed from are affirmed.
All the justices concur, except Templeton, J., dissenting, and McConnell, J., not sitting.