after stating the facts, delivered the opinion.
It is important at the outset to ascertain and determine the proper interpretation to be given the language of the condition of the bond relating to repairs. The respondent contends that the condition is effective only as a guaranty that the work and materials will be done and furnished according to the stipulations of the contract, and hence that the bond stands as security for the faithful performance thereof. The language of the ordinance and the condition are very nearly identical, so that the consideration of the purpose of the former must necessarily aid us in arriving at the true construction of the latter. By the ordinance the contractor is required, in the first place, to give a.good and sufficient bond, in amount equal to the contract price, conditioned, among other things, that he will commence and complete the proposed improvement according to the specifications. In addition to this, another bond, in a sum equal to 25 per cent, of the contract price, is required to be given, conditioned as is the one in suit. Now, the evident purpose of the common council in requiring the larger bond was to secure a faithful performance of the contract in all its details, as by its terms it is equivalent to a requirement that the improvement shall be completed according to specifications, and this, we assume, comprehends the quality of the materials stipulated for, as well as the. manner of the workmanship. So there would appear to be no need of the lesser one, except to subserve some other purpose ; and it is not reasonable to suppose that the two bonds were intended to afford to the city cumulative remedies for the accomplishment of one and the same end. The language and grammatical arrangement of the ordinance and condition are in harmony with this *313thought. The obligation is to repair injuries arising from several causes, among which are such as may arise from defective materials and workmanship.
A guaranty against injuries for a reasonable time after completion, which may be attributable to these specific causes, might be regarded as a suitable, and perhaps proper, test of substantial compliance on the part of the contractor, and therefore might be held to operate ‘ as a guaranty of faithful performance, for it is sometimes argued that, if the work is well done, it would need no repairs within such time. Still it is not a felicitous way of stating the guaranty for sound and good work: City of Covington v. Boyle, 6 Bush, 204. However that may be, such could not be the purpose of the bond in suit, because the city took another looking to that end. The causes assigned are so broad and comprehensive in their scope as to include injuries arising from every substantial source, and, in effect, subjoins an independent condition, not covered by the contract. So that the undertaking is simply to keep and maintain the street and pavement in repair for a designated period of time, regardless of the quality of the material stipulated to be furnished or supplied, or the workmanship to be employed. Upon the other hand, it is urged that the bond is invalid, because it was given as a guaranty that the contractor shall make and keep up the repairs upon the street and pavement, the expenses for which the city has, without power or rightful authority, assessed against' the adjoining property. The city is empowered by charter provisions to improve its streets and to assess the cost thereof against the adjacent property : Charter City of Portland, §§ 94, 100. It may also repair any street, or part thereof, whenever it deems it expedient, and assess the cost against such property ; but before doing the same it must be declared by ordinance whether the cost *314shall be so assessed or paid out of the general fund. When it is declared that the proposed repair shall be made at the cost of adjacent property, thereafter it is to be deemed an improvement, and shall be made accordingly : Id. §§ 122, 123. So that we find here authority to make both improvements and repairs and to assess the expense thereof against adjacent property. The manner of procedure in either instance is somewhat different, but the power remains. The repair contemplated, however, is such as the council may deem expedient to be made; that is, the necessity therefor must exist by the consideration of that body. Like an improvement, the probable cost of making it must be ascertained and determined, and this forms the basis for the assessment. As it pertains both to the improvement and repair, the council is empowered to make provisions for present exigencies, and it may charge the expense thereof against the property supposed to be benefited. Beyond this it would appear that it is not authorized to act. We have not been referred to any provision in the charter authorizing it to make contracts for keeping or maintaining streets or highways, or any improvements thereon, made or to be made, in repair, or to levy the estimated cost of anticipated future repairs against property of individuals. It is manifest that the letting of the contract upon condition that the contractor should bind himself to keep up repairs for a period of five years, due generally to traffic, disintegration and decay, defective materials and workmanship, was calculated to increase the amount of the bid by the estimated cost of such repairs. At least, the condition imposed an additional burden, which would not be assumed or undertaken without compensation. And the contractor would very naturally be expected to demand a higher price, in consideration of the obligation to assume the additional burden. Thus, by exacting the *315bond, a burden was undeniably imposed upon the adjacent property beyond such as was authorized by the charter. Such, in effect, is the holding of the court in Brown v. Jenks, 98 Cal. 10 (32 Pac. 701) wherein the court say : " This act contains no grant of authority to the city council for keeping a street in repair. Section 2 authorizes the council to contract for different kinds of street work. In all cases the work authorized is such as is necessary to make and complete a street, or to repair pxisting defects. The bond is not only unauthorized by the words of the statute, but the requirement changes, and may increase, the burdens of the property owner. It is manifest that the obligation to keep the street in repair for five years is a burden which one would not undertake for nothing. Therefore a contractor would charge a higher price for the work when he was forced to contract also for repairs. The expense undertaken is indefinite, and the property owner must pay for them in advance, whereas the statute provides for repairs after the necessity for them appears. Then, it being contingent, he will be paying for repairs which may never be required.” In People v. Maher, 56 Hun, 81 (9 N. Y. Supp. 94), it appears that by provision of the charter of the City of Albany, N. Y., the expenses for ordinary repairs of a certain avenue to be paved with Trinidad asphalt were to be borne by the city. But the city council, in its ordinance providing for the pavement, required the contractor to agree ‘ ‘ to keep said pavement in repair for seven years from and after its acceptance by the city, without expense to said city or abutting property owners,” which provision was inserted in the specifications under which bids were received for the work, and pursuant to which the contract was made. It was held, on the question of its validity, that the necessary effect of the contract was to charge upon property owners the *316cost of keeping the avenue in repair in violation of the charter regulations, and the contract was therefore adjudged to be illegal. To the same effect, see Fehler v. Gosnell, 99 Ky. 380 (35 S. W. 1125) ; McAllister v. City of Tacoma, 9 Wash. 272 (37 Pac. 447, 658) ; Boyd v. City of Milwaukee, 92 Wis. 456 (66 N. W. 603) ; Verdin v. City of St. Louis (Mo. Sup.) 27 S. W. 447; Id., 131 Mo. 26 (33 S. W. 480, and 36 S. W. 52) . City of Schenectady v. Trustees of Union College, 66 Hun, 179 (21 N. Y. Supp. 147) illustrates the distinction drawn by the authorities touching the effect of the condition. In that case the undertaking was to “do all the work required by such ordinance and this contract in such good and substantial manner that no repairs thereto shall be required for the term of five years after its completion.” And it was held, distinguishing People v. Maher, supra, that the clause referred to had reference- solely to the substantial character of the work performed and materials used in the performance of the contract. A like distinction is observed in Cole v. People, 161 Ill. 16 (43 N. E. 607). But the bond in question is distinctively an independent undertaking to keep the street and pavement in repair, made so both by the ordinance and the language thereof, covering, in effect, all injuries liable to arise from whatsoever source. It is clear that under the authorities, based upon what we believe to be sound reasoning, the assessment against property to meet the additional expense of such repairs was unwarranted by the charter.
But it does not follow that, because the assessment is void in so far -as it may provide for the especial fund which forms the consideration for the bond, the bond itself is invalid and illegal and not capable of being enforced, if authority is found elsewhere for the city to enter into such a contract with the paving company: *317Portland Lumbering Co. v. City of East Portland, 18 Or. 21 (6 L. R. A. 290, 22 Pac. 536). But there was an evident lack of statutory power for entering into a contract for keeping and maintaining the street and pavement in repair, and consequently a want of legal authority to use the public moneys for that purpose. Under the charter the council was required to provide for taking security by good and sufficient bonds for the faithful performance of any contract let under its authority: City Charter 1891, § 116. It was authorized to let contracts for the repair of streets where present necessities required, or which may have been deemed expedient by the common council, but not to expend the funds of the public or the property owners of the municipality, and let contracts for anticipated future repairs. And this is just what it has attempted to do.
Upon the other hand, it is strongly urged by plaintiff that the bond can be enforced as a common-law obligation, and of this we will now inquire. It has been held by this court that bonds or undertakings intended to be given in compliance with statutes, although having failed in substantial compliance therewith, will, if entered into voluntarily, and founded upon a valid consideration, and they do not violate public policy or contravene any statute, be enforced as common-law obligations : Bunneman v. Wagner, 16 Or. 433, (8 Am. St. Rep. 306, 18 Pac. 841). The rule is, perhaps, more tersely stated by the supreme court of the United States, that, if a contract is entered into by competent parties, and for a lawful purpose, not prohibited by law, and is founded upon a sufficient consideration, it is a valid contract at common law : U. S. v. Tingey, 30 U. S., (5 Pet.) 115 ; U. S. v. Linn, 40 U. S., (15 Pet.) 290. That the bond in question was entered into voluntarily cannot be gainsaid, and the sufficiency of the consideration must also be conceded.
*318The question remains, is the obligation void as against the sureties of the obligor, for it-is they who are prosecuting this appeal. It is a general rule of law that, where the obligor has obtained and availed himself of the benefits to be derived from the execution of the bond, neither he nor his sureties can defeat their liability because of some irregularity in the proceeding in which the bond originated. Having obtained the benefit, they are estopped from setting up the irregularity : Carlon v. Dixon, 12 Or. 148, (6 Pac. 500) ; Johnson v. Weatherwax, 9 Kan. 75 ; Nunn v. Goodlett, 10 Ark. 89. So it has been held that an obligor will not be permitted to defeat his liability by showing want of jurisdiction in the court before whom the action was pending, or the unconstitutionality of the law by virtue of which the bond or obligation had its inception : McDermott v. Isbell, 4 Cal. 113 ; State ex rel. v. Stark, 75 Mo. 566 ; Daniels v. Tearney, 102 U. S. 415. In the latter case an action was sustained upon a bond given under and by virtue of an ordinance of the state of Virginia, which was held by the national courts to be unconstitutional and invalid by reason of the treasonable motive and purpose by which its authors were animated in passing it. Mr. Justice Swayne, speaking for the unanimous court, says : “ It is well settled, as a general proposition, subject to certain exceptions, not necessary to be here noted, that where a party has availed himself for his benefit of an unconstitutional law, he cannot, in a subsequent litigation with others, not in that position, aver its unconstitutionality as a defense, although such unconstitutionality may have been pronounced by a competent judicial tribunal in another suit. In such cases the principle of estoppel operates with full force and conclusive effect.” The following, among other, cases are cited in support of the doctrine : Ferguson v. Landram, 5 Bush. 230 ; 96 Am. Dec. 350 ; Railroad *319Co. v. Stewart, 39 Iowa, 267; Van Hook v. Whitlock, 26 Wend. 43 ; 37 Am. Dec. 246 ; City of Burlington v. Gilbert, 31 Iowa, 356 ; 7 Am. Rep. 143 ; U. S. v. Hodson, 77 U. S. (10 Wall) 409.
But here another and a different principle is involved. A municipality with limited and circumscribed powers and authority is a party to the contract, and the validity thereof depends for its support upon the requisite power of the city to enter into and enforce it. It is a doctrine of all the authorities that, if a municipality acts wholly beyond the scope of its express or implied authority, it is not estopped to set up that fact to defeat any alleged claim or demand arising by virtue of such unauthorized acts, and it is said that neither the doctrine of estoppel, of ratification, nor of bona fide holding can be invoked to support such a transaction : Sutro v. Pettit, 74 Cal. 332 (16 Pac. 7, 5 Am. St. Rep. 442). “This doctrine,” says Dillon, “grows out of the nature of such institutions, and rests upon reasonable and solid grounds” : 1 Dill. Mun. Corp. § 457. It is essential to the welfare and protection of citizens and taxpayers who contribute to the revenues, and whose property is subject to the laws and ordinances of municipalities, that they should be held to the exercise of such powers only as have been delegated to them through legislative enactment. They possess no powers but such as are delegated, or may be necessary to their exercise, and thereby implied, and the courts have been solicitous that they exercise none that they do not possess. Their creation being by public statute, and for definite and legitimate objects, to which their funds are to be applied, contracts which have no connection with such purposes, or which, by natural intendment, will cause an illegal or wrongful application of their funds or the funds of their citizens with which they are intrusted by chartered powers, or an application to other or foreign *320objects, are ultra vires, and void: 2 Dillon Mun. Corp. § 936. In Newbery v. Fox, 37 Minn. 141 (5 Am. St. Rep. 830, 33 N. W. 333), it is said : ‘ ‘ The doctrine of ultra vires has, with good reason, been applied with greater strictness to municipal bodies than to private corporations ; and, in general, a municipality is not estopped from denying the validity of a contract made by its officers, when there has been no authority for making such a contract. * * * A different rule of law would, in effect, vastly enlarge the power of public agents to bind a municipality by contracts, not only unauthorized, but prohibited, by law. It would tend to nullify the limitations and restrictions imposed with respect to the powers of such agents, and to a dangerous extent expose the public to the very evils and abuses which such limitations are designed to prevent.”
A distinction is recognized between acts of the municipality or governing body, which are not within the scope of their general powers, and such as may be open to the objection that they are lacking in some technical and formal regularity in their adoption, or that there has been a non-observance of some collateral act or formality prescribed, not jurisdictional in its character. The former are clearly and always void, while the latter, if they lead to a perpetration of a fraud upon contracting parties acting upon the faith of laws and ordinances apparently regular and valid, will be held to bind the municipality upon the principle of having received and appropriated benefits derived on account of them, and it will be estopped to deny their validity. Moore v. Mayor, etc., of City of New York, 73 N. Y. 245 (29 Am. Rep. 134). Thus, in Hitchcock v. Galveston, 96 U. S. 341, it was held that, where the municipality had the power to contract for the improvement of the sidewalks, but in making such a contract it agreed to pay by giving *321its bonds, which it had no authority to do, and, having received benefits at the expense of the other contracting party, it could not object that it was not empowered to make payment in the mode sought to be adopted, and that, while the city could not be held to a specific performance of its undertaking, yet that it was liable to pay the contractor under the contract. The principle is recognized, and pertinently discussed, by Mr. Justice Strahan in Portland Lumbering Co. v. City of East Portland, 18 Or. 21, (6 L. R. A. 290, 22 Pac. 536) wherein a technical defect in a notice required by the statutory procedure in levying a local assessment was urged as a defense. He says : “ I do not think, under the charter, this technical defect in the notice destroyed or impaired the power of the city to contract. * * * The defendant’s claim is not that the general power did not exist, but there was a slight departure from the authority conferred in the particular already pointed out, and for that reason the whole proceeding was ultra vires and void. Under the circumstances of the case, I am unable to accede to this argument.”
It must be conceded that a municipality will be estopped to enforce the performance of a contract under the same or like conditions that an individual will be estopped to proceed against it. If it has exceeded its general powers in attempting to enter into contractual relations with an individual, and if, because of its exercise of such excess of authority, the individual, who is charged with knowledge of its just powers, is left without remedy, there is no good or sufficient reason why the city should not, under like circumstances, be estopped to proceed against the individual. The' contract is invalid by reason of the lack of power to enter into it, and, if invalid as to one of the contracting parties, it is also *322invalid as to the other. “ So, on the other hand,” says Mr. Dillon, “a party making with the city a contract which is ultra vires is not estopped, when sued thereon by the corporation for damages, to set up its want of authority to make it” : 1 Dillon, Mun. Corp. § 458. It is sometimes asserted that a contract made by a municipal corporation, where there exists a defect of power, or even a want of power to so contract, yet if not made in violation of charter regulations or any statute prohibiting, is not illegal; and, if such a contract has been executed, and benefits have been received and appropriated, the party receiving them is estopped to deny its validity : City of St. Louis v. Davidson, 102 Mo. 149 (22 Am. St. Rep. 764, 14 S. W. 825). State Board of Agriculture v. Citizens’ St. Ry. Co. 47 Ind. 407 (17 Am. Rep. 702) is to the same effect as applied to a private corporation. This doctrine has been criticised as too broad and unsound, and contrary to the great weight of authority. 1 Beach, Pub. Corp. §§ 217, 218. But, however this may be, it is not thought to be entirely applicable to the case at bar.
It, as we have seen, was clearly beyond the express or implied powers granted to the city to contract for keeping and maintaining the street and pavement in repair against injuries that might arise from all causes for the period of five years. If it could contract for this length of time in the future, why not for a much longer, or even an indefinite time, and use the funds of the city or abutting property owners for payment in advance? It is undoubtedly a duty which is due to the public, and enjoined upon the city, to see that the streets are kept in reasonable repair. But the mode of making repairs is specifically pointed out and limited to present necessities, and thereby constitutes the measure of power; and, being the only manner designated, must be con*323strued. as a prohibition of any other method. That is to say, the city is not only powerless to adopt any other mode or method, or to expend the public moneys in its promotion, but it is prohibited from proceeding in any other manner. While the contract has been fully executed on the part of the city, yet it cannot, by reason of its invalidity, recover damages on account of a breach thereof. In further support of these views, see McDonald v. Mayor of New York, 68 N. Y. 23 (23 Am. Rep. 144) ; Miner’s Ditch Co. v. Zellerbach, 37 Cal. 543 (99 Am. Dec. 300); Nash v. City of St. Paul, 8 Minn. 172 (Gil. 143) ; Covington R. Co. v. Mayor of Athens, 85 Ga. 367, (11 S. E. 663 ) ; 1 Beach, Pub. Corp. § 217 ; Town of Durango v. Pennington, 8 Colo. 257 (7 Pac. 14).
We have come to this conclusion after much and careful deliberation, because of the importance of the matters involved, but we are satisfied that the rule touching the invalidity of the acts of a municipal corporation where entirely beyond the general scope of its powers is the only safe one, in view of the safeguards which should always be maintained against the unauthorized acts of the authorities and the illegal use of the funds of municipalities. The judgment must, therefore, be reversed, and the cause remanded, with directions to the court below to sustain the demurrer.
Reversed.