The amended petition is as follows: “Plaintiff for his cause of action states, that he and his associates on the eleventh day of September, 1894, agreed to purchase the property of the Piasa Bluffs Improvement Company, a corporation organized under the laws of the state of Missouri, said property consisting of real estate, notes and accounts, said real estate situated in Jersey county, in the state of Illinois; in order to purchase said property said plaintiff and his associates formed a syndicate and circulated a subscription paper among the parties who desired to become interested in said purchase; that said subscription paper was presented to defendant and he agreed to subscribe for an interest equal to fifty shares of said stock, agreeing to make the first payment on the same as soon as a release of the property which defendant had purchased of the Piasa Bluffs Improvement Company, from the operation of a mortgage or deed of trust, which the said Piasa Bluffs Improvement Company had prior to that time placed upon all of said property, was obtained; for the release of which mortgage, he, the said defendant, agreeing to pay the holder of said mortgage the sum of $250, the proportionate part of the balance due on the property so purchased by him from the said Piasa Bluffs Improvement Company.
“Plaintiff further states that on, to wit, the 15th day of January, 1895, in accordance with the agreement between himself and defendant, said subscription was by plaintiff made for and in behalf of defendant for fifty shares in said syndicate for the purchase of said property, and that said property so purchased by said syndicate from the Piasa Bluffs Improvement Company was conveyed to Robert W. Green, trustee, for the benefit of all the subscribers and purchasers, and, to wit, on the first day of February, 1895, said Robert W. Green made and executed a declaration of trust for the benefit *335of the subscribers to said interest or shares in said syndicate, the said defendant being one of the number; and that after-wards, to wit, on the 19th of February, 1895, said plaintiff for the use and benefit of the said defendant paid Robert W. Green, trustee, the sum of $500 the first payment on the subscription of fifty shares of stock in the syndicate so subscribed by plaintiff for defendant.
“Plaintiff further states that he and his associates were unable at this time to procure the release of the property owned by the said defendant, from the operation of the deed of trust or mortgage as they thought they would be able to do, when the plaintiff on the 25th day of February, 1895, procured from the said defendant an agreement in writing, which is as follows:
“ ,‘St. Louis, Mo., February 25th, 1895.
“ ‘L. Hallock: — I have examined the copy of the subscription paper entered into by yourself and others to purchase thepropertyof thePiasaBluffsImprovementCompanysituated in Jersey county, Hlinois, and I hereby authorize you to subscribe for me, in accordance with the terms of said subscription, fifty shares of the amount of $100 per share, which I do hereby agree to pay for in accordance with the terms of said subscription, and will make my first payment as soon as you secure to me a release of the property which I have purchased of said Piasa Bluffs Improvement Company in said county of Jersey and State of Illinois.
“ ‘(Signed) Robert E. Brier.’
Petition. “Plaintiff further states that after said subscription was made by him for said defendant, and after said sum of money, to wit, the sum of five hundred dollars was paid by for the use an¿ benefit of defendant, the said defendant agreed to pay back to plaintiff said sum of money as above set out.
“Plaintiff further states that afterwards, to wit, on the first day of May, 1897, the property of the defendant was *336released from the operation of the mortgage by a sale made and executed by the trustee of plaintiff and defendant, and defendant thereby became liable to pay said plaintiff said sum of $500 so paid out by him for use of the defendant; that said sum has not been paid; wherefore he sues and demands judgment against defendant for said sum of five hundred ($500) dollars with interest at six per cent from the 19th day of February, 1895.”
To the petition as amended the defendant filed a general demurrer, which was by the court sustained, and plaintiff appealed.
A general demurrer is permissible under the statute where the petition fails to state a cause of action. Morgan v. Bouse, 53 Mo. 219; Wilson v. Polk County, 112 Mo. 126. A demurrer to a petition admits all the material facts alleged therein. Dodson v. Lomax, 113 Mo. 555; Williams v. Gerber, 75 Mo. App. 18; Verdin v. City of St. Louis, 131 Mo. 26. And where a petition shows by implication a contract between plaintiff and defendant and a right of recovery thereon, a general demurrer will not lie. Hirsch v. United States Grand Lodge, 56 Mo. App. 101; Bank v. Scalzo, 127 Mo. 164; Kenton v. Kenton, 74 Mo. App. loc. cit. 178, and cases cited. If therefore an agreement (supported by a valid consideration) by defendant to pay back to plaintiff the $500 paid by plaintiff for the use and benefit of the defendant, can be fairly gleaned from the petition, the general demurrer should have been overruled. As to some of the facts pleaded the petition is somewhat obscure, and others, necessary to establish plaintiff’s right to recover, are indefinitely stated, but we think a fair construction of the petition taken as a whole will bring out the following facts:
*337Statement. *336That plaintiff with others formed a syndicate to purchase the property described, upon which there was a mortgage, which mortgage also embraced lands owned individually *337by tbe defendant; that a subscription paper was prepared and presented to the defendant offering him an opportunity to take stock in the enterprise of the syndicate; that this paper was presented to the defendant in September, 1894, and that he agreed to subscribe for fifty shares of stock on condition that the syndicate, when it redeemed its lands (to be purchased), would at the same time procure the release of defendant’s lands from the mortgage lien, and that defendant further agreed to advance $250 for the purpose of discharging the mortgage when the syndicate was ready to make the redemption; that plaintiff without direct authority from defendant subscribed the fifty shares for defendant, and on February 15, 1895, and without the knowledge of defendant, paid the first payment for him of $500 on his subscription for the syndicate stock; that the lands were purchased by the syndicate and deed made to Robert W. Green, trustee, for the. benefit of all the subscribers, including the defendant, and that Green executed a declaration of trust for their benefit; that afterwards the agreement of February 15, 1895, was executed by the defendant and given to the plaintiff, tand that at that time or some time thereafter, the plaintiff acquitted the defendant of the foregoing facts, and that thereupon defendant agreed to repay plaintiff so soon as his individual lands should be released from the mortgage; that said lands were redeemed in May, 1897. To summarize the petition alleges a subscription for fifty shares of stock made by plaintiff for defendant, which defendant approved and ratified, the condition upon which the subscription became absolute and binding, fullfilled a voluntary payment of $500, on this subscription by plaintiff for the defendant, and a subsequent promise by defendant to repay plaintiff so soon as his lands should be redeemed. The fact that they were redeemed, and the fact that the syndicate procured a deed to the lands which it was organized to acquire *338and that the conveyance made to a trustee for the benefit of all the subscribers, including the defendant. By these transactions defendant was benefited in two ways; first he acquired an interest in the syndicate lands, and second, his lands were redeemed from the lien of the mortgage. Under his original promise defendant would have been legally bound to pay the $500 when his land was redeemed, had not the plaintiff anticipated the redemption and paid for him in advance. There is therefore more than a mere moral obligation to support the promise of the defendant to pay back this $500 to the plaintiff. The promise of defendant to pay on condition became absolute and legally binding on him when the condition was filled, and but for the fact that plaintiff had paid for him in advance he would have been bound to pay the $500 to the syndicate; and even though, as to this payment plaintiff was at first a mere volunteer, he discharged an obligation of the defendant which subsequently became binding and absolute, and with full knowledge of these facts and of his relations to them the defendant made the promise to plaintiff to repay the $500 on the same condition attached to his subscription. He in effect transferred his contrapt with the syndicate to pay, to the plaintiff and substituted the plaintiff as obligee to receive the first payment on his subscription in lieu of the syndicate, and thereby waived his right, if any he had, to treat the plaintiff as a mere volunteer. His moral obligation to pay back the $500 is founded upon an antecedent valuable consideration and has a sound legal basis and should be enforced. Mills v. Wyman, 3 Pick. 207; Wislezenus v. O’Eallon, 91 Mo. 181. The petition when fairly construed contains sufficient allegations to constitute a cause of action, and we reverse the judgment and remand the cause with directions to the circuit court to overrule the general demurrer.
All concur.