During the years 1911, 1912, 1915 and 1916 respondent was assessor of Kootenai county. He did not *344hold that office in 1913 and 1914. His salary for the third quarter of 1916 amounted to $450, for which, together with $14.40 expended by him in performing his official duties, he filed claims, which were disallowed by the board of county commissioners. This action was commenced to recover the amounts so claimed.
The county filed an answer and cross-complaint wherein it is alleged, among other matters, in substance: 1. That in 1911 and 1912 respondent collected taxes on personal property (the amount collected each month being specified), and that he did not report such collections to the county auditor and pay the money to the county treasurer on the first Monday of the month next after its collection, nor, in case of the moneys so collected in 1911, until March 4, 1912, and in case of the moneys so collected in 1912, until February 1, 1913, and that respondent thereby became indebted to appellant in a sum equal to interest on the money so retained by him at the rate of 7 per cent per annum for the time it was retained, amounting to $451.22 for 1911, and $181.37 for 1912; 2. That during the year 1911 respondent collected $3,719.21 as taxes on personal property and accounted for and paid to the treasurer of Kootenai county only $2,539.48 thereof, and that he failed, neglected and refused to pay the balance of the amount collected, being the sum of $1,179.73; also that during the year 1912 he collected $3,401.08, as taxes on personal property, and accounted for and paid over only $2,397.95 thereof, and that he failed, neglected and refused to pay the balance of the amount collected, being the sum of $1,003.13; 3. That during the years 1911 and 1912 respondent assessed certain personal property, and, in violation of the law and of his duty as assessor, failed to make the proper entries upon the records so that the taxes thereon would become a lien upon the real property of the owners thereof; that the same has never been accounted .for or paid to appellant, and that because of such failure and neglect of duty there became due to it from respondent $1,171.92 for 1911 and $447.38 for 1912.
*345Respondent denied the allegations of the cross-complaint and alleged that the cause of action therein stated was barred by Rev. Codes (now C. L.), sec. 4054, subd. 1.
At the trial, which was to the court without a jury, respondent introduced evidence tending to prove the allegations of his complaint and rested. Appellant offered proof tending to sustain the allegations of its answer and cross-complaint, to which objections, on the ground that all the items thereof were barred by the statute above cited, were sustained.
The court made findings of fact, among which are that the affirmative answer and the pross-complaint do not state facts sufficient to constitute a defense or counterclaim or cause of cross-complaint against respondent, in that all of the demands and claims therein stated are barred by C. L., sec. 4054, subd. 1. Judgment was for the plaintiff, and the defendant has appealed.
C. L., sec. 4054, subd. 1, prescribes three years as the period of limitation for commencing an action upon a liability created by statute, other than a penalty or forfeiture. Rev. Codes, sec. 1813, in force during 1911 and 1912, provided that the assessor should be liable to the county for the amount of taxes on personal property assessed by him and not collected as provided by law. That appears to be the statute pursuant to which demand was made in appellant’s answer and cross-complaint for the .item arising from the failure of respondent' to collect taxes upon personal property. That item constitutes a liability created by statute within the meaning of subd. 1, sec. 4054.
The same conclusion is reached with respect to appellant’s other grounds of defense and cross-complaint. It is, by statute, made the duty of the assessor to pay to the county treasurer moneys collected in his official capacity and his civil liability for failure to perform that duty and to pay over, at the time and in the manner required by law, moneys so collected by him, together with interest on such sums thereof as he unlawfully retained, for the time he so retained them, is a statutory liability, action upon which is barred by the section last above mentioned. As was said by the court of ap*346peals of Kansas in Board of Commissioners of Cloud County v. Hostetler, 6 Kan. App. 286, 51 Pac. 62, “the liability of an officer to pay over money to the county treasurer, as required by law, is one created by statute, . . . . ” and by the supreme court of Washington in Spokane County v. Prescott, 19 Wash. 418, 67 Am. St. 733, 53 Pac. 661, an action to recover because of the failure of the treasurer to turn over county funds to his successor, “The essence of this action is for the breach of those statutory duties imposed upon the treasurer.” (See, also, County of Ada v. Ellis, 5 Ida. 333, 48 Pac. 1071; People v. Van Ness, 76 Cal. 121, 18 Pac. 139; Board of Commissioners v. Van Slyck, 52 Kan. 622, 35 Pac. 299; Sonoma County v. Hall, 132 Cal. 589, 62 Pac. 257, 312, 65 Pac. 12, 459; State v. Davis, 42 Or. 34, 71 Pac. 68, 72 Pac. 317; People v. Putnam, 52 Colo. 517, Ann. Cas. 1913E, 1264, 122 Pac. 796; Gallatin County v. United States Fidelity & G. Co., 50 Mont. 55, 144 Pac. 1085.)
Appellant insists that since it did not seek, in its answer, to recover judgment against respondent, its demand for affirmative relief being confined to the cross-complaint, and since statutes of limitation are not applicable to defenses, its claim against respondent is not barred for that purpose. The affirmative defense set up in the answer is meant to be a setoff and is pleaded as a counterclaim. “A counterclaim of a defendant is regarded as an affirmative action, and, therefore, unlike a matter of pure defense, is subject to the operation of the statute of limitations. The statute applies as well to a sum attempted to be set off as to one on which an action is to be brought.” (17 R. C. L., p. 746, sec. 113.)
It is true, as contended by appellant, that C. L., see. 1945, some of the provisions of which are discussed in the views of the other members of the court, hereunto appended, prohibits the board of county commissioners from allowing claim against the county under the circumstances therein specified. That contention is, however, beside the issue. This is an original action in the district court and not an appeal from an order of the board of county commissioners. That section, if it applied to this case, would prohibit the board, when respond*347ent’s claim was filed, from raising the statute of limitations in his behalf as a bar to appellant’s claim against him and from allowing his demand regardless of that of the county, but did not prohibit him from pleading it in his own behalf when appellant attempted to make its stale claim an offset and the subject of counterclaim in an action which he was prosecuting against it in the district court. To the last-mentioned proceeding it has no application.
The judgment is affirmed. Costs are awarded to respondent.