Appeal from an order overruling defendant’s demurrer to plaintiff’s complaint. The allegations of the complaint, so far as material to this appeal, are substantially as follows ;
*114That on August 23, 1915, the Offerman Construction Company entered into a contract with the city of Watertown for the construction of certain sanitary sewers. That, as a condition precedent to awarding said contract, the ctiy of Watertown required said contractor to give a bond which was furnished by the National -Surety Company, defendant and appellant, and contained the following recitals and conditions:
“That we, Offerman Construction Company, a corporation of Omaha, Neb., principal, and National Surety Company of New York, as surety, are held and firmly bound unto the city of Watertown, South Dakota, a municipal corporation in the sum of $ro,ooo * * * for the payment of which well and truly to be made we hereby bind ourselves, etc. The condition of the foregoing obligation is such that, if the a'bove-bounden Offerman Construction Company * * * shall assume the defense of and indemnify and save harmless the city of Watertown * * * from all claims relating to- labor and materials furnished under such contract, * * * and shall also pay for all labor performed and materials used or furnished in the carrying out of said contract: Then-this obligation to be null and void; otherwise to remain in full force and effect and virtue.”
That said bond was accepted by said city, and in reliance thereon plaintiff furnished to the Offerman Construction Company materials (described) to the aggregate sum and value of $1,846.28, which materials were used by said company in the construction of said sewers pursuant to its contract. That the Offerman Construction Company became and was adjudged bankrupt on April 2, 1918, and never paid plaintiff for said material. That on July 8, 1918, plaintiff demanded of defendant surety company payment of the sum due for said materials so used, but that defendant refused and still refuses to pay the same or any part thereof, and denies its liability on said bond ■upon the ground that it is “not liable to labor and materials claimants.”
Two other causes of action similar in every respect are set forth in plaintiff’s complaint. Demurrer to the complaint on the ground that it does not state facts sufficient to constitute a cause of action. Demurrer overruled, and defendant appeals.
*115[1] Appellant contends: First, that the city of Watertown was without power to enter into a contract for the use and benefit of third persons, viz., laborers and materialmen; second, that the contract of indemnity in this case was for the sole use- and benefit of the city; that laborers and materialmen are not, and were not intended to become, parties thereto, and cannot maintain this action.
In response to the first contention, it is sufficient to observe that, if the contract was clearly intended to be for the use and benefit of laborers and materialmen as well as the city itself- — in other words, if the defendant guaranty company contracted and agreed to become liable for and to pay for labor and material entering into the sewer in case the contractor failed to pay therefor ■ — no question of ultra vires arises.
[2] The contractor had the right, for its- own benefit, to enter- into a contract with the defendant guaranty company; whereby the guaranty company might obligate'itself to pay laborers and) materialmen, if it should fail to pay, even in the absence of any bond for the protection of the city, and clearly laborers or materialmen for whose benefit such bond might be given, even though, not named therein, could accept the contract thus tendered by the guaranty company, and become parties thereto with a right of action thereon in case the contractor defaulted in his payments. The rights acquired by laborers and materialmen under such a contract would not foe affected by the fact that the same contract also indemnified the city against claim-s of laborers and materialmen. The question then would seem to be, not whether the city might enter into a contract for the benefit of third persons, to wit, laborers and materialmen, but whether the contractor and the guaranty company -have entered into-a contract for their protection. The consideration for the bond was paid, not by the city of Watertown, but by the contractor. Such payment would constitute a sufficient' consideration, even though 'third persons for whose benefit such- bond may have been given were not named as parties thereto, nor even cognizant of its existence, and such persons by adopting the promise made for- their benefit could bring themselves into privity with the promisor and enforce the promise as though made directly to them. Thorp. v. Keokuk Coal Co., 48 N. Y. 257; Clark v. Howard, 150 N. Y. 238, 44 N. E. 695.
*116[3,4] Whether the provisions of the bond in this case entitle laborers and materialmen to accept and become privies thereto presents a question of much greater difficulty. The complaint alleges that plaintiff accepted and relied upon the bond. It is appellant’s contention, however, that the bond, on its face and by all its provisions, discloses that it was given solely for the protection of the city, and not for the benefit of laborers and material-men; that a surety cannot be held beyond the express terms of his contract.
In Fish & H. v. N. E. H. Co., 27 S. D. 221, 130 N. W. 841, this court held that persons for whose benefit a contract of this kind is made need not be named therein. In Fry v. Ausman, 29 S. D. 30; 135 N. W. 708, 39 L. R. A. (N S.) 150, Ann. Cas. 1914C, 842, it was held that—
“Recovery can only be had in case the contract was ‘made expressly for the benefit of a third person.’ ”
In Chung Kee v. Davidson, 73 Cal. 522, 15 Pac. 100, the court held that—
“It must appear, however, by the direct. terms of the contract, that it was made for the benefit of such parties. It cannot be implied from the fact that the contract would, if carried out between the parties to it, operate incidentally to their benefit.’
The general rule is that — ■
“Where contracts are evidently part of the same transaction, a person who beomes a party to one of such contracts which provides for the other is bound by the terms of both.” 13 C. J. 713, § 821.
That is, the guarantor of a contract binds himself to a performance of the same acts which the principal himself has undertaken to perform. Therefore where a contractor, by the terms of his contract, has expressly agreed to pay all claims for labor and material, the guarantor binds himself to pay for such labor and material equally with the contractor, and laborers and materialmen may adopt such guaranty and enforce it the same as though made directly to them. Jordan v. Kavanaugh, 63 Iowa, 152, 18 N. W. 831. The general rule undoubtedly is that to sustain an action there must be privity of contract between the parties, though in many jurisdictions it is held, even in the absence of statutory provision, that, if one person makes a promise to another upon a *117consideration for the benefit of a third party, the latter may maintain an action upon it, though the consideration did not move from him. The conflict of decisions, however, appears irreconcilable upon principle. In this state it is settled by section 1192, Revised Code 1903 (section 808, Code 1919), which provides:
“A contract, made expressly for the benefit of a third person, may be enforced by 'him' at any time before the parties thereto rescind it.”
No -question of rescission is involved in this case. The interpretation of the section is not free from difficulty. It appears to be a legislative recognition and adoption of the rule which seems to be sustained by the weight of authority. But the reasons announced in different jurisdictions are so diverse as to give rise to more or less difficulty in its application'. In some states in which it has been adopted by -decisions, it is held inapplicable to a contract -which is purely conditional and contains no express promise for the benefit of the third party. -Chung Kee v. Davidson, 73 Cal. 522, 15 Pac. 100.
The California court, interpreting the section of their Code which is identical with our statute, said:
“We cannot say that the contract before us was made expressly for the benefit of the plaintiffs’ assignors. O-n the contrary, we think it was made expressly for the benefit of the parties named therein. The most that can be said is that it is a contract incidentally for the -benefit of those who worked in the mine. * * * It is not necessary that the party for whose benefit the contract has been made should be named in the contract. It must appear, however, by direct terms of the contract, that it was made for the benefit of such parties. It cannot 'be implied from the fact that the contract would, if carried out between the parties to it, operate incidentally to their benefit.”
In the case of Electric Appliance Co., v. U. S. Eidelity & Guaranty Co., no Wis. 434, 85 N. W. 648, 53 D. R. A. 609, the court said:
“We consider the true rule to be that there must not only •be an intent to secure some benefit to the third.party, but there must be a promise legally enforceable.”
In that case the contract guaranteed provided that the plant should be completed and ready for acceptance free and clear of *118all claims or liens for labor performed or material furnished or otherwise. The contract guaranteed, however, contained no provision expressly -obligating the contractors to pay claims of laborers and materialmen, and the court held that the sole agreement in the bond was to indemnify the city and not to pay third parties.
In the case of Parker v. Jeffery, 26 Or. 186, 37 Pac. 712, a firm contracted with the city of Portland) to furnish material and perform labor necessary for the construction of a sewer. .In the contract the contractors expressly agreed that they “would' pay. all sums of money due at the completion of the work, or hereafter to become due, for material used in and labor performed on or in connection with said work.”
■Defendants executed a guaranty bond conditioned that—
“Whereas, the above-bounden Robertson Bros, have this dav entered into a contract with the city of Portland for the construction of a sewer. * * * Now, if said contractor- shall well and faithfully perform all the covenants and conditions in said contract mentioned, then this obligation to be void; otherwise to be and remain in full force and virtue.”
The court, while recognizing the rule to be the same as "hat adopted by our statute, said:
“We take the rule to be that, to entitle a third person to recover upon a. contract made by others, there must not only be an intent to secure some benefit to such third, person, but the contract must have been made and entered into directly and primarily for his benefit. * * * Applying these rules to the case in hand, it seems clear that plaintiffs cannot maintain this action, because there is no promise by * * * [the guarantors] to pay for labor and material used by Robertson Bros, in the performance of their contract with the city; nor was. the bond taken by the-' city for the benefit of parties who might furnish such labor and material, but to indemnify and save it harmless from loss or damage by the failure of 'Robertson Bros, to perform their contract. * * * The' condition that, if Robertson Bros, should comply with their contract with the city, the obligation should be void, is incorporated in the bond for the benefit of the sureties., It simply declares upon-what terms they may be exonerated from their liability to' -the city. The bond contains no covenant or *119agreement to pay the plaintiffs, or to see them paid, but only a condition, the performance of which will exonerate them from liability; and such a condition will not be construed as a promise. * * * The condition standing' by itself -wants the very elements of a contract”-— citing Turk v. Ridge, 41 N. Y. 201, and other New York decisions holding that a condition in a contract of guaranty is not a promise to pay.
The court further said:
“The case of Jordan v. Kavanaugh, 63 Iowa, 152, 18 N. W. 851, is, we think, clearly distinguishable from the case at bar in this: That the-contract containing the promise of the principal to pay all just claims of subcontractors is attached to and made a part of the- bond, and the two instruments were considered and read together by the court in determining the undertaking of the obligors * * * to pay such claims.” ■
In the Iowa case the condition of the bond was as follows:
“That, whereas, * * * as principal, has this day entered into a contract with said * * * a copy of which is hereto attached and made a part thereof; now if the said * -* * shall well and truly comply with said contract in the time and manner provided, then this obligation shall be void, otherwise in full force and effect.” This case is in line with Connor v. Olson, 136 Wis. 13, x 15 N. W. 81-1. In the latter case the contractor expressly- agreed to furnish, all labor- and- material, and that the school district should not be liable therefor. The condition in the bond was that—
“If J. J. Olson & Son shall duly perform the contract and fulfill all -the several stipulations therein- provided, ‘and pay for all labor and -material that- enter into the construction of said building/ then the obligation to be void,” otherwise to'remain in full force and effect.
The court construed these provisions as an agreement of the contractor to pay for labor and material, and says:
“Since the bond secured' payment by the contractors of the material used in the construction of the building, it was therefore a contract between the district and- the parties thereto for the benefit of those persons furnishing material to be used in the construction of the building. Under such circumstances the third party need not be ascertained or known at its inception to entitle him to the benefits thereof-. The third party -may adopt it *120when he becomes informed, and may enforce it at la-W' as if originally made by his express authority.'’
These cases hold in effect that, when read in connection with provisions of the contract guaranteed, a condition in a guaranty contract “may” be construed to be a promise; that one of the acts guaranteed may be the payment by the contractor of laborers and materialmen; and that such contract is made expressly for their benefit, as well as for the benefit of other parties named in the contract.
[5,6] The contract between the Offerman Construction Company and the city of Watertown, as pleaded in paragraph 5 of the complaint, contains no express agreement by the construction company to pay for labor and material used in the construction of the sewer, but the bond recites that—
The Offerman. Construction Company has “contracted with the city of Watertown, S. D., to furnish material and labor for and to construct * * * a * * * sanitary sewer * * * known and designated as trunk sewer No. 1, in the contract therefor and plans, specifications, and instructions to 'bidders therefor, hereto attached and specifically made a part of this obligation and referred to herewith; -* * * if the said principal shall well and truly perform all of the terms, conditions and agreements made and entered into by it in said contract * * * and if the said Offerman Construction Co. shall assume the defense of and indemnify and save harmless the city of Watertown, iS. D., its officers and agents, from all claims relating" to labor and materials furnished under said contract * * * and shall hold said city of Watertown, S. D., harmless against all claims for damages whatsoever, arising from injury to persons or property done in the prosecution of the work under said contract; and shall also pay for all labor performed or material used or furnished in the carrying out of said contract;. then this obligation shall be null and void, otherwise to remain in full force and virtue.”
. -These provisions of the bond guarantee that the contractor will do four things: First, construct the sewer according to plans and specifications; second, that the contractors shall assume the defense of and indemnify and save harmless the city of Watertown from all- claims relating to labor and materials furnished under said contract; third; shall hold said city harmless *121against all claims for 'damag'es whatsoever, arising from -injury to persons or property done in the prosecution of the work under said contract; and, fourth, that the “contractor”' shall pay for all labor performed or material used or furnished in the carrying out of said contract. The first three of these conditions are specificalfy and directly for the benefit and protection of the city. Claims of laborers and materialmen are twice referred to in the provisions,.of the bond: First, in that the city is to be indemnified against such claims; second, that such claims are to be paid. The first of these inures to the exclusive and direct benefit and protection of the city; the second seems to be primarily for the benefit and protection of laborers and materialmen, and only “indirectly” for the 'benefit and protection of the city. Laborers and materialmen, upon complying with the statutes of this state, may acquire a lien upon moneys due or to become due the contfactor for the construction or repair of any work for any county or municipal or public school corporation. ’Section i, c. 133, Laws 1895; section 713, Code of Chdl Procedure ('Rev. Code -1919, § 1660).
In Sioux Falls Pressed Brick Co. v. Board of Education, 25 S. D. 36, 125 N. W. 291, this court held in effect that, where a contractor had defaulted in the performance of his contract, payment, for a portion of the work completed, which did not become due the contractor until the final completion of the contract, did not become subject to the liens of laborers or material-men under this statute, and that moneys thus retained by and remaining in the hands of the board of education might be used by them in the completion of the contract. This rule was recently affirmed by this court in the case of Grant County v. McGowan Lumber Co., 172 N. W. 683.
[7] In view of this ruling, it has been suggested upon this appeal that the guaranty contract of defendants may not be construed as a contract made expressly for the benefit of laborers and materialmen, for the reason that the effect of such construction would be to enlarge the liability upon the contract of indemnity intended only to protect the city, which liability extended only to' the amount which might be due the defaulting contractor after completion of the contract by the city itself. If the indemnity contract upon a fair consideration and interpretation of *122all its terms- and conditions must -be construed as intended for the benefit of the city alone, this objection is insuperable. On the other hand, i-f it appears from- all the terms and express conditions of the bond that it was intended for the protection of both the city and of laborers and materialmen, such an objection is without force. We are inclined to the view that the latter interpretation should be adopted in this case, and that, in view of all its terms, and -conditions, the contract should be construed as having -been made expressly for the protection of laborérs and materialmen as well as the city.
- It follows that the order of the trial court should be affirmed.