Counsel in argument concede that the case presents here but a single question, — the statute of limitations. The facts are before us, as found by the court below, and were evidently found with reference to the several issues presented by the pleadings, but, for the purpose of the question before us, they may be very much abridged, and they are as follows:
*471In 1881 the township of Newton voted taxes to aid in the construction of the New Sharon, Coal Yalley & Eastern Railroad. The taxes were levied, and those in controversy paid to the treasurer of' Jasper county, who is a defendant herein. The particular taxes in question were paid by the plaintiff, F. T. Campbell and J. H. Hiatt; the claims of Campbell and Hiatt being before the commencement of this suit assigned to the plaintiff. The payment of the tax by plaintiff was, May 8, 1883, $52.89; that by Campbell, February 28, 1883, $99.38; and that by Hiatt, February 28, 1883, $29. In March, 1883, the plaintiff ’ s assignors and others commenced a suit in the circuit court of Jasper county against the railroad company and others, to test the legality of the tax as voted and levied, and in July, 1884, such tax was declared illegal and void, and such decree was afterwards affirmed in this court. Thereafter, in August, 1885, the plaintiff and his assignors petitioned the defendant board for an order on defendant treasurer for a repayment of the illegal taxes so paid, which petition was refused by said board. The case at bar was commenced on the twenty-seventh day of July, 1887.
*4721. Kai: payment: limitation of *471The provision of the statute under which it is claimed this action is barred is a part of section 2529 of the Code, and reads as follows: “The following actions may be brought within the times herein limited, respectively, after their causes accrue, and not afterwards, except when otherwise specially provided: * * * (3) Those against the sheriff or other public officer, growing out of liability incurred by the doing of an act in an official capacity, or by the omission of an official duty, including the non-payment of money collected on execution, within three years.” This action is evidently founded upon the failure of the defendants, as officers, to perform an official duty; for it seeks an order requiring them to perform such a duty. Appellant’s contention in the case is that the defendant treasurer, in collecting and disbursing the taxes so voted, is in legal contemplation a trustee of an express trust, and that the provisions of the statute, as quoted, are not applicable in *472such a case. We have found no adjudicated case, to use the familiar expression, “on all fours” with this. In making distinctions which necessarily arise, it is highly important to keep in view the facts upon which each ruling is announced. This court has repeatedly held that, where illegal taxes are paid, as to an action for their recoverv, the statute of limitations begins to run from the time of payment. Hamilton v. City of Dubuque, 50 Iowa, 213; Scott v. County of Chickasaw, 53 Iowa, 47; Callanan v. County of Madison, 45 Iowa, 561. These are all cases in which the taxes collected were for governmental purposes, and for which the county was liable under the provisions of the Code, section 870, or a city for taxes illegally collected by it. The liability in these cases in no manner depended upon whether or not the money collected has been paid out.
2 __. .naM of railroads: county treasureristrustee, Where money is paid in under the provisions of the law for voting taxes in aid of the construction of railroads, it has been held that such money jn the hands of the treasurer is a “ trust fum^” and that the tax-payer and the railroad company are both beneficiaries. Des Moines & M. Ry. Co. v. Lowry, 51 Iowa, 486. It is said that the language in that case is dictum, and not authority. However that may be, the question properly arises here, and we think the doctrine announced sound on principle. A reference to the law devolving upon the officers of the county the duty of collecting these taxes shows that neither the county nor the officers have any interest whatever in the funds so collected, but that the officers are mere agents to aid the township or municipality and the railroad company in carrying out their contracts. We have held that the law making counties liable for taxes illegally collected has no application in cases of this kind, where the fund^ have been paid over; and the holding rests upon this distinction of a trust or agency. In Butler v. Board, 46 Iowa, 326, this doctrine of trust or agency is inferentially, if not expressly, announced. The judge, in delivering the opinion in Tallant v. City *473of Burlington, 39 Iowa, 543, said: “ The city was not a mere trustee or agent by which the tax was collected for the benefit of a * '* * public corporation or a person.” It maybe said that all officers of counties are agents, and wherein they hold funds they are in trust, which is undoubtedly true, but the liability of such agents or trustees depends upon the character of the agency or trust. We attach less importance to the name than to the true character, and yet the name aids the legal mind much to understand the relationship. With the relationship established, does it in any manner affect the operation of the statute of limitations ? We think it should. Beecher v. County of Clay, 52 Iowa, 140, is cited by appellees with much apparent confidence, and we think it the strongest case in their favor. It was a mandamus proceeding to compel the board of supervisors to order the refunding of the taxes illegally levied. The taxes were paid in 1873, and the demand made upon the board to refund in June, 1878, and the action commenced thereafter. The court states the question in the case as follows: “Can the plaintiff, by neglecting to demand of the board an order for the refunding of the taxes, delay the running of the statute of limitations ? ” The opinion negatives the proposition, and takes for its support a quotation from Prescott v. Gonser, 34 Iowa, 175, which holds that the action of mandamus cannot be maintained until there has been a refusal to perform the act sought to be enforced, and that a party may not stop the running of the statute by neglecting to make the demand. It also uses this language: “It is certainly not the policy of the law to permit a party against whom the statute runs to defeat its operation by neglecting to do an act which devolves upon him, in order to perfect his remedy against another.” It must be conceded that these holdings are based upon the theory that a party must not neglect to do that which of right he ought to do, and which if done would be of avail to him. Let us look at the particular facts in this case. At the time these taxes were paid a suit was pending between the parties in interest to test the *474validity of this tax. These were the only parties having any interest in the money held by the treasurer. Suppose a demand had then been made for an order for the return of the money, and on refusal this suit had been instituted. Upon a mere suggestion of the fact, the court would postpone a hearing until a final determination of the suit between the parties in interest, and it would be reasonably expected that with such determination no-further hearing would be necessary; and, if the court did allow it to proceed, it should not do it without the other party in interest being interpleaded, and the same issues would be involved on the two suits. This the law does not require.
3 _._. sSqSlit validity? re-n" tation7 of™ otlon' The commencement of the suit against the railroad company was the commencement of a suit to recover this money, in its effect, and the law did not require the plaintiff to suppose that a disinterested party, whose only right to retain the money was to know where the law would place it, ever might refuse to surrender it. So far as the validity of the tax is concerned, the adjudication between the tax-payer and railroad company is conclusive. We may in reason say that, after the commencement of the suit against the company to test the validity of the tax, the right to successfully prosecute this suit was contingent upon that. Practically it must await the result. In principle it is not materially different from cases where one in good faith pays taxes, and the land is afterwards adjudged to belong to another. His right to recover the taxes so paid is contingent upon the suit which settles the title, and in such cases the statute does not run until the question of title is settled. Goodnow v. Stryker, 62 Iowa, 221; Same v. Litchfield, 63 Iowa, 275, and other cases cited. While in all respects these cases and the one at bar are not alike, the principle in this respect seems to be the same. The defendants, being entirely disinterested, and merely holding the money for the party entitled thereto, would be presumed to be willing to abide the result of the litigation between the *475parties, and pay the money to the party adjudged entitled to it, and we think the law implies a promise to do so. Hence we think the statute of limitations did not commence to run before the final judgment in the suit against the company, if at that time. See Hintrager v. Richter, 76 Iowa, 406. With this holding the action is not barred, and the cause is reversed, and remanded to the district court for further proceedings not inconsistent with this opinion.
Reversed and Remanded.