l. estoppel: taxation, eiec I. In both cases it is alleged that certain taxes were levied upon property of the plaintiffs in Westfield township, Fayette Oo., by virtue of an election ^ voters of said township for a railroad tax *327of five per cent in aid of the Davenport and St. Paul Eailroad. It is averred that said tax was illegal and void because said election was held without any registry of the voters as then required by law. The tax was levied and placed upon the tax books for the year 1870. Both plaintiffs paid said tax on the' 28th day of February, 1871. Both then knew that there had been no registry of the voters at the election. They objected to the payment of the tax. The treasurer refused to receive their State and county taxes, without the payment of the railroad tax, and, thereupon, they paid all the taxes appearing upon the tax books against them for that year.
It appears from the evidence in these cases that the railroad was built, and that all of the tax paid in by the tax payers of the township, excepting a merely nominal sum, was paid over by the treasurer of the county to the railroad company upon proper certificates. The last payment was made July 27, 1872. These suits were commenced April 4, 1874. If the plaintiffs be permitted now to recover of the county, the tax payers of the whole county would be required to contribute to such payment. It appears that these plaintiffs both knew of the work on the railroad in the township as it progressed. With this knowledge they paid their tax, and nearly two years after it was all paid over to the railroad company, and after the company became hopelessly insolvent, they commenced their suits to require the county to refund their taxes. We think they should be estopped from asserting any such claim. It would be an act of injustice to require the county to repay this tax now. If these actions had been commenced before the tax was paid over by the treasurer, there would be a propriety in holding that the defendants should order the treasurer to refund, but after it has passed out of the treasurer’s hands upon proper certificates, the county cannot be held liable.
This tax was paid by plaintiffs to the county treasurer for a specific purpose, which was to pay it over to the railroad company upon its complying with the conditions imposed by the statute. It is held in Nefzger v. The Davenport and St. Paul R. Co., 36 Iowa, 642, that the provisions of the reg-*328is try law then in force were mandatory and imperative, and that an. election without a registration of the voters was void. That was an action to restrain the collection of a tax, and not to recover back a tax paid to the treasurer and by him paid over to the railroad company.
Plaintiffs base their right to recover upon Sec. 762, Revision of 1860, and section 870 of the Code. These sections are in substance the same. They provide that where any person shall pay any tax that shall be found erroneous or illegal, the board of supervisors shall direct the treasurer to refund the same to the tax payers.
We think these sections can have no application to the cases at bar, because this special tax has been paid over to the railroad company, and there can be no refunding or re-payment excepting from the funds of the county, in which every tax payer of the county has an interest. The cases of Lauman v. Des Moines County, 29 Iowa, 310; Tallant v. The City of Burlington, 39 Id., 543; Isbell v. Crawford Co., 40 Id., 102, and D. & S. C. R. R. Co. v. Board of Supervisors of Webster Co., 40 Id., 16, are cited as holding that illegal taxes may be recovered under the provisions of the statute above mentioned. The first of the above cases embraced the State, county and other taxes, and the opinion points out how the county could reimburse itself for the repayment.
In Tallant v. The City of Burlington, the city was not the mere trustee or agent by which the tax was collected for the benefit of the State or other public corporation or person. The city assessed the tax for the .purpose of procuring an advantage to itself, through the improvement of a street, and the tax was collected for its own use.
In the case of Isbell v. Crawford County, it does not appear that the tax had been paid over to the school district before the suit to recover it back was commenced.
In the case of D. & S. C. R. R. Co. v. The Board of Supervisors of Webster Co., the plaintiff paid tax upon lands to which it was afterward ascertained it had no title, and the action was to recover back such tax. It was held that as the .tax was legal and not erroneous, there could be no recovery, *329and that the law authorizing a recovery does not contemplate an error by the tax payer as to his title to the property upon which the tax was levied.
These cases, it seems to us, are clearly distinguishable from the cases at bar.
. IT. It is not necessary that we determine whether these actions are in the proper form. We hold that under the facts presented there can be no recovery in any form of action. The judgment of the court below will be affirmed in the first named case, and reversed in the last.