The defendant, B. F. Branham, was sheriff of Santa Clara County from January 5, 1885, to December 1, 1886, and during that time received from the state the sum of $704 for transporting prisoners to the state prisons, and insane persons to the insane asylums. The money was allowed by the state board of examiners for the time necessarily consumed by defendant in delivering the prisoners and insane persons, at the rate of five dollars per day. It was claimed for the plaintiff that it was the duty of defendant to pay the money into the county treasury, but he declined to so pay it, claiming that he was entitled to retain it for his own use. This action was then brought to recover the sum named. In the court below judgment was entered for plaintiff, and defendant appealed.
Public officers are entitled to receive and retain for their services only such compensation as is allowed them by statute. Whether, therefore, the plaintiff or defendant was entitled to the money in controversy, must be determined by an examination of the statutes bearing on the question.
In 1883 an act was passed by the legislature “to establish a uniform system of county and township'governments.” (Stats. 1883, p. 299.) Under that act, the sheriff in a county of the third class—and Santa Clara was of that class—was entitled to receive a salary of $9,520 per annum, and, “as additional compensation, the mileage collected by him in criminal cases, where the same is not a charge against his own county.” By section 164 of the act, it was declared that “the salaries and fees provided for in this act shall be in full compensation for all services, of every kind and description, *594rendered by the officers therein named, their deputies and assistants provided, however, that sheriffs should be allowed certain expenses, and among them, “all expenses necessarily incurred in conveying prisoners to and from the state prison, and insane persons to and from the insane asylum, which shall be allowed by the board of examiners and collected from the state.” By section 165, it was declared that “all salaried officers of the several counties of this state shall charge and collect, for the use of their respective counties, and pay into the county treasury on the first Monday in each month, the fees now or hereafter allowed by law in all cases, except the percentage hereinbefore allowed such officers, and excepting also such fees as are a charge against the county.” Section 166 required each of the officers authorized to receive fees under the provisions of the act to keep a fee-book, “ in which must be entered at once and in detail all fees or compensation, of whatever nature, kind, or description, collected or chargeable,” and on the first Monday of each month to add up each column in the book and set down the totals. And by section 167 it was provided that the payment into the county treasury must be accompanied by a statement of the aggregate shown by the fee-book, and an affidavit of the officer that the fee-book “ contains a true statement in detail of all fees and compensation, of every kind and nature, for official services rendered by me, my deputies and assistants,” etc.
On the fourteenth day of March, 1885, section 164 of the act of 1883 was amended by re-enacting the same, and adding thereto a provision allowing county officers of counties of certain enumerated classes additional deputies in certain cases. (Stats. 1885, p. 125.) And on the same day another act was passed, entitled “An act to allow compensation to sheriffs for conveying prisoners to the state prisons, and insane persons to the insane asylums,” which reads as follows:—
*595“Sec. 1. There shall be allowed by the state board of examiners to the sheriff, for delivering a prisoner to either of the state prisons, actual expenses, and five dollars per diem for the time necessarily consumed in delivering such prisoner.
“ Sec. 2. There shall be allowed by the state board of examiners to the sheriff, for delivering an insane person to either of the insane asylums, his actual expenses, and the same per diem as is allowed in section 1 of this act.
“ Sec. 3. This act shall take effect and be in force from and after its passage.” (Stats. 1885, p. 126.)
The question is, Was it the duty of defendant, under the provisions of the county government act, to pay the money in controversy into the county treasury? or had he a right to retain it for his own use, under the provisions of the last-named act?
In Adams v. San Francisco, 50 Cal. 117, a similar question was presented. Adams was the sheriff of the city and county of San Francisco at the time of and after the adoption of the codes, and under their provisions (Pen. Code, sec. 1586, and Pol. Code, sec. 2221) was allowed and received compensation for transporting prisoners to the state prisons, and insane persons to the asylums. But an act was passed by the legislature in 1861, and was still in force, which provided that salaries should be allowed and paid to certain officers of the city and county (among whom was the sheriff), and should be “in full compensation for all official services required of them by law.” It further provided that the officers receiving salaries should pay into the county treasury “any fees, commissions, percentages, or other compensation, of whatever nature or kind, allowed by law for services rendered by them or their deputies, in their several official capacities.”
Adams claimed that the codes allowed the compensation to him for his own use, but this court held that it was compensation allowed bv law for official services, *596and under the act of 1861 was required to be paid over to the county treasurer.
The case is in point here. There is no material difference in the language used in the statutes which controlled that decision and in those which must control the decision here. The circumstances, too, are alike. The plaintiff in that case asserted rights under the codes, which were passed after the act of 1861, and the defendant here asserts the same rights under the act of 1885, which was passed after the county government act.
Upon the authority of the case above cited, we advise that the judgment be affirmed.
Foote, C., and Hayne, 0., concurred.
The Court.For the reasons given in the foregoing opinion, the judgment is affirmed.
Rehearing denied.