The services in question were rendered by the plaintiff as mayor of the incorporated town of Eagle Grove, in acting as a magistrate on the trial of a person accused of the crime of assault and battery. The accused was adjudged to ■ be not guilty, and the plaintiff seeks to recover the fees allowed by law to justices of the peace in such cases, amounting to eight dollars, alleging that said sum would be a reasonable compensation for the services rendered. - A demurrer to the petition was sustained. The question certified by the trial judge for our determination is as follows: “Is the mayor of an incorporated town, who acts and serves as a magistrate in the hearing and trial of state criminal cases, in which the prosecution fails, entitled to recover from the county for the reasonable value of the services thus performed?’
*166Section 506 of the Code confers npon the mayor of each city and incorporated town the jurisdiction of a. justice of the peace in criminal cases, but it is conceded that there is no statute which in terms provides that mayors shall be entitled to compensation while exercising such jurisdiction. The appellant relies upon the case of Ripley v. Gifford, 11 Iowa, 367, and upon some statements made in Upton v. Clinton Co., 52 Iowa, 311, as supporting his claim in this case. In the case first, named, the question involved was whether, since the taking effect of the Revision of -1860, there was any law fixing the fees of the clerk of the district court, and it was answered in the negative. In view of the unusual condition of the law in regard to the ■ compensation of the clerk of the district court and other officers, this court felt justified in making some suggestions in regard to matters which were not involved in determination of the case. In the case last cited, the fact that there was no pretense that the amount sought to be recovered was a reasonable compensation for the services rendered was referred to, but it was not said that there could have been a recovery for such compensation. Nor do. we think anything said in the closing paragraph of the opinion can properly be construed to support the claim of the plaintiff. It states the belief of the court that it was not the legislative intent that mayors should perform the duties of justices of the peace, without compensation, but that, through an oversight, none had been provided. ~ The fact that this court was not authorized to so construe the statute as to supply the omission was fully recognized. It was said in Jefferson Co. v. Wollard, 1 G. Greene, 430, in effect, that a person who accepts a public office takes it with all the honors, emoluments and burdens pertaining thereto; that the government is not compelled to compensate its citizens for any services rendered; and that an officer cannot recover compensation for which the law makes no provision, however meritorious his services may be. It was said in Moore v. Ind. Dist., 55 Iowa, 654, of school directors, that, being public officers, *167with duties prescribed by statute, they were only entitled to such compensation lor the performance of their prescribed duties as were fixed by statute; and the case of Upton v. Clinton Co., supra, was cited as an authority to that effect. In Foster v. Clinton Co., 51 Iowa, 541, it was said that a claim against a county is not just unless the law somewhere either requires or authorizes its payment. See, also, Turner v. Woodbury Co., 57 Iowa, 440. The rule that a public officer cannot recover compensation not provided for by law is recognized by numerous decisions of this court, and is approved by considerations of public policy. It follows that a county cannot be made liable for such compensation.
The judgment of the district court is aeeibmed.