Burgess, J.
This case was appealed from the circuit court of Harrison county to the Kansas City Court of Appeals where the judgment was affirmed, but thereafter the case was certified to this court by the court of appeals, upon the ground that one of the judges of that court was of the opinion that the decision is in conflict with the decision of this court in the case of St. Louis Public Schools v. Woods, 77 Mo. 197.
This is an action upon a bond executed by the defendant Howard as principal, and defendants Yandivert and Phillips as his securities to the city of Bethany, Missouri. On the eighteenth day of June, 1894, Howard *674entered into a- contract with the city of Bethany to dig for it a well on lot four, block seven of Blackburn’s addition to said city for the sum of $800. At the time of the execution of the contract said Howard as principal, and Ashman H. Vandivert and George L. Phillips as securities, executed and delivered to said city their bond in the penal sum of $1,000, conditioned for the faithful performance of the work by Howard and the payment by him for all labor done on said well, and for all materials furnished for or used on the same. The conditions and covenants of the bond as set out in the petition are that, whereas said L. W. Howard had on that day entered into a written contract with said city of Bethany by which he had agreed to dig, wall and complete said well for said city, for the sum of $800, the said L. W. Howard to pay for all labor done on said well, and for all material used or furnished for the same, the said well to be dug and walled up and finished according to certain written plans and specification which were made a part of said contract; and if the said L. W. Howard should dig said well according to his said contract with said city of Bethany, and according to the plans and specifications, and should pay for all labor done on said well, and also pay for all material furnished for or used on the same, and should complete said contract in a good and workmanlike manner by the eighteenth day of July, 1894, then said obligation to be void, otherwise to remain in full force and effect.
The petition then proceeds as follows: “Plaintiff further states that said condition in said bond for the payment for all labor done or material furnished in the construction of said well, was inserted therein in pursuance to the provision of the said written contract between said L. W. Howard and said city of Bethany for the sole and express purpose of protecting all *675persons who should do work upon or furnish material for the construction of said well, and because it was well known to all of the parties to said bond or writing obligatory that said L. 'W. Hóward was wholly and totally insolvent as hereinbefore' alleged. Plaintiff further states that, relying upon the said provisions in said written contract between said L. ‘W. Howard and said city, and upon the indemnity and protection provided and offered thereby, and relying solely upon the said conditions and terms of said bond or writing obligatory and knowing that said L. W. Howard was insolvent, he did, after the execution of said contract and said bond and during the construction of said well, furnish to said L. W. Howard the following material of the value stated, and which' was by him, the said L. W. Howard, used in the construction of said well to wit:
139^ Perch, of stone, at $1 perpereh.........j.......$139.50
By Cash........................................... 42.60
Balance due..........................................$ 90.00
“That said L. W. Howard has failed and neglected to pay for the same, although often requested so to do, and the whole amount thereof is yet due and unpaid. Plaintiff further states that after the completion of said well, to wit, about the 17th day of August, 1894, he presented his bill for the material aforesaid to the proper officers of said city of Bethany, and demanded and requested said city to protect the plaintiff in his said claim, and to deduct the amount thereof from any balance that might be due to said L. W. Howard for constructing said well; that thereupon said city of Bethany was about to exercise the right conferred upon' it by said contract to pay said claims for work and material out of the balance claimed by said defendants to be due on said contract, and was about to pay the claim of plaintiff and others who had furnished materials for the construction of said well, when the *676defendants and each, of them in his own proper person appeared before the board of aldermen of the said city of Bethany on or about the said 17th of August, 1894, and then and there admitted and agreed that they were liable under said condition of said contract and bond for said bills of plaintiff and others who had furnished material for the construction of said well, and that if said city of Bethany would receive and accept said well from them, and would pay to the defendants the sum of one hundred and ninety-six dollars and seventy-five cents, the balance due for constructing said well, they, the said defendants, would immediately pay to this plaintiff and the other persons who had furnished material for the constructing of said well, the full amounts of their respective claims; and that the agreement of said city of Bethany to accept said well and to pay said balance claimed by the defendants to be due for the construction thereof was upon the express condition that the defendants would pay said claim of plaintiff and others; that but for said agreement upon the part of the defendants L. W. Howard, Ashman H. Vandivert and Q-eo. L. Phillips, the said city of Bethany would have then and there paid the claim of plaintiff out of the balance due said L. W. Howard from said city; that plaintiff being fully advised of said arrangement between said city and said defendants, agreed to and acquiesced therein, fully relying on the agreement of the defendants to pay the claim of plaintiff; that immediately after said agreement between said city and the defendants hereinbefore alleged and set forth and upon the same day, the defendant ratified and reaffirmed the same to this plaintiff, and promised the plaintiff that they would pay his said claim on the following day. Plaintiff further states that immediately upon the making of said agreement on or about said 17th day of August, 1894, between *677said city and said defendants, and in consummation thereof, said city did receive and accept said well and did pay to the defendants Ashman H. Yandivert and Geo. L. Phillips, at the instance of the defendant L. W. Howard, the sum of one hundred and ninety-six dollars and seventy-five cents, but the said defendants Ashman H. Yandivert and Geo. L. Phillips, after procuring the acceptance of said well and the payment of said sum of one hundred and ninety-six dollars and seventy-five cents, as aforesaid, wholly failed and refused to keep their said agreement or to pay to this plaintiff the balance of his said claim or any part thereof. Wherefore plaintiff says that by reason of the facts aforesaid the defendants have become liable to him for the said sum of ninety-six dollars and sixty cents, with interest thereon from the said 17th day of August, 1894, for which, with costs, the plaintiffs asks judgment.”
Defendants demurred to the petition upon the ground that it does not state facts sufficient to constitute a cause of action. The demurrer was sustained, and plaintiff declining to plead further, judgment was rendered in favor of the defendants.
Defendants take the position that plaintiff is not entitled to recover on the bond sued on, nor on the contract referred to in the petition, because not privy to that contract, and for the further reason that the city of Bethany has no authority under its charter to make contracts for the benefit of strangers or third pai’ties.
There are authorities which sustain defendants’ position , but the more recent decisions of this court are the other way, and to the effect that a contract between the parties, made upon a valid consideration, may be enforced by a third person, though not named in the contract, where the obligee owes to him some duty *678legal or equitable which would give him a just claim. In St. Louis to use v. Von Phul, 133 Mo. 565, the court said: “That a contract between two parties upon a. valid consideration may be enforced by a third party, when entered into for his benefit, is well settled law in this State. This is so though such third party be nob named in the contract and though he was not privy to the consideration. Rogers v. Gosnell, 58 Mo. 590; State ex rel. v. Gaslight Co., 102 Mo. 482; Ellis v. Harrison, 104 Mo. 276, and cases cited. It is sufficient in order to create the necessary privity that the promisee owe to the party to be benefited some obligation or duty, legal or equitable, which would give him a just claim.” In that case the case of Kansas City, Etc., Co. v. Thompson, 120 Mo. 221, relied upon by defendants as announcing a reverse doctrine was expressly overruled, and the case of Howsmon v. Trenton Water Co., 119 Mo. 304, and cases cited also relied upon by defendants, distinguished from the Von Phul case and cases of like character, upon the ground that cities are under no legal or moral obligation bo its citizens to extinguish fires, and for that reason there is no such privity between them as promisees and the citizens as would give the citizen a right of action on the contract.
Kansas City ex rel. v. O’Connell, 99 Mo. 357, is not an authority in support of defendants’ position. That was an action for damages for personal injuries in the name of the city against O’Connell on his bond to the city in the nature of a contract' containing among other things, the following stipulations: “It is further distinctly agreed that the said party of the first part shall be responsible for all unlawful damages to persons or property from negligence or carelessness, in doing said work, or in not using proper precaution, between commencing and completing the job, by barricades, signals, lights or otherwise, to prevent injury *679to persons or property from said work, and the approaches thereto, and shall indemnify the city of Kansas against all losses or claim for damages, on account of such neglect, or carelessness; and the said party of the first part covenants with said city of Kansas to pay all laborers employed on said work........Said parties of the second part hereby guarantee that said party of the first part will well and truly perform the covenants hereinbefore contained, to pay all laborers employed on said work, but they shall not be liable, on this guarantee, beyond two thousand dollars, the estimated cost of the labor on said job; and said parties of the second part hereby agree with said city of Kansas that said party of the first part will well and faithfully perform each and all of the terms and stipulations in the foregoing contract to be done, kept and performed on the part of the said party, and said parties of the second part shall not be liable hereon beyond the sum of eight thousand dollars.” It was held that the provisions of the bond were those of indemnity in favor of the city, and created no liability in favor of third perr sons. The court expressly declined to express an opinion with respect to the power of the city to enter into a contract for the benefit of third parties. It observed: “Whether the city could require the contractor to give a bond, which would be available to third persons in case of injuries received by them, on account of the negligence of the contractor, is a question which need not be considered.”
The petition in this case alleges in effect that plaintiff after the execution of the contract between Howard and the city of Bethany for digging said well, knowing that Howard was insolvent and relying solely upon the terms and conditions of said bond, he did during the construction of said well, furnish to said Howard the material described in the petition, which *680was used in the construction of said well and for which he has not been paid, and by these affirmative allegations shows a breach of that condition of said bond by which it is provided that the said L. W. Howard “is to pay for all material used or furnished” for said well.
In the case of City of St. Louis to use v. Von Phul, supra, it is further observed: “The following cases uphold the right of third persons, such as subcontractors, laborers, and material men to maintain an action on a bond, given by a contractor to a State, county, city, or school district, conditioned for the faithful performance of a contract for a public improvement, and for the payment of all claims of such third persons, though no express power was given the obligee to-require such conditions.” Citing Baker v. Bryan, 64 Iowa, 562; Lyman v. City of Lincoln, 38 Neb. 800; Sample v. Hale, 34 Neb. 221; Korsmeyer, Etc., Co. v. McCay, 43 Neb. 649; Kauffmann v. Cooper, 65 N. W. Rep. 796. The same rule is announced in The Board of President and Directors of the St. Louis Public Schools v. Woods, 77 Mo. 197.
The city of Bethany is a city of the fourth class, and under its charter has the power to provide water for the use of its citizens and in letting the contract to Howard for that purpose it had the right under the authorities cited to require of him a bond as in this case, conditioned for the payment of laborers, and material men, upon which they might sue upon breach of these conditions.
Our conclusion is that the petition states a cause • of action and that the demurrer thereto should have been overruled.
For these considerations we reverse the judgment of the court of appeals and remand the cause to that court with directions to reverse the judgment of the *681circuit court and remand the' cau.se to be tried in accordance with this opinion.
Gantt, P. J., and Sherwood, J., concur.