
184 Cal.App.2d 276 (1960)
COUNTY OF CALAVERAS, Appellant,
v.
CALAVERAS COUNTY WATER DISTRICT et al., Respondents.
Civ. No. 9859. 
California Court of Appeals. Third Dist.  
Aug. 30, 1960.
 Joseph S. Huberty, District Attorney, for Appellant.
 George A. Huberty and Steel & Arostegui for Respondents.
 SCHOTTKY, J.
 Calaveras County has appealed from an adverse judgment in an action brought by it against the Calaveras County Water District, Souza Brothers, H. J. McCue and Aetna Casualty and Surety Company to recover the sum of $1,788.93, which represented the reasonable value of materials and labor furnished by the county in the repair and maintenance of certain streets in the town of West Point which are county highways.
 The complaint alleged that in August, 1954, the water district entered into a contract with Souza Brothers and H. J. McCue whereby it was agreed that the latter would construct and install an improvement to the waterworks in West Point; that the contract provided that the contractors would repair and maintain the streets which were torn up by the installation *278 and construction of the improvement to the waterworks; that during the period of construction the county of Calaveras did at the request of Souza Brothers and H. J. McCue and upon their promise to pay the reasonable value thereof furnish supplies, labor and equipment to the value of $1,788.93; and that no part of said sum has been paid.
 The court found in part:
 "3. ... That the placing of trenches in said streets, as aforesaid, by said defendant contractor, and the subsidence of the material placed in said trenches, rendered said streets hazardous for vehicular traffic; and such work of repair and replacement of said streets as was done by the said defendant contractors in the year 1954, did not meet with the approval of, and was not to the satisfaction of the Calaveras County Road Commissioner."
 "4. That, near the end of the year 1954, the said defendant contractors, Souza Brothers and H. J. McCue, entered into an oral agreement with Calaveras County Road Commissioner, Oliver C. Wyllie, whereby the County of Calaveras was to furnish to said defendant contractors materials and supplies, labor and equipment for the repair and maintenance of said county streets and highways in the Town of West Point, as such repair and maintenance was occasioned by said work of improvement, until such time as said work could be completed by said defendants; and, by the terms of said oral contract, the said defendant contractors, Souza Brothers and H. J. McCue, were to pay to the County of Calaveras the reasonable value and current market price of all such materials, supplies, labor and materials so furnished."
 The court found further that the board of supervisors did not authorize the road commissioner to enter into such a contract and had not expressly ratified the contract; that the county did furnish materials, supplies, labor and equipment for the repair and maintenance occasioned by the improvements; and that the reasonable value of the materials and labor furnished was $1,788.93. The court concluded that the road commissioner did not have authority to enter into the contract by virtue of his office; that his act in entering into the contract without the authorization of the board of supervisors was beyond his power; and that therefore the contract was illegal and void. Accordingly, judgment was entered that the county take nothing. This appeal followed.
 Appellant county contends that the contract between the *279 road commissioner and respondent contractors was not illegal, and that even if it were illegal it does not prevent recovery on the part of the county.
 Appellant argues that we are concerned with an executed agreement by the county road commissioner to repair a hazardous street which was created by the defendant contractors and that there is nothing illegal about this because the county has the right and the duty to repair and to maintain its streets and roads in a safe condition. Appellant cites section 2009 of the Streets and Highways Code which provides that subject to general policies and the budget established by the board of supervisors, the road commissioner has the right to administer his department and thus carry on the work of repair and maintenance.
 Appellant states: "The defendant contractors were obligated by the terms of their agreement with the defendant Water District to repair and replace the streets to the extent occasioned by the installation of the water works in the Town of West Point, to the satisfaction of the Road Commissioner. This they did not do, the work that they did having rendered the streets hazardous for vehicular travel. These circumstances clearly obligated these defendants to repair the condition and to keep it in a state of repair, or to pay the cost of doing so. They selected the latter alternative and agreed with the road commissioner that the county would do the work at their expense."
 Respondents in reply assert that the road commissioner lacked authority to enter into the agreement with the contractors and that the contract was therefore illegal and void and appellant county was not entitled to recover thereon. This was the view taken by the trial court, and both the trial court and respondents relied heavily on the case of Bear River Sand & Gravel Corp. v. County of Placer, 118 Cal.App.2d 684 [258 P.2d 543], which holds that a contract by a county road commissioner for the purchase of materials is beyond the scope of the authority of the road commissioner and is illegal. In that case a county road commissioner entered into a contract to purchase crushed rock from Bear River Sand and Gravel Corporation. The Board of Supervisors of Placer County had not been a party to the contract and the county refused to pay. In affirming a judgment in favor of the county, this court said at pages 689, 690:
 "The road commissioner was without power to negotiate *280 such a sale, and so was the board of supervisors without advertising for bids. (Miller v. McKinnon, 20 Cal.2d 83 [124 P.2d 34, 140 A.L.R. 570]; Los Angeles Dredging Co. v. Long Beach, 210 Cal. 348, 353 [291 P. 839, 71 A.L.R. 161]; Reams v. Cooley, 171 Cal. 150 [152 P. 293, Ann.Cas. 1917A 1260]; Mullan v. State, 114 Cal. 578 [46 P. 670, 34 L.R.A. 262]; Contra Costa Construction Co. v. Daly City, 48 Cal.App. 622 [192 P. 178].) When the power of a board or public officer is limited to a prescribed method of contracting, the mode prescribed becomes the measure of the power. If the prescribed mode is disregarded, the contract is void and unenforceable."
 "* * *"
 "While the courts will go to all reasonable lengths in interpreting the statutes conferring powers upon the officers of the state in order that the laws may be given effect and the ends of justice subserved, they cannot by construction confer upon any officer an authority which the Legislature has seen fit to withhold. (Christophel v. Riley, 206 Cal. 242, 245 [273 P. 1064]; Allen v. State Board of Equalization, 43 Cal.App.2d 90, 93 [110 P.2d 73].) No government, whether state or local, is bound to any extent by an officer acting in excess of his authority even though it has received substantial benefits deriving from the ultra vires act. (Reams v. Cooley, supra, at p. 157.) Since Barieau as road commissioner was not authorized by any provision of the law to purchase materials of any character for use on the county roads, the county of Placer could not be bound."
 "If, as appellant contends, Barieau ordered the crushed rock for the county of Placer, he had no authority in the law to do so and his act was void. The void acts of a public officer cannot be ratified. This principle is pointed out in Miller v. McKinnon, supra, at page 88, where it is stated, ' "that contracts wholly beyond the power of a municipality are void. They cannot be ratified; ...." ' The road commissioner having no power in the first instance to purchase road materials for the county, the board was without power to ratify any act on his part directed to this end."
 However, the Bear River Sand and Gravel Corporation case so strongly relied upon by respondents is distinguishable upon its facts from the instant case. In that case the road commissioner contracted to purchase certain materials. The purchase was negotiated without advertising for bids which was beyond the power of the road commissioner and the county. Therefore *281 the contract was wholly beyond the power of the county and was void, and the doctrine of estoppel could not be applied. Any language in the Bear River case that a contract beyond the powers of the road commissioner could not be ratified must be read in the light of the facts of the case.
 The situation in the instant case is not synonymous with the Bear River case because we are not concerned with any purchase of materials by the road commissioner, nor do we have a case where someone is seeking recovery from the county for something furnished to the county. The agreement was not that the county would maintain the streets gratuitously but that the county would be paid the fair value of this work. Appellant county was charged with the responsibility of keeping its streets safe for vehicular traffic, and the county road commissioner was charged with the responsibility of seeing to it that the county was not exposed to possible liability for damages suffered by reason of unsafe streets. Respondent contractors were obligated by the terms of their agreement with respondent water district to repair and replace the streets to the extent made necessary by the installation of the improvements to the waterworks and were obligated to do it to the satisfaction of the road commissioner. When the respondent contractors agreed with the road commissioner that they would pay the county the reasonable value of all materials, supplies and labor necessary to complete the repair of the streets, a contract was entered into which the county could ratify.
 Appellant county contends most earnestly that the contract between the road commissioner and the contractors was not illegal, and even if it were illegal it would not prevent or prohibit recovery on the part of the county. "There is a conflict of opinion as to whether the validity of a contract sued upon by the municipality can be questioned by the contractor after having received the benefit accruing thereunder. The general rule is that one who makes a contract with a municipality is estopped to assert that it was ultra vires, when it is sought to be enforced. ..." (10 McQuillin, Municipal Corporations, 3d ed.,  29.133, p. 509.) "Other cases hold, ..., that the other party to the contract is estopped to assert that the contract was not executed in the manner required by law, after receiving the benefits thereof, yet he is not estopped to insist that the contract was wholly beyond the power of the municipality, since if he was estopped in the latter instance, then municipal corporations, 'no matter how limited their *282 powers, may make themselves omnipotent. ...' ... In some cases, it has been held that where a municipality sues on an executed contract which is invalid because not authorized, the defense of ultra vires cannot be set up, but that if the contract was not only unauthorized but also illegal because 'prohibited' by the charter or a statute, the defense of ultra vires may be set up." (McQuillin, supra, pp. 511, 512.) This is the California rule. As stated in City of Arcata v. Green, 156 Cal. 759, at page 764 [106 P. 86]: "The appellant urges that the defendants, having received the grant which they sought, are estopped to deny the validity of their undertaking which they gave in consideration of such grant. But we think the doctrine of estoppel has no just application here. A party contracting with a city regarding a subject-matter within the scope of the city's powers may, where he has received the benefit of the contract, be precluded from asserting that the contract was not, on the part of the city, executed in the manner required by law. The doctrine, however, cannot be made to cover contracts entirely beyond the range of the municipal authority. ..."
 In the instant case the board of supervisors was authorized to construct, maintain and repair the county highways. (Sts. & Hy. Code,  941; Union Transp. Co. v. Sacramento County, 42 Cal.2d 235 [267 P.2d 10].) The county road commissioner was authorized to carry out the general policies of the board with reference to county highways. (Sts. & Hy. Code,  2009.) Respondent water district had the right to construct works along, under and across any street and the duty to restore any property crossed "as near as may be to its former state or so as not to have impaired unnecessarily its usefulness." (Wat. Code,  31060.) Section 30027 of the Water Code states that "streets" includes road, alley, avenue, highway and public way. Respondent contractors in their contract with respondent water district agreed that they would repair and replace the streets in the town of West Point to the extent made necessary by the installation and construction of the improvements to the waterworks to the satisfaction of the Calaveras County road commissioner.
 Both the water district and the county had an interest in the repair of the streets which were torn up by the construction of the improvements to the waterworks. Under such circumstances, we believe that the county and the water district could have entered into an agreement whereby the county would have repaired the streets. Respondent contractors were *283 obligated under their contract with respondent water district to make the necessary repairs to the satisfaction of the county road commissioner. Since the county had a direct interest in seeing to it that the repairs were properly completed, and the respondent contractors were obligated to complete them, we are convinced that the county could also have entered into such an agreement with respondent contractors. Such an agreement would not be ultra vires in the sense that it was wholly beyond the powers of the county, and the doctrine of estoppel would be applicable. The fact that the contract was actually made by the road commissioner without express authorization by the board of supervisors was at most an irregularity, but it did not render the contract void to the extent that it could not be ratified by the county. The court found that it was not expressly ratified by the county, but the court also found that the county by resolution authorized the commencement of an action on behalf of the county to recover on the contract, which was in effect a ratification of the contract by the county.
 The distinction between the Bear River case, supra, and other cases relied upon by respondents and the trial court is that those cases related to contracts for purchase of materials by the county which were void because of the statutory requirement of advertising for bids. Those cases held that the statutory requirements were for the benefit and protection of the taxpayers; that contracts entered into without compliance with such requirements could not be ratified; and that no estoppel to deny their validity could be invoked against the county. As stated in Reams v. Cooley, 171 Cal. 150, 153 [152 P. 293, Ann.Cas. 1917A 1260], one of the cases cited in the Bear River case: "... Undoubtedly, a school board, like a municipal corporation, may, under some circumstances, be held liable upon an implied contract for benefits received by it, but this rule of implied liability is applied only in those cases where the board or municipality is given the general power to contract with reference to a subject matter and the express contract which it has assumed to enter into in pursuance of this general power is rendered invalid for some mere irregularity or some invalidity in the execution thereof; where the form or manner of entering into a contract is not violative of any statutory restriction upon the general power of the governing body to contract nor violative of public policy. In the absence of such restriction on the mode or manner *284 of contracting the same general rule applies to such inferior political bodies as to individuals and the former will be held responsible on an implied contract for the payment of benefits it receives under an illegal express contract not prohibited by law. ..."
 [1] For the reasons hereinbefore set forth, we conclude that in the instant case respondent contractors having entered into an agreement with the county road commissioner to perform work which said contractors were obligated to perform under their contract with respondent water district, said work having been performed by the county road commissioner on behalf of the county, and the board of supervisors having ratified said agreement by authorizing the commencement of an action to recover thereunder, said respondent contractors having received the benefits under said agreement are estopped from setting up the defense that said agreement was invalid. Neither reason, authority nor public policy compel or justify a judgment in favor of respondent contractors.
 [2] Respondent water district contends that it would be grossly inequitable and contrary to law to hold said water district jointly liable with respondent contractors because the agreement between the county and respondent contractors conferred no additional benefit upon the water district. There is merit in this contention. Accordingly, the water district may not be held liable.
 The judgment is affirmed as to the respondent Calaveras County Water District and reversed as to the respondents Souza Brothers, H. J. McCue and Aetna Casualty and Surety Company, and the trial court is directed to enter judgment in the sum of $1,788.93 in favor of appellant against those respondents as to whom the judgment is reversed.
 Peek, Acting P. J., and Warne, J. pro tem.,  [fn. *] concurred.
NOTES
[fn. *]  *. Assigned by Chairman of Judicial Council.
