Van Fleet, J.
The substantive question in this case is as to the power of a board of supervisors to employ counsel on behalf of the county to prosecute, or assist in the prosecution of, criminal cases. The board of supervisors of Modoc county on the seventh day of July, 1891, adopted an order or resolution in the following terms:
“ Upon motion and with full consent of the board it is ordered that the firm of Spencer & Raker be and are hereby employed and appointed as assistant counsel with the district attorney to aid in the prosecution of all criminal cases now pending before the superior *499court of Modoc county, at the agreed sum of six hundred dollars as full compensation for all services.” And thereafter, on the ninth day of October, 1891, as a sequence of the foregoing, adopted a further order or resolution, of which the following is a copy:
“ On motion of Supervisor Wylie, seconded by Supervisor Cannon, it is ordered that the auditor be instructed to draw a warrant on the treasurer for three hundred dollars, as part payment for legal services rendered by Spencer & Raker for the county, in conformity with a previous order of the board of supervisors made employing the said Spencer & Raker to assist the district attorney in the prosecution of criminal cases pending in the superior court of Modoc county, California, against Denis O’Brien and T. B. Reese.”
In pursuance of this last-recited order, the auditor drew his warrant in favor of said Spencer & Raker, as therein directed, and this action is brought by the county, through its district attorney, to restrain the treasurer from paying it. Judgment went in favor of the county, from which defendants appeal. If the board had no power to employ counsel for the purposes indicated the judgment is right, otherwise not.
We can find no authority in the law to sustain the action of the supervisors in the premises. Boards of supervisors are creatures of the statute, the constitution (art. XI, sec. 5) providing that the legislature shall provide for their election or appointment, and prescribe their duties. The authority for any act must, therefore, be sought in the statute. The only provisions looking to such power as was here attempted to be exercised, which have been called to our attention, are found in section 25 of the County Government Act (Stats. 1891, pp. 304-07), which takes the place of the provisions of the Political Code on the subject. Subdivision 17 of that section gives the board power “ to direct and control the prosecution and defense of all suits to which the county is a party, and to employ counsel to assist the district attorney in conducting the same.” Subdivision 86 of *500the same section gives it power “ to authorize the district attorney to appoint an assistant district attorney, if in their judgment it may be necessary, for the proper discharge of the duties of the district attorney, and to allow such assistant district attorney such compensation for his services as they may determine, not to exceed, unless otherwise in this act provided, the sum of fifteen hundred dollars per annum.” It cannot be successfully contended that the first of these provisions gives any warrant for the action of the board in this case. That provision is evidently intended to empower the supervisors to protect the rights of the county in any litigation it may have involving its property or other substantial rights; the power is in terms restricted to suits “ to which the county is a party,” and while possibly in a proper case it might be construed to include actions or proceedings in which the county, while not nominally a party, nevertheless has a direct, substantial interest or right of property involved, it can have no application to the character of cases referred to in the orders of the board in question. The county was in no sense a party to those cases, nor had it any rights litigated therein; they were criminal cases, prosecuted in the name, and on behalf of, the people of the state. They involved no interest of the county in any sense, other than such interest as the county had in common with every other county, and all the people of the state, in upholding the administration of the law. The fact that the county, as an instrument of the law, pays the expense of criminal prosecutions, confers no such right or interest as that contemplated by the act.
It is equally apparent that subdivision 36 has no application to the facts. That provision contemplates the appointment by the district attorney, under authorization of the supervisors, of an assistant district attorney, who takes an official oath as an officer of the county, and, under the authority, direction, and control of his principal, assists in the performance of - any and all duties pertaining- to the office. It does not *501contemplate the employment by the supervisors of special counsel, who may or may not be acceptable to the district attorney, to take part in particular cases. There is no sort of analogy between the purpose of subdivision 36 and that aimed at in the proceedings of the board in this instance, and the suggestion that the action of the board may be upheld asa substantial compliance with that provision is without weight. In fact, it does not seem to be very seriously contended that either of these provisions "warranted the act of the board, but it is strongly urged in effect that it was within the inherent general power of the board, in the absence of special provision, to provide for the proper prosecution óf these cases. But we know of no such inherent or undefined power in the board of supervisors; their powers being purely statutory, their every act must find its warrant in the statute, either expressly or by necessary implication. (Robinson v. Supervisors, 16 Cal. 208; San Joaquin County v. Jones, 18 Cal. 327; Foster v. Coleman, 10 Cal. 279; Linden v. Case, 46 Cal. 171.) The legislature having specified certain cases in which such power may be exercised, there is no implication that she intended it to be exercised in others; expressio unius est exclusio alterius. In fact, an examination of all the provisions of the statute bearing upon the subject leads to the conclusion that it never was intended that the board of supervisors should be permitted to control or interfere with criminal prosecutions or with the district attorney in their management. The district attorney in the discharge of the duties of his office performs two quite distinct functions. He is at once the law officer of the county and the public prosecutor. While in the former capacity he represents the county and is largely subordinate to, and under the control of, the board of supervisors, he is not so in the latter. In the prosecution of criminal cases he acts by the authority and in the name of the people of the state. (Const., art. VI, sec. 20; County Government Act, sec. 136.) If he fails for any reason to appear at the trial *502in a criminal case for the discharge of his duty the court is authorized to designate some competent attorney to take his place for the occasion (Pol. Code, sec. 1130); and if at any time it is deemed essential for the public service that he have assistance in this behalf, it is made the duty of the attorney general to go to his aid. (Pol. Code, sec. 470, subd. 7.) It is said that what was done here has been frequently done by boards of supervisors in other counties. We are not disposed to question this assertion, nor the perfect good faith of the board in this instance. Many acts done by boards and officers in the supposed discharge of their duty and in the best of faith do not find sanction in the law, and for a time pass current because unchallenged; but that fact cannot weigh in favor of their validity when eventually called into question. The action of the board, being without authority, was void, and created no legal claim against the county.. “It is settled in this state that no order made by a board of supervisors is valid or binding unless it is authorized by law. No claim against a county can be allowed, unless it be legally chargeable to the county; and if claims not legally chargeable to the county are allowed, neither the allowance nor the warrants drawn therefor create any legal liability.” (Linden v. Case, 46 Cal. 171.)
The other questions, as we have indicated, do not demand extended notice. The demurrers were properly overruled; the complaint stated a cause of action, and while Spencer & Raker were perhaps not necessary parties, they were nevertheless proper ones. The answer did not contain any defense to the action, and the court did not err in its disposition of it. Nor was there any substantial error in the manner of entering judgment; it was in effect a judgment on the pleadings.
' Judgment affirmed.
Garoutte, J., and Harrison, J., concurred.
Hearing in Bank denied.