This is an appeal from a judgment of the District Court of New Mexico in favor of appellee, Maryland Casualty Company, on a contract between appellant, Don Hamill and the Gunnell Construction Company.
The pertinent facts are briefly to the effect that the Gunnells were engaged in the general construction business. Appellant, Hamill, was a merchant in Las Cruces, New Mexico. To stabilize their financial condition by providing necessary working capital pending completion and final acceptance of construction projects, the Gunnells prevailed upon Hamill to enter into a contract dated May 4, 1951. As inartistically drawn by the Gunnells, the contract provided that Hamill would advance 10 per cent of any contracts awarded the Gunnell Construction Company and approved by Hamill, in consideration of 10 per cent of the net profits realized on any such contracts. The amount of the advances under the contract were to be evidenced by notes of Gunnell payable to Hamill and attached to the contract.
While this contract was in force, and with the approval of Hamill, Gunnell entered into a contract with the Board of Regents of a New Mexico state college for the construction of a physical science laboratory annex. The contract was for the total amount of $30,723.00, and the Maryland Casualty Company issued its conventional performance bond. While the Gunnell-Hamill contract was in force, and with Ilamill’s approval, the Gunnells contracted to construct an addition to the La Mesa Elementary School in Dona Ana County, New Mexico, for the total sum of $25,538.14. When Gunnell made application to Maryland for a performance bond, it was informed by Maryland’s local agent that Gunnell’s working capital was insufficient to justify the issuance of the bond. Whereupon, one of the Gunnells submitted the Hamill contract, apparently to strengthen the company’s financial stability. When the local bond-writing agent submitted the contract to the general agent in El Paso, Texas, a new contract was drafted and returned to the local agent, who gave it to the Gunnells for execution, with the explanation that the obligations of the parties under the first contract were not sufficiently clear. In the revised contract, Hamill agreed to advance, as additional operating capital to be used in the performance of contracts awarded to the Gunnells with his approval, 10 per cent of the contract price; and the Gunnells agreed that upon final completion and acceptance of the contract, the payment of all bills and expenses, and the collection of the final amount due on the contract, it would return to Hamill the amount advanced in connection with the contract, plus 10 per cent of the net profits realized from its performance. It was further agreed that the amounts advanced by Hamill on any contract would be evidenced by a promissory note due and payable only upon final completion and acceptance of the contract and the final payment thereon. The latter contract, dated May 18, 1951, was submitted to Hamill by one of the Gunnells with the explanation that the bonding company wanted a clarification of the first contract, and that the latter contract had been drafted for that purpose. Hamill executed the contract without scrutinizing it, and a copy was submitted to the El Paso office by the local agent, after which the performance bond for the La Mesa project was executed.
During the construction of the two projects, Hamill advanced approximately $15,000 to enable Gunnell to “complete his job and get paid for it.” After the projects were completed and the last payment received, Gunnell informed Hamill that they were in “financial difficulty”; that they “had more bills than *340they had money.” Hamill replied, “according to our agreement, you are supposed to repay me”, and one of the Gun-nells answered, “Well, under the terms of the agreement we will pay you.” On the next day Hamill presented his notes for amounts advanced and they were paid. Upon completion of the college project, there was $9,691.15 in unpaid bills for labor and material, and $11,229.-30 unpaid bills on the La Mesa School project.
To discharge its obligation on the performance bonds, Maryland paid the outstanding claims and brought this suit against Gunnell and Hamill jointly to recover such sums. The complaint, in two counts, alleged the execution of the performance bond, the indemnity agreement, the Gunnell-Hamill contracts and the payment of the outstanding bills on each project. The demand was for judgment against Gunnell and Hamill jointly on each count for the amounts paid by Maryland to discharge the performance bond. The suit was prosecuted apparently on the theory that Gunnell and Hamill were partners and jointly liable to indemnify Maryland,
The trial court rejected the partnership theory in its entirety. It found, however, that the performance bond for the La Mesa School project was furnished by Maryland in reliance upon Hamill’s last agreement with Gunnell to advance 10 per cent of the contract price in the amount of $2,553.81; that in pursuance of the agreement, Hamill did advance 10 per cent of the contract price on the La Mesa School project; and that “before all of the bills were paid on the said building the defendant Gunnell repaid to the defendant, Don Hamill, out of proceeds from the La Mesa School contract, the said sum of $2,553.81, contrary to the provisions of said agreement of May 18, 1951, which said repayment was made to the defendant, Don Hamill, prior to September 15, 1951.”
Apparently proceeding on the theory that having relied upon the Gunnell-Hamill contract in the issuance of its performance bond, Maryland became a third party beneficiary and entitled to sue for its breach; and having further found that Hamill breached the contract by demanding and receiving payment before the bills were paid, the court rendered judgment for Maryland for 10 per cent of the contract price advanced by Hamill on the La Mesa School project in the total sum of $2,553.81. Since Maryland admittedly did not reply upon the Gun-nell-Hamill contract in the issuance of the performance bond on the college project, the court denied any relief against Hamill on the first cause of action.
Hamill has appealed from the judgment on the second cause of action, contending that Maryland, not being a party to the Gunnell-Hamill contract, cannot maintain this suit upon it.
Of course Maryland may recover upon any theory legally sustainable under established facts regardless of the demand in the pleadings. See Rule 54(c) F.R.C.P., Rule 15(b) F.R.C.P., 28 U.S.C.A.; Garland v. Garland, 10 Cir., 165 F.2d 131; Preas v. Phebus, 10 Cir., 195 F.2d 61; Blazer v. Black, 10 Cir., 196 F.2d 139, 147; Schoonover v. Schoonover, 10 Cir., 172 F.2d 526. And, New Mexico, where this contract was made and sought to be enforced, recognizes the now well established rule to the effect that a third party may sue and recover upon a valid contract in which he has a beneficial interest, whether designated therein as beneficiary or not. Lawrence Coal Co. v. Shanklin, 25 N.M. 404, 183 P. 435; Southwestern Portland Cement Co. v. Williams, 32 N.M. 68, 251 P. 380, 49 A.L.R. 525; Johnson v. Armstrong & Armstrong, 41 N.M. 206, 66 P. 2d 992; Rankin v. Ridge, 53 N.M. 33, 201 P.2d 359, 7 A.L.R.2d 510. See also cases collected Annotations 77 A.L.R. 21; 81 A.L.R. 1286; 118 A.L.R. 57; 12Am.Jur. Contracts p. 825, Sec. 277.
The intent to benefit the third person is generally said to be controlling, and it is to be gathered from a construction of the contract in the light of the surrounding circumstances. See Annota*341tion 81 A.L.R. 1286, Subsection d; 12 Am.Jur. Contracts 831, § 280; 17 C.J.S., Contracts, § 519(c), p. 1127. The third party may be (a) a donee beneficiary, (b) a creditor beneficiary, or (c) an incidental beneficiary, Restatement on Contracts, § 133; either a donee or creditor beneficiary may recover, Sections 135 and 136; but an incidental beneficiary may not, Section 147. Kelly v. Richards, 95 Utah 560, 83 P.2d 731, 129 A.L.R. 164; Williston on Contracts, Rev.Ed., Vol. 2, p. 1041, § 356.
The manifest purpose or motive for the contract was benefit to the parties. Gunnell sought financial stability for his business, and Hamill profits from his investment. But, “motive and intent are not synonymous. * * * ‘Intent, in its legal sense, is quite distinct from motive. It is defined as the purpose to use a particular means to effect a certain result. Motive is the reason which leads the mind to desire that result.’ ” See James Stewart & Co. v. Law, 149 Tex. 392, 233 S.W.2d 558, 561, 22 A.L.R.2d 639. Moreover, Mr. Williston says, “There is no requirement of a mutual intent, as to right of enforcement, on the part of the contracting parties; instead, it is the intent or purpose of the promisee who pays for the promise that has been generally looked upon as governing * * * if an intent can legitimately be found to give a third party a right, the intent should be given effect.” Williston, § 356A. It has been said that so long as the contract necessarily and directly benefits the third party, he may enforce it. Byram Lbr. & Supply Co. v. Page, 109 Conn. 256, 146 A. 293. Otherwise stated, if the “performance of the promise will satisfy an actual or supposed or asserted duty of the promisee to the beneficiary”, he is a creditor beneficiary and may enforce the promise. See Sections 133(b) and 136(1) (a) Restatement Contracts; Williston, § 361. The beneficiary’s right is of course limited by the terms of the promise. See Williston § 364A.
Fairly interpreted, Hamill’s agreement with Gunnell to advance 10 per cent of the contract price, to be repaid only after the completion of the contract and the payment of all bills, constituted a contingent promise to pay the expenses incident to the performance of the contract to the extent of 10 per cent of the contract price. This promise was an available asset to Gunnell on which Maryland relied when it executed the performance bond. If Maryland had furnished labor and materials on the project, Hamill would have undoubtedly been obligated to the extent of 10 per cent of the contract price to Maryland and all others similarly situated. We think the liability is not different where Maryland furnished a bond to guarantee payment of the bills and did pay them in performance thereof. If Hamill had not received repayment of his advances before the bills were paid, the amount of such advances would have been subjected to the satisfaction of the bills and Maryland would have been thus benefited. When Maryland issued its performance bond in reliance upon Hamill's contingent promise, it thereby acquired a vested beneficial interest in the performance of the promise, and that interest could not be defeated or impaired by a subsequent rescission. See Annotation 53 A.L.R. p. 181, Subdivision III; Williston, Vol. 2, § 397. Whether Maryland may be called a creditor beneficiary of Hamill’s promise or subrogee of the third party beneficiary labor and material claimants, its right to recover is equally plain. Cf. James Stewart & Co. v. Law, supra.
The judgment is affirmed.
PICKETT, Circuit Judge, concurs in the result.