The petition alleges that the defendant, in virtue' of its power as a municipal corporation, enacted the following ordinance:
“An Ordinance Regulating License No. 8. Town Ordinance of Irwin.
“Sec. 7. That no person, firm, company or corporation shall be engaged in prosecuting' or carrying on any trade or profession hereinafter mentioned and described, within the incorporated town of Irwin, Iowa, until he, she, or they shall have first procured a license therefor in the manner hereinafter provided.”
“Sec. 9. It shall be unlawful for any transient merchant, or peddler, to sell, or offer to sell, by auction, or otherwise, any property within the town without first having obtained a license therefor, for which he shall pay such sum as the mayor may determine in each particular case.”
*6961 *6972 8 *695That about March 22, 1898, the plaintiff was employed as the agent of a wholesale grocery house, located in Chicago, 111., to solicit orders for goods, and to subsequently deliver all goods for which orders might be obtained; that about said time plaintiff took orders for goods in the defendant town, which he subsequently delivered; that while so engaged, and on account thereof, defendant caused him to be arrested under the ordinance aforesaid, and to be fined, thereunder, and plaintiff, failing to pay trñ'e fine so imposed, was imprisoned in the county jail for the term of three days; that the defendant, at a special meeting of *696its council, expressly directed its town marshal to make the arrest for the malicious, corrupt, and oppressive purpose of preventing plaintiff from competing with the resident merchants who were selling like goods. The demurrer to the petition was based upon the ground that defendant was not liable for the acts of its officers in attempting to enforce its police regulations. It may be conceded that the arrest and imprisonment of the plaintiff was, under the allegations of his petition, unlawful, for the reason that plaintiff was not a transient merchant; and for the further reason that the ordinance was void in so far as it authorized the mayor to fix the amount of the license, under the authority of Town of State Center v. Barenstein, 66 Iowa, 249 (23 N. W. Rep. 652). But the question remains, is the defendant responsible for the acts of its officers in such cases. The rule of law seems to be well settled that a city or town is not liable for the acts of its officers in attempting to enforce its police regulations, for the reason that in such matters the officers can in no sense be regarded as the agents or servants of the city. Their duties are of a public nature; and their appointment by the city is simply a convenient mode of exercising governmental functions. In the matter of enforcing its police regulations the city acts as an agent of the state in the discharge of duties imposed by law for the promotion and preservation of the pub-lie good, and not as a mere private corporation in the management of its corporate concerns. Caldwell v. City of Boone, 51 Iowa, 687 (2 N. W. Rep. 614); Ogg v. Lansing, 35 Iowa, 495. The statutes of this state gives to cities and incorporated towns the power to regulate and license sales by autioneers and transient merchants, and to regulate and license pawnbrokers and peddlers. Code, sections 462,463. The state reserves to itself the right to tax peddlers. Code, section 906. *697It is insisted, however, that the defendant, in passing the ordinance referred to, was not attempting to. enact a police regulation, but that it was endeavoring to protect its home merchants, and collect a revenue for the city. It cannot well be claimed that the power delegated to a town to regulate peddlers and transient merchants, gives it the right to impose a tax; and we have uniformly held that the power to license does not authorize taxation for revenue. See Burlington v. Insurance Co., 31 Iowa, 102; City of Ottumwa v. Zekind, 95 Iowa, 622 (64 N. W. Rep. 646). Licenses are a part of the police regulations, and are charged for as such. It follows, therefore, that the town had no authority to tax either a peddler or a transient merchant. It had authority to regulate or license the persons employed in the business, in the interest oí the public welfare, and we must presume that in enacting the ordinance in question it was endeavoring to exercise this power. There is no allegation in the petition that it passed this ordinance for the purpose of deriving revenue. All that is said is, that it directed the plaintiff’s’arrest for the purpose of preventing him from competing with merchants selling like goods. We do not mean to be understood as holding that such an allegation, even if made, would have rendered the petition good, for it may be that the motives of the council cannot be inquired into in such cases. We call attention to the omission simply to strengthen our position. It is clear, then, that the town, in passing the ordinance, was attempting the exercise of some of the police powers delegated to it by the state, and it follows that it is not liable for the acts of its officers in enforcing it. It 'matters not that the ordinance was illegal, because of delegation of power to the mayor to fix the amount; and it is of no importance that the defendant expressly directed the arrest of the plaintiff for violating the ordinance. *698This is expressly ruled in the case of Caldwell v. Boone, supra. N or does the fact that the plaintiff was not, in. fact, guilty of the offense charged, — conceding the ordinance to be valid, — affect the case. If it did, then a town would be responsible in every case where there was an acquittal of the person charged of a violation of any ordinance passed to preserve or promote the public weal. Our conclusion that the town was attempting to exercise its police power under the facts recited, is sustained by the recent case of State v. Wheelock, 95 Iowa, 577 (64 N. W. Rep. 620), where the question is fully considered. See, also, Tiedeman, Police Power, section 85. Other reasons might be given in support of the ruling of the court below, but enough has been said to demonstrate the correctness of its judgment, and it is affirmed.