(After stating the foregoing facts.) While all persons who deal with public officials are chargeable with the limitations imposed by law upon the powers of the officials, and where public money is, contrary to law, paid out by public officials, it may, in a proper suit, be recovered for the public benefit from any person to whom it has been paid, although, when receiving it he may have been in fact ignorant of the illegality of the payment, unless the person receiving the money may in equity and good conscience retain it, and the public can not in equity and good conscience be entitled to its return. Where public money has been paid for services rendered, which were in fact beneficial to the public, although the services were not applied to any purpose for which the public officers paying out the money could have lawfully contracted, yet, where the services were performed by the recipient of the money, and the money was paid to him for the services rendered under a bona fide agreement or arrangement between the officers representing the public and the recipient of the money, and the recipient was in fact ignorant of any illegality in the transaction, and where, by reason of such agreement and the payment and receipt of the money for such services, the recipient of the money failed to collect in whole or in part compensation for the services out of another fund upon which he could have drawn and which had since become exhausted, and where, by reason of the recipient having spent the funds so paid to him, he is placed in a situation where he can not refund the money without a detriment to himself greater than he would have incurred had the payment never been made to him, he, in equity and good conscience, notwithstanding any illegality in the transaction under which he received the money, can retain the funds. See, in this connection, 3 Williston on Contracts, 2812, 2816; Collier v. Perkerson, 31 Ga. 117; Strange v. Franklin, 126 Ga. 715 (55 S. E. 943); Watkins v. Stulb, 23 Ga. App. 181 (98 S. E. 94).
The denial of a right to recover under such circumstances is not predicated upon estoppel on the part of the public (which, under section 303 of the Civil Code, is not estopped by unauthorized acts *163of its agents), but is predicated upon the right of the recipient to retain the money, which he can in equity and good conscience do, and which money the public can not in equity and good conscience retake.
While the public may not be estopped by unauthorized acts of its agents, the public, when seeking a remedy against one who has profited by unauthorized acts of its agents, — as in a suit to recover funds which the defendant has received by virtue of .such unauthorized acts, — carries the burden, and can not recover except upon a right to retake the funds^ superior to the right of the defendant to retain them. The defendant is entitled to have his -rights respected in the situation in which he is found, and his right to retain the funds to which in equity and good conscience he is entitled is at least equal to the right of the plaintiff to repudiate the unauthorized acts of its agents. Where the rights of the plaintiff and the defendant ate equal, the law will leave the parties where it finds them. The right of the individual is as sacred as the right of the public, and the public can not enforce its right to repudiate the unauthorized act of its agents, at the expense of the equal, if not superior right of the individual in equity and good conscience to retain a benefit which he has received by virtue of the unauthorized act of the agents of the public.
The services performed by the solicitor in prosecuting the cases, even if they could not be legally contracted for by the county, were in fact beneficial to the county (Clark v. Reynolds, 136 Ga. 817, 824, 72 S. E. 254), and furnished a consideration for the money paid him by the county; and since, in receiving the payments made, he failed, in so far as the costs accruing to him in these eases were concerned, to participate in the fines and forfeitures fund, and since he has, in reliance upon the arrangement with the county by which these fees were paid to him, received the money and spent it, and therefore can not by restoring it be placed in as advantageous a situation as he would have occupied had he never received the money for his services, and since it does not appear that he acted in bad faith or knowingly participated in an illegal transaction, he can in equity and good conscience retain the money, and the county can not in equity and good conscience recover it, notwithstanding it may have been illegally paid out to the solicitor without authority on the part of the county commissioners to raise *164the money by taxation or to pay it out for the services rendered.
This opinion is not to be construed as holding that the tax levy or the agreement with the solicitor or the payment of the funds to the solicitor were illegal acts or beyond the lawful powers of the commissioners. But assuming, however, that any of these acts were illegal for the reason stated, we hold that under the facts as outlined in the headnote, which appear to be undisputed by the testimony, the judgment rendered for the defendant was as a matter of law demanded.
Under the view which we take of the law, the alleged errors in the admission of evidence need not be passed upon.
Judgment affirmed.
Jenkins, P. J., and Bell, J., concur.