This is a mandamus proceeding to compel State Road Commission to pay an order for $4,000 given by J. J. Battershell Son, road contractor, to relator on the commission, dated December 6, 1930.
The firm of J. J. Battershell Son was awarded a contract to build a state highway in Hardy County, on or about the 15th of May, 1930, under competitive bids, by the state *Page 492 road commission. The contract was executed in due form on May 27th, following, with American Surety Company of New York as surety on the bond required by law to be filed therewith in a sum not to exceed one-half of the contract price. The bond was $60,560. It was attached to and made a part of the contract by a clause in the contract and was conditioned that the contractor should perform the work, save the state harmless, and pay every person furnishing material or performing labor in and about the construction. In the application of the contractor to the surety to go on the bond as such, the contractor assigned any and all moneys due, or to become due, the contractor, which might be payable to it, if it committed any breach of the contract or made default, as an indemnity to the surety. The contractor finished the construction about July 15, 1931, and there was then in the hands of the commission from final estimate and from sums due on previous estimates the sum of $14,143.83. Laborers and materialmen filed claims amounting to about $25,000 with the commission asking payment; and Capon Valley Bank, the relator, asked the commission to pay it $3,000 and interest for a loan it had made the contractor secured by an order to it of $4,000, given by the contractor to the commission dated December 6, 1930, directing the commission to pay relator that sum out of the final estimate of the project. This order was filed with the commission on or about the date it was given. It appears that the contractor needed cash to meet its payroll for November, 1930, and to pay for materials then purchased, and obtained a loan of $3,000 from the bank, the proceeds of which were placed to its checking account, and by it checked out to the laborers and materialmen, with the exception of about $50.00. The order on the commission was taken as security, and also a chattel mortgage on the machinery used in the work, which machinery was later moved beyond the state. The contractor and its individual members are insolvent. The American Surety Company asked the commission to pay it the sum due the contractor under its assignment made at the time the bond was given, and on the further ground that it was subrogated to the rights of the laborers and materialmen under the contract and bond. The *Page 493 commission declined to pay either the workmen, materialmen, relator or the surety company, and held the money until direction for its payment is made by competent legal authority. This proceeding then followed, in which relator prays for mandamus to compel the commission to pay it the amount of its order of December 6, 1930; and the surety company is made a respondent with the commission. The other claimants are not parties and make no appearance.
Without determining the priority of the two assignments, that of relator, dated December 6, 1930, and that of the surety company, given at the inception of the contract, we come to the question of the right of subrogation of the surety to the claims of the materialmen and the laborers. The surety is indemnified against liability, and its right of subrogation arises when that liability accrues and especially is this true in equity if it appears that the principal is insolvent. 50 C. J., p. 234. It appears that the surety has already paid some of the laborers and the materialmen, and the aggregate amount unpaid them is about $5,700. If the laborers and materialmen are entiled to payment of their claims against the contractor in priority of the assignments by him to creditors or others, then the surety which is called upon to pay those claims steps in their shoes under the doctrine of subrogation. That laborers and materialmen take preference in payment over assignments made to general creditors was decided in State v. Coda, 103 W. Va. 676,138 S.E. 324. This Court there held that the contract and bond which was made a part of the contract were to be considered together as one transaction, and that the policy of our laws as contained in sec. 25, chap. 43, Code (1923), and sec. 12, chap. 75, Code (1923), was to protect laborers and materialmen somewhat similar to the protection afforded them under the mechanic's lien statute, and that the equities of the surety under its right of subrogation were superior to the money lending creditors who was only entitled to be paid, under his assignment, the remainder of the fund after paying materialmen and laborers for whose claims the surety has become liable under the contract bond. Laborers on, and materialmen who furnish material for, a public structure cannot take liens on *Page 494 the structure, and the statutes above cited give them the same measure of protection they would have if the structure was a private one against which they could file liens. To accomplish this purpose the contractor on any public structure is required to give bond to pay the laborers and materialmen, as well as to do the work and finish the structure. To allow the contractor to assign the money coming to him from the commission would destroy this security to the laborers and materialmen, hamper the building of public structures, and make difficult for the contractor to obtain bondsmen, at reasonable cost. Moreover, if the surety should become insolvent, the laborer would have no protection. We held in the Coda case, that a contractor could not divert by assignment to a general creditor the money due him under his road contract and bond to the detriment of the laborers and materialmen, and the surety on his bond. That principal, followed in other jurisdictions by decisions cited in the Coda case, governs here.
Irrespective of the purpose of our laws to give adequate protection and security to the laborer and materialmen on public structures, the law of suretyship as applied to building contracts is: "The stipulations in a building contract that the owner will make payments as the work progresses, in accordance with the certificates of an architect, but will retain a certain precentage of the amount earned until the work is completed, are by weight of authority considered to be covenants for the benefit of the surety, and a violation of these stipulations by premature payments deemed a material alteration of the contract, whereby the surety is released. The rule rests upon two reasons — the one is that such a defense deprives the surety of the security which the owner or principal contractor has agreed to hold for his benefit, and the loss of inducement which otherwise would have operated on the contractor's mind to induce him to finish the work in accordance with the terms of his contract." This quotation is taken from the opinion prepared by Judge Hatcher in Hamilton v.Casualty Company, 102 W. Va. 32, 38, 135 S.E. 259, 262. A diversion of the retained percentages to creditors of the contractor would violate the contract and relieve *Page 495 the surety to the amount of the diversions. The laborers and materialmen would have little protection, and would have no recourse on the surety, if the contractor assigned the money due or to become due under the contract to his general creditors. But whether the sum now in the commission's hands is composed of percentages retained or upon final estimate, or both, the fund cannot be diverted to the detriment of the materialmen and laborers.
The bank made the loan and took the order in good faith, but it was bound to take notice of the statutes and the provisions of the contract and bond requiring payment to the laborers and materialmen.
One further contention remains to be considered. By affidavits filed, relator shows that it loaned the contractor the $3,000 with the understanding that it would be used to pay laborers and materialmen for the month of November, 1930, and that it was so used with the exception of about $50.00; and it is argued that realtor stepped into the shoes of the laborers and materiamen to the amount furnished and paid to them, and therefore the surety on the bond is liable to it as subrogated to the rights of the laborers and materialmen. That argument is not well taken. There were no assignments by the laborers or materialmen to the bank, and they took no part in the transaction. The same argument was advanced in Hess v. Turney, (Tex.) 207 S.W. 171, 173. There the contractor had borrowed money and paid his employees therewith, and the bank claimed it was subrogated to the rights of the laborers under the surety bond. The court held: "The contractors at the time they borrowed the money represented to the bank that they needed it to pay wages due the laborers. This was true and the money was used for that purpose. The laborers, however, were not parties to this transaction. When they were paid their debts were extinguished. The transaction did not constitute an equitable asignment of their debts and did not subrogate the bank to their claims against appellant." See Bowling v. ConstructionCo., 110 W. Va. 275, 158 S.E. 165, where the above quotation from the Texas case appears, and where other cases embodying the same *Page 496 principle of law are cited; and Ill. Surety Co. v. City ofGalion, 211 F. 161.
It is also argued that the claims of the laborers and materialmen filed with the commission are incorrect, and are for sums in excess of what is due them. These claimants are not before the court, and that point cannot be considered. In a proper proceeding where these laborers and materialmen are parties and have a chance to defend, it may be shown, if such be the fact, that their claims are spurious, and therefore the surety has no basis of subrogation. The familiar principle that relator in mandamus must show a clear legal right to the writ before it will issue applies here, and the writ is denied.
Writ denied.