The plaintiff in this action seeks to recover from the defendant the amount of certain moneys erroneously paid the town upon a distribution of certain moneys collected for bank taxes on the stock of a bank located in the city of Tonawanda.
The gomplaint alleges that during the years 1909 to 1913, inclusive, the assessors of the city of Tonawanda assessed the capital stock of the First National Bank of the city of Tonawanda in the manner prescribed by law, and thereafter pursuant to law the board of supervisors of Erie county fixed the amount of taxes payable on said shares of stock in each of said years, and issued their warrant to the county treasurer as prescribed by law, commanding said treasurer to collect said taxes imposed upon said shares of stock; that said taxes so levied were collected for each of said years and secured by the county treasurer; that the board of supervisors of said county thereupon issued each year to the county treasurer their warrant directing him to pay an amount equal to said amount collected, less his commissions of 1 per cent., a certain proportion to the town of Tonawanda and a certain proportion to the city of Tonawanda, specifying the amount so to be paid in each year; that the treasurer, pursuant to .such directions, did pay to the town of Tonawanda the sums specified ‘ that inasmuch as the city of Tonawanda was and is a tax district in and of itself, the town of Tonawanda had and has no legal right to share in the distribution of said money collected for said bank taxes, and that the payments made to said town were unlawfully made “through inadvertence and mistake of law”; that none of those moneys have ever been repaid and the county of Erie demands judgment against said town for the amount of said illegal payments amounting to the sum of $2,522.49, besides interest.
[1] The defendant demurs to the complaint on the ground, first, that the plaintiff has no legal right to sue for the recovery of this amount, in that on the face of the complaint the moneys in question belong to the city of Tonawanda, and not the plaintiff; and, second, that the complaint does not state facts sufficient to constitute a cause of action. The statute providing for the assessing and collecting of taxes on shares of bank stock is section 24 of the Tax Law. Prior to the decision in the case of City of Utica v. Board of Supervisors, 109 App. Div. 189, 95 N. Y. Supp. 839, it was supposed by many that the moneys received from bank taxes were to be distributed as they were in this case, but it was held in the case cited that the city alone was entitled to the bank taxes paid. This case was followed in later cases. City of Buffalo v. County of Erie, 88 Misc. Rep. 596, 151 N. Y. Supp. 409; People ex rel. Village of Cobleskill v. Board *716of Supervisors, 140 App. Div. 769, 126 N. Y. Supp. 259; People ex rel. Lawyer v. Board of Supervisors, 39 Misc. Rep. 162, 79 N. Y. Supp. 145; People ex rel. City of Geneva v. Board of Supervisors, 188 N. Y. 1, 80 N. E. 381.
[2] There remains no question, therefore, but that the city of Tonawanda under the decisions of the court is entitled ultimately to recover payment of the moneys sought to be recovered in this action. The defendant here, however, contends that, inasmuch as it is alleged in substance in the complaint that these moneys were paid the town voluntarily, through inadvertence and mistake of law, they cannot now be recovered back. The general rule of law is stated by Pomeroy in his work on Equity Jurisprudence, and is in these words:
“The doctrine is settled that, in general, a mistake of law pure and simple is not adequate ground for relief. Where a party with knowledge of all the natural facts, and without any special circumstances. giving rise- to an equity in his behalf, enters into a transaction affecting his interests, rights, and liabilities, under an ignorance or error with respect to the law controlling the case, courts will not in general relieve him from the consequences of his mistake.”
See, also, Newburgh Sav. Bank v. Woodbury, 173 N. Y. 55, 65 N. E. 858; Payne v. Witherbee Sherman & Co., 200 N. Y. 572, 93 N. E. 954.
[3] There are, however, exceptions to this general rule, and one of these exceptions arises in cases where unauthorized payments are made or acts are done by municipal or governmental authorities. It has been held repeatedly in well-considered cases that the doqtrine of voluntary payment cannot be invoked by a defendant to enable him to retain money of a municipality illegally paid to him. As was said by the court in Village of Ft. Edward v. Fish, 156 N. Y. 374, 50 N. E. 975 :
“That doctrine applies to individuals who have power to do as they wish with their own, but it does not apply to an agent of a municipal corporation, who pays out its money without power to one who accepts it with knowledge. The statute forbade the payment from the funds of the water board, and action forbidden by statute is void. A void act is no act, and a void payment is no payment. Such a payment is not voluntarily made by the corporation, but by its agent, in excess of his authority, and in defiance of its rights. It is not the act of the corporation itself, but one without authority, who assumed to act for it”—citing People v. Fields, 58 N. Y. 491, 505; Board of Supervisors v. Ellis, 59 N. Y. 620; Lyddy v. Long Island City, 104 N. Y. 218, 10 N. E. 155; People ex rel. Coughlin v. Gleason, 121 N. Y. 631, 25 N. E. 4; Surdam v. Fuller, 31 Hun, 500. See also Wadsworth v. Supervisors, 217 N. Y. 501, 112 N. E. 161; People v. Journal Co., 213 N. Y. 8, 106 N. E. 759.
Cases might be multiplied; it is entirely unnecessary. The distinction in cases of voluntary payments between individuals and municipalities is too well recognized. We must therefore overrule the contention that the payment to the town was in law a voluntary one, and for that reason the moneys secured by it cannot be recovered in this action.
[4] We now address ourselves to the further ground of demurrer urged by the defendant town that the plaintiff has no legal capacity to maintain this action, for the reason that the moneys sought to be *717recovered are the property of the city of Tonawanda, and not of the county of Erie, and therefore the action should be prosecuted by the real party in interest, and not by this plaintiff. It would seem that, under the provisions of the Tax Taw relating to the taxation of bank shares, the county in a certain sense acts as the collecting agent of the taxes assessed and paid, and when paid holds the moneys collected in trust for the benefit of those to whom they should go under the provisions of the act. The county treasurer acts as the custodian of the funds for the county and pays them out upon the warrant or order of the board of supervisors to the political subdivisions to whom they become payable. A failure to make the proper distribution and payment according to law renders the county liable to these political subdivisions which have a right to claim the same. These provisions show that until the proper distribution has been determined, and the proper warrants or orders for their payment have been made, the county is in legal effect rightfully entitled to the possession and control of the hank taxes paid, and in effect holds them in trust for the parties ultimately entitled to them. We are unable to discover any good or sufficient reason why, in case the county by any means is wrongfully deprived of these moneys, it cannot recover the same from those receiving the funds, to the end that it may carry out the purposes and directions of the statute. Suppose the county treasurer, without commingling these hank tax moneys with the general funds o E the county, had misappropriated the moneys and converted them to his own use; can there be a question that the county could maintain an action against the treasurer and his official bondsmen to recover the moneys so misappropriated? This principle applies equally where the moneys have been illegally paid out by the county agents, as where the agent or servant has feloniously misappropriated the funds. In other words, the county has the right to follow the funds into the hands of those illegally receiving them. The county remains liable to the political subdivision entitled to the moneys on a proper distribution, and in all justice it ought in turn to have the right of recovery against those wrongfully and illegally receiving those funds.
We think the county had such a special interest in the fund that it can maintain this action. The case presented, it seems to us, is not altogether unanalogous to the relation existing between a bank and those having funds on deposit with it. In a certain sense it is said the money deposited belongs to and is the property of the depositor; nevertheless in legal effect the funds deposited are commingled with the general funds of the bank, and the depositor has simply a right of action against the bank if it fail to pay when requested. When the bank taxes are recovered by the county, I do not think it was the purpose or requirement of the statute that the county should keep the particular moneys intact, separate and distinct from all other moneys in the hands of the county treasurer. It would seem that he would meet every requirement of law if he should deposit them in a bank with other moneys to his credit as county treasurer and be prepared to meet and honor the orders or warrants of the board of supervisors when a determination had been reached by that board as to the proper division and distribution of the bank taxes received.
*718If this view be correct, it disposes of the contentions of the defendant. The county was the technical owner of the fund, holding it as trustee and charged with the duty of properly distributing it to others entitled ultimately to receive it pursuant to the direction of the statute. Thus the county became and remained the real party in interest, and the one entitled and obligated to bring and prosecute this action. These considerations clearly distinguish this case from that of People of New York v. Ingersoll, 58 N. Y. 1, 17 Am. Rep. 178.
I am therefore of the opinion that the defendant’s demurrer must be overruled, with costs, with the right of said defendant to answer within 20 days after service of the interlocutory judgment to be entered hereon and the payment of the costs taxed. So ordered.