The opinion of the court was delivered by
Gordon, J.
On the 20th of March, 1897, the city of Spokane entered into a written contract with George J. Loy for the construction of a certain sewer (which had theretofore been authorized by ordinance), the price to be paid said contractor therefor being, $3,972, in special sewer improvement bonds, which were to be issued and delivered when the contract was completed. The contract provided that the work should be performed and the materials furnished under the provision, direction and control, and to *590the complete satisfaction, of the city engineer, and to he approved by the hoard of public works, and also contained the following provision:
“ It is further mutually agreed and understood that no payment shall he made by the city to the contractor, George J. Loy, until said sewer shall have been completed, and all labor paid thereon. . . . And should any claims be filed with the comptroller by the employees of the contractor, or by the material men, before the final settlement has been had, the same shall be adjusted and satisfied before any bonds herein provided for shall he issued to said contractor.”
Said contract also contained a provision making it “ subject to all the conditions and requirements of ordinance A 203, being an ordinance relating to contracts for public works, passed May 2, 1892, and as amended.” Section 16 of ordinance A 203, referred to in this contract, provides:
“ Whenever the hoard of public works shall notify the contractor by notice personally served, or by leaving a copy thereof at the contractor’s last place of abode, that no further vouchers or estimates will be issued or payments made on the contract until the workmen and employees have been paid, and the contractor shall neglect or refuse for the space of ten days after such notice shall have been served to pay such workmen or employees, it shall and may he lawful for the city to apply any money due, or that may become due under the contract, to the payment of said workmen and employees without other or further notice to said contractor; . . .”
The contractor completed the work, and the sewer was accepted and approved by the city. The relator, Bartelt, is the assignee of the contractor of the first $2,000 of said bonds to he issued under the city’s contract to Loy; and in the instrument of assignment it was agreed that the bonds might be issued to the relator, instead of to the *591contractor. The respondent Liehes is comptroller, and respondent Olmsted mayor, of the city. During the construction of the work the contractor incurred labor debts to the amount of $3,000, and an indebtedness for materials furnished and used in the construction of the sewer to the amount of $800, none of which indebtedness, either for labor or material, was paid. Written claims therefor were filed prior to August 1,1897, in the office of the city comptroller. Authority to issue the bonds was conferred on November 15, 1897, by ordinance, and thereafter the relator duly demanded of the respondents that they issue and deliver to him $2,000 of said bonds. This demand being refused, he instituted a proceeding in the superior court for the purpose of compelling the officers of the city to issue and deliver the same. In response to the alternative writ, defendants appeared and set up as a reason why they refused to issue the bonds the provisions in the contract between the city and Loy hereinbefore referred to; also, the facts in regard to Loy’s incurring the indebtedness for which claims had been filed with the city’s comptroller. After the alternative writ was issued, and before judgment, all of the appellants, except relator, obtained permission of the lower court to intervene. Their complaints set up that the several intervenors had performed work or furnished material for the contractor, Loy, in the construction of the sewer, for which labor and materials they had not been paid, and that, in conformity with the provisions of ordinance A 203, already referred to, they had filed their claims with the comptroller. They also set up that the contractor was insolvent, and asked that the city should be required to deliver to them, out of the bonds which the city had contracted to deliver to Loy, an amount sufficient to pay their respective claims. After motions to strike portions of these complaints in intervention had *592been denied, and demurrers thereto overruled, the cause was set down for trial; and, at the trial, objections by the respondent city and the relator to the introduction of any evidence on behalf of the intervenors, upon the ground that their respective complaints failed to state facts sufficient to entitle them to intervene, or to any relief, were sustained, and they were dismissed from the proceeding. The trial between the relator and the city resulted in a judgment in the latter’s favor; and it was adjudged that the relator was not entitled to any relief and his proceeding was dismissed. Both the relator and the intervenors have appealed. It will thus be seen that the contest is a three-cornered one, and that the appeals of the relator and the intervenors are hostile to each other.
It is the contention of the relator that the provision in the contract between Loy and the city, providing that the bonds should not be issued until the contractor had paid for all labor and material, was ultra vires, and that no privity of contract existed between the intervenors and the city. His position is that there was not at the time of the execution of the contract any provision of statute, or of the charter of the city, which conferred upon the board of public works, or the city, authority to- insert in the contract the provision in reference to withholding payment from the contractor until the laborers and material men had been paid, and that for the same reason the provisions of the ordinance in relation to the same subject were also void. In support of this position counsel cite Clough v. Spokane, 7 Wash. 279 (34 Pac. 934), and Sears v. Williams, 9 Wash. 428 (37 Pac. 665). The first of these cases simply decided that § 2415 of the General Statutes (Bal. Code, § 5925) did not apply to street grading contracts, and that the city was not liable to laborers and material men for a failure to exact a bond contemplated *593by tbat section. In Sears v. Williams, supra, tbe city of Anacortes bad taken a bond conditioned as required by § 2415; and tbe action was against tbe sureties on tbe bond, to recover tbe value of materials furnisbed. Tbe court, while conceding tbat tbe bond could be enforced in favor of tbe obligee — tbe city — held tbat it could not be enforced by tbe plaintiff, wbo at tbe time of its execution was not a party thereto, nor in any manner interested in tbe subject matter thereof. Tbe decision in each of these eases received tbe sanction of a bare majority of tbe court, as then consituted, two of tbe judges expressly dissenting. Tbe writer of tbe present opinion is constrained to say tbat be fully endorses tbe views expressed in tbe dissenting opinion in Sears v. Williams, supra, and believes tbat tbe doctrine announced by tbe majority is opposed to. reason and tbe great weight of authority. Baker v. Bryan, 64 Iowa, 561 (21 N. W. 83); Sample v. Hale, 34 Neb. 220 (51 N. W. 837); Lyman v. City of Lincoln, 38 Neb. 794 (57 N. W. 531); State ex rel. Palmer v. Webster, 20 Mont. 219 (50 Pac. 558); Knapp v. Swaney, 56 Mich. 345 (23 N. W. 162, 56 Am. Rep. 397); Montville v. Haughton, 7 Conn. 543; 1 Dillon, Municipal Corporations (4th ed.), § 216. It is believed tbat tbe only ease which at all supports it is Breen v. Kelly, 45 Minn. 352 (47 N. W. 1067). But it is not believed tbat tbe question that was there decided is of controlling importance, or necessarily involved, in tbe present ease. This is not an action upon a bond taken by tbe city, but here tbe city, by its ordinance and subsequent contract became, and tbe tbe relator voluntarily agreed to make tbe city, a trustee for tbe benefit of all persons wbo should perform labor or furnish material in tbe construction of tbe improvements ordered by tbe city authorities. All tbat tbe intervenors are seeking in tbe present proceeding is to have tbat trust *594which was created for their benefit enforced. The city, while not legally bound to do so, was nevertheless charged with the moral duty of protecting the men who labored upon, or furnished materials for, its public improvements; and the right to require its contractor to pay for the labor and material expended in its behalf, although not prescribed by any positive law, belonged to the city as an incident to its power to contract for the improvement. United States v. Tingey, 5 Pet. 115; United States v. Bradley, 10 Pet. 343. The plea of ultra vires should not, as a general rule, prevail when it would not advance justice, but would accomplish a legal wrong. Whitney Arms Co. v. Barlow, 63 N. Y. 62 (20 Am. Rep. 504).
Relator’s counsel, in further support of their position, cite the case of State ex rel. Fairhaven Land Co. v. Cheetham, 11 Wash. 131 (49 Pac. 221). In that case the legislature had appropriated a specific sum for a specific purpose, viz., the erection of a school building by a board which possessed none of the powers common to municipal bodies. All that was decided was that the board could not, by the insertion of a clause in the contract for the erection of the school building, relative to the claims of third persons, establish any liability against the fund so created by the legislature. There was nothing in the act providing for the appointment of the board, or creating the fund, which expressly or by implication conferred any power on it to create itself a trustee for any purpose not named in the act; and its whole authority was special and limited. It was created for a single purpose and entrusted with a single duty, the performance of which terminated at once its functions and its existence.
In the present case the work has been performed agreeably to contract, and the city has accepted the work and gone into possession. It is not pretended that it has not suf*595ficient funds to pay all of the claims for labor and material; it is not pretended that that is not exactly what, by its ordinance and contract, it agreed and undertook to do; and we are unable to perceive any reason in law or morals why its undertaking in this regard cannot be enforced. The enforcement of this trust, so voluntarily undertaken, entails no hardship upon the city, or upon any one. But counsel say there is no provision of statute or charter which expressly authorizes it. We reply that there is no provision which prohibits it, and inasmuch as the law has expressly conferred upon the city the power to make this improvement by contract, and has not limited or prescribed the mode in which it should be exercised, it seems to us to follow, as an incident of the power thus expressly granted, that the city may hedge its contract about with such stipulations and safeguards not inconsistent with the exercise of the right expressly conferred, as will best enable it to execute the power or enjoy the right which is expressly conferred. Suppose we concede that there is no legal duty or moral obligation upon the city to see that the laborers who work for its contractors are paid. It may nevertheless be to the best interests of the city to have the payment of laborers and material men secured. In the first place, the.certainty of securing their pay might induce them to work for a less wage, or furnish materials at a smaller cost, than if their pay was uncertain and they were obliged to look solely to a contractor whose honesty or solvency might be doubted. And the credit which such security gives the contractor might well be presumed to enable him to prosecute the work with diligence, and less danger of strikes or difficulty with his workmen. Public inconvenience and delays in public improvements, are not infrequently occasioned by the failure of employees and laborers to secure prompt payment or adjustment of their *596claims. By avoiding such, complications, and making it certain that the laborer will receive his pay, it is to be presumed that the city is enabled to make a better contract and get its improvement constructed at less expense and in less time than would otherwise be possible.
Bor the disposition of the present case, it is enough that the legislature, in the first instance, conferred upon the city authorities the general power to make certain public improvements by contract, which carried with it, as an incident, the power to insert in such contracts reasonable regulations and provisions in furtherance of public convenience; and such is the character of the provisions in the contract under consideration. The city has and holds the entire-contract price for which this work was undertaken and completed. Its sole justification and authority for withholding it from the contractor is that it is needed for the discharge of these labor claims. And it seems to us that the city assumes an inconsistent position when it asserts its right to withhold the money from the laborers, while insisting that the contractor is not entitled to it, and all the time using and enjoying the benefit of the improvement.
We think the court erred in holding, in' effect, that the complaints in intervention were not sufficient to entitle the intervenors to relief; and the judgment must be reversed, and the cause remanded for further proceedings in conformity with this opinion. The intervenors only will recover costs.
Scott, C. J., and Dunbab and Beavis, JJ., concur.
Abdebs, J., concurs in the result.