delivered the opinion of the court.
The city, as plaintiff, instituted an action in the court below to recover from the board of county commissioners of Arapahoe county, as defendant, the amount collected by the treasurer of the county from 1877 to 1899, inclusive, as interest or penalties upon delinquent taxes of the city, and paid to the county instead of the city. From a judgment against the county for the aggregate amount of such items for the years mentioned, it brings the case here for review on appeal.
The county pleaded the statute of limitations in bar of all items accruing more than six years prior to the commencement of this action. This plea was not regarded available by the trial court. We shall not discuss or determine the question of the application of the statute of limitations to this case, because it is apparent from the character of the action, the nature of the defenses interposed, the relationship of the county to the city, and the facts fairly inferable from the proof and circumstances, that as to the items to which the plea of the statute was directed, an estoppel in pais was established. The defense of *16equitable estoppel may be asserted against a municipal corporation when the character of the action and the facts and circumstances are such that justice and equity demand the corporation should be estopped. Dillon on Municipal Corporations, 4 ed., § 675; Mouat Lumber Co. v. Denver, 21 Colo., 1; Denver v. Girard, 21 Colo., 447; Board v. City of Lincoln, 81 Ill., 156; Town of Fairplay v. Board, 29 Colo., 57; 67 Pac., 152.
By reference to the city charter it appears the county treasurer is made ex officio the collector of taxes levied by the city upon property within its limits; that he is required to collect these taxes at the same time, and in the same manner, county and state taxes are collected, and shall, each month, pay over to the city treasurer the moneys so by him collected. — Laws 1874, p. 285, sec. 4. There is no liability on the part of the county to the city for the collection of these taxes, nor is the county responsible for the default or neglect of the treasurer to perform the duties imposed upon him by law with respect to city taxes. In short, notwithstanding a statement by counsel for the county which might be construed to the contrary, there is no privity whatever between the city and the county with respect to the taxes of the city, and that so far as the collection of these taxes is concerned, the county treasurer is ex officio the official of the city for this purpose. The action, therefore, can only be maintained upon the theory that the county has received' money belonging to the city which, in equity and good conscience, it should pay to the latter; in fact, counsel for appellee squarely base the right of the city to maintain this action upon that ground. In.the replication filed to the answer, it is asserted that the services performed by the county treasurer which the county sought to recover the value of by counter-claim, were per*17formed by the treasurer as ex officio collector of taxes for the city. They do not direct our attention to any statutes which impose ¿liability on the county to collect or account for such taxes, and in our opinion it is apparent from the statutory provisions on the subject, that while a county official is designated as the person who shall collect the city taxes, he does so solely as the agent and official of the city. It must follow, therefore, as already suggested, that the only theory upon which this action can be maintained is, that the treasurer of the county, instead of paying the interest collected upon delinquent taxes of the city to the treasurer of the latter, paid them over to the county. In other words — the liability of the county does not arise from any trust relations with the city, or from a breach or neglect of any governmental or public duty imposed by law.
Twenty-three years have elapsed between the date the first cause of action accrued and the time this action was commenced. During all that period, or, perhaps more correctly speaking, since 1879, at least, the official of the city charged with the duty of collecting its revenue and accounting to its treasurer therefor has paid these funds to the county. There is no proof whatever of any fraud or collusion between the county and the treasurer. The books and reports of the latter we,re public, and no reason is given why the city during all this long period should not have been, or was not, aware of the action of the treasurer with respect to the penalties and interest now claimed. In fact, it must be inferred from the record, that the money was paid to the county with the knowledge of the city, and yet no demand for its repayment was ever made, until a short time before the commencement of this action. The lapse of time has unquestionably made it difficult, if not impossible, to ascertain with a reasonable degree of cer*18tainty, what amount of these penalties and interest the county may have received1. This is demonstrated from the report of the referees appointed to take an account, from which it appears that counsel for the respective parties, recognizing the difficulty of computing the aggregate of the items involved, stipulated that the amount in controversy might be ascertained by a method of proportion. It appears that the board of county commissioners have from time to time refunded taxpayers the amounts represented by erroneous assessments, and have included in these refunds the tax collected on such amounts for the city; and that it would undoubtedly be a matter of great difficulty to ascertain the sum total of these refunds. Statutes of limitation are intended for the repose and peace of society, and also to guard against the evils resulting from the loss of evidence and the failing memory of witnesses. They are grounded upon equitable considerations. By the positive acts of its own official, without fraud or collusion, or in circumstances which would prevent the city from having full knowledge of his action, money belonging to it has been paid to the county, the aggregate of which is made up of a great number of items. After the lapse of so many years, it is impracticable to determine these items with certainty, or to ascertain what arrangement existed between the parties with respect to these matters, or what sums may have been paid on this account. The action is not to enforce the performance of any governmental or public duty, or liability of the county, and' where, in actions of this character the same equitable reasons exist to estop a municipal corporation from asserting stale claims which obtain in actions at law barred by the statute of limitations, equity, by analogy to the latter, will stay the municipality for the same reasons, and limit it to the same period. — Kelley v. Boettcher, 85 Fed., *1955. For these reasons, it was error to allow any recovery for items accruing more than six years prior to the commencement of the action.
The county also interposed seven specific counter-claims which it sought to offset against the claim of the city. These items were for the value of registration boohs and booths furnished the city, for expenses incurred in advertising and collecting the city taxes, and for refunds of taxes paid out by the county which had theretofore been turned over to the city. None of these items were allowed, because it was held by the trial court that as against taxes, no offset could be pleaded. This question does not arise in the case. While the money the county received which forms the basis of its liability to the city was realized from the collection of penalties and interest upon taxes due the city, the action of the latter is not to recover these sums as revenue, in the hands of the county as such, but the account representing them by virtue of the treasurer having wrongfully paid this money to the county. No fraud or collusion between this official and the county is proved, and the question, therefore, of set-off or counter-claim in revenue matters is not presented. Our civil code provides that in an action arising upon contract any other cause of action also arising upon contract and existing at the commencement of the action, may be pleaded as a defense and counter-claim. — Sections 56-57, Civil Code. The counter-claims pleaded should have been allowed, if established by the testimony, and under the law constituted liabilities of the city to the county. Whether they were so established, or relate to matters which the city must account to the county for, we do not determine, but limit our decision on the question to the one proposition — that there is no revenue question involved in the sense which would preclude the allowance of counter-claims for that reason.
*20In the oral argument it was suggested by counsel for the county, that during the years covered by this action the taxes levied by the city did not bear interest, either before or after they became delinquent, and therefore the city cannot maintain this action. The county cannot raise this question. The treasurer, acting on behalf of the city, collected penalties and interest upon the principal of the taxes due the city, and the money thus realized, even though collected without warrant of law, should have been paid to the city for whose benefit it was received. The treasurer could not refuse to pay this money over to the city, because he was not authorized to collect it. Having paid it to the county, the latter is responsible to the city for the reasons already indicated, because in the absence of a statute directing what disposition shall be made of the penalty and interest collected on delinquent taxes, they follow the principal. Board of Comrs. of Prowers County v. People (Colo. App.), 69 Pac. Rep. 73; Tacoma School District v. Hodges, 13 Wash., 69; State v. Mish, 13 Wash., 302; Board v. Michener, 119 Ind., 473.
The judgment of the district court is reversed, and the cause remanded for a new trial in harmony with the views herein expressed.
Reversed and remanded.