delivered the opinion of the court:
These cases involve contests between surety companies on a defaulting contractor’s payment bonds and a bank which sues under an assignment of the moneys due on the contracts given by the contractor to secure loans by the bank.
In both cases, on default of the contractor, the sureties paid laborers and materialmen to whom the contractor was indebted for labor and material furnished in the performance of the contracts. They claim subrogation to their rights against the contractor and to the rights of the United States on the bonds.
1. Contests between a bank and a surety company have been before this court in a number of cases. The most recent are Modern Industrial Bank v. United States, 101 C. Cls. 808; Hardin County Savings Bank et al. v. United States, 106 C. Cls. 577; and Royal Indemnity Co. v. United States, 117 C. Cls. 736. In each case we have decided that the equity of the surety company was superior to the rights acquired by the bank under a valid legal assignment. In so holding, we have relied primarily upon the decisions of the Supreme Court in Prairie State Bank v. United States, 164 U. S. 227, and Hermingsen v. United States Fidelity and *727Guaranty Co., 208 U. S. 404. In United States v. Munsey Trust Co., 332 U. S. 234, at page 240, tbe Supreme Court said:
* * * From Prairie State Bank v. United States, 164 U. S. 227, to American Surety Co. v. Sampsell, 327 U. S. 269, we have recognized the peculiarly equitable claim of those responsible for the physical completion of building contracts to be paid from available moneys ahead of others whose claims come from the advance of money. * * *
We reiterate our former opinion that the equity of the surety company is superior to the rights of the bank acquired under an assignment, whether the surety’s rights are derived from the discharge of its liability on a performance bond or on a payment bond. In Prairie State Bank, supra, the surety had discharged its liability on a performance bond, and in Henningsen, supra, its liability on a payment bond.
No one seems to deny that the rights of a surety on a performance bond are superior to the rights of a bank as the contractor’s assignee. This is because, as held in the Prairie State Bank case, the surety is subrogated to the rights of the United States, and the United States had the right to use the money in its hands to complete the contract on the default of the contractor. Hence, the surety having completed the contract, it was entitled to the money. It was entitled to it as against the bank because its rights of sub-rogation arose at the time it executed the bond, which was prior to the assignment to the bank.
But it is said, notwithstanding the holding in the Hen-ningsen case, that this is not true in the case of a surety on a payment bond. The theory is that the United States is under no legal obligation to pay laborers and materialmen (United States v. Munsey Trust Co., 332 U. S. 234), that all it is interested in is getting its building, and if it gets it, it does not care who gets the money left in its hands, whether the laborers and materialmen, or some bank to whom the defaulting contractor had assigned it.
This is contrary to the holding in the Henningsen case. The decision in that case was based on the discharge by the surety of the equitable obligation of the United States to see that the laborers and materialmen were paid.
*728Customarily, in a construction contract between private parties, laborers and materialmen have a lien on the building to secure payment of their claims; hence, if a contractor fails to pay laborers and materialmen, the owner of a private building has the right to use any money owing to the contractor to discharge his obligation to the laborers and ma-terialmen. His right to do this is superior to the rights of an assignee. But a building erected for the United State is not subject to a lien, and the United States is under no legal liability to pay laborers and materialmen; but it is under an equitable obligation to do so. To discharge this equitable obligation, Congress passed the Miller Act (49 Stat. 793), carrying forward prior acts and enlarging them, which requires the execution of a payment bond payable to the United States as a condition precedent to the letting of a Government contract. Under such bond the surety guarantees the payment of laborers and materialmen, and upon performance of this obligation, it relieves the United State from its equitable obligation to see that the laborers and material-men are paid. For this reason it is subrogated to the right of the United States to apply this money to the payment of laborers and materialmen, in the discharge of its equitable obligation, although the United State was under no legal liability to do so. Since the right of the United States to so use the money is superior to the bank’s rights as the contractor’s assignee, the right of the surety who pays them is superior to the bank’s right.
There would seem to be no doubt of the right of the United States to use the contractor’s money in its hands to discharge the contractor’s obligation to laborers and materialmen. One of the obligations assumed by the contractor under his contract with the United States was to pay laborers and ma-terialmen. If he fails to do so, the United State has the right to use money due him to do what he agreed to do. It would be inequitable for the United State to retain the benefits of what the laborers and materialmen had done for it and pay to some one else money which the contractor should have paid to them. See Henningsen v. United States Fidelity and Guaranty Co., supra.
*729Since the United States is under an equitable obligation to see that laborers and materialmen are paid, as held in the Henningsen case, supra, the laborers and materialmen have the equitable right to assert a claim to moneys in the hands of the defendant which are due the contractor. When the surety pays the laborers and materialmen, it becomes subro-gated to their right to assert an equitable claim to the moneys in the hands of the defendant. It has frequently been held that they have equitable priority to these moneys over the general creditors of the contractor and over his assignees. Greenville Savings Bank v. Lawrence, 76 Fed. 545 (C. C. A. 4); In re P. McGarry and Son, 240 Fed. 400 (C. C. A. 7); Belknap Hardware Co. v. Ohio River Co., 271 Fed. 144 (C. C. A. 6); American Surety Co. v. Westinghouse Electric Mfg. Co., 75 F. 2d 377 (C. C. A. 5), affd. 296 U. S. 133; and Martin v. National Surety Co., 85 F. 2d 135 (C. C. A. 8), affd. 300 U. S. 588.
See also our opinion in John A. Hadden, Trustee, v. United States, No. 50038, this day decided.
In United States v. Munsey Trust Co., supra, the Supreme Court said that the United States was not legally liable to laborers and materialmen, but the court did not say that laborers and materialmen could not assert an equitable claim to moneys in the hands of the United States payable under the contract. We think they can. To permit them to do so in no way interferes with the full exercise of the sovereign powers of the United States. It does not subject the defendant to liability beyond the amount it has in its hands confessedly due and owing to somebody.
Looked at from another light, the surety’s rights are superior to the rights of the bank: It is settled that the surety’s rights arising by subrogation or substitution relate back to the date of the execution of the surety bonds. Prairie State Bank v. United States, supra; Henningsen v. United States Fidelity and Guaranty Co., supra; and the cases following those decisions. Thereupon, there accrues to the surety the equitable right to the moneys due from the Government to the contractor to the extent that the surety discharges the contractor’s obligation to the Government.
*730Subsequently, tbe contractor, under the burden of this obligation to the surety, goes to a bank to borrow money. He tells the bank that he has this contract with the Government and offers to assign to the bank moneys to become due thereunder. He may or may not tell the bank that he has executed bonds to secure the faithful performance of the contract, but whether or not he does, the bank is charged with notice thereof, because of the requirement of the Miller Act, supra. Not only is the bank charged with notice thereof, but it is inconceivable that it did not have actual notice thereof. Hence, when the bank lends the contractor money, it lends him the money with knowledge of the fact that he has previously obligated himself to the surety to turn over to it any money to which he is entitled under the contract, to indemnify the surety for any loss it may sustain on the bonds. This is an obligation already incurred and, therefore, any obligation which the contractor may assume to the bank must be subject to his prior obligation to the surety. The bank, therefore, lends the money under the risk that there will not be enough left to pay its debt after the contractor’s prior obligation to the surety has been satisfied.
Furthermore, it does not affirmatively appear in this case whether or not the money borrowed from the bank was used in the performance of these contracts, and, if so, which of the two. The purpose of the 1940 amendment [54 Stat. 1029] to the Assignment of Claims Act (41 U. S. C. 15; 61 Stat. 501; 65 Stat. 41) was to enable a contractor to obtain money to finance his contracts with the United States. If the money borrowed was not used in the performance of the contract, the lender is not equitably entitled to the benefit of the assignment.
We reiterate what we have said in prior cases that the 1940 amendment to the Assignment of Claims Act, supra, was intended to do nothing more than to remove the prohibition embodied in Revised Statutes 3477 and 3737, against assignment of a claim against the United States in the case of a financial institution lending money to a contractor with the Government. Prior to the passage of the amendment, the contractor could not assign his claims against the Government, but under this Act he was permitted to do so to a *731financial institution. However, under the assignment, the bank, insofar as prior obligations were concerned, received no more than it would have gotten had Eevised Statutes 3477 and 3737 not been enacted.
Notwithstanding the passage of the amendment, the issue since its passage is the same as it was when the Prairie State Bank case and the Hermingsen case were decided, to wit, who has the superior equity, the surety or the bank.
We recognize that the Fifth Circuit takes the contrary view in Coconut Grove Exchange Bank v. The New Amsterdam Casualty Co., 149 F. 2d 73, and General Casualty Co. v. Second National Bank of Houston, 178 F. 2d 679.
2. In the National Surety Company case, the First National Bank in Houston also claims under an assignment executed under article 260-1 of Vernon’s Civil Statutes of the State of Texas. This assignment was executed on January 30, 1950. The contract in the National Surety Company case was entered into on September 1, 1950, and, hence, the statute relied upon is not applicable because it relates to the assignment of accounts due or to become due “under an existing contract.” This contract not having been in existence at the time of the assignment, amounts due under it are not covered by the assignment. It was so held by the Texas Court of Civil Appeals in Kieran v. Salley, 244 S. W. 2d 663. The same thing was held by the United States District Court for New Jersey concerning a similar statute, in the case of Seaboard Surety Co. v. State of North Dakota, 94 F. Supp. 177. The surety’s assignment was by operation of law, which does not appear to be covered by the Texas statute.
In the Fidelity and Deposit Company of Maryland case, the bank relies also upon the assignment executed under article 260-1 of Vernon’s Civil Statutes of the State of Texas. That contract was executed prior to the assignment and, hence, accounts due under the contract would have been covered by the assignment, but the surety’s rights arose when .the. contract with the United States was signed, which was prior to the assignment to the- bank and, hence, the surety’s .rights are superior.
*7323. The bank says that the sureties are claiming only as the assignees of the trustee in bankruptcy of the contractor, Thomas Bryan & Associates, Inc., and that, therefore, they are entitled to recover only if the contractor is entitled to recover, and it says that the contractor is not entitled to recover as against the bank because of its assignment to the bank. This is in error.
The trustee in bankruptcy did assign “all claim and right to the balance on the above contract to National Surety Corporation and does hereby consent to the payment of said balance to said National Surety Corporation.” But the sureties do not rely alone upon this assignment; they rely upon their right of subrogation as the sureties on the contractor’s bonds, which rights arose long prior to the assignment to the bank. There is nothing to show that when the sureties accepted the assignment from the trustee in bankruptcy they intended to forego all their other rights.
The order of the court in the bankruptcy proceedings made no reference to the conflicting claims of the sureties and the bank.
4. The Fidelity and Deposit Company of Maryland was the surety on the payment and performance bonds on contract AT (29-1)-838, and the National Surety Corporation was the surety on the performance and payment bonds on contract AT (29-1)-994. The parties have stipulated that the amount due by the defendant on both of these contracts is $166,159.95, less an amount of $45,429.58 which the contractor owes the defendant for taxes. This leaves an amount due by defendant on both contracts of $120,730.37.
It is agreed that the $45,429.58 due the defendant for taxes shall be apportioned between the amounts due by the defendant on contracts AT (29-1)-838 and AT (29-1)-994 in proportion to the amounts due on each contract.
On each contract the sureties have paid amounts largely in excess of the amounts now due by the defendant on said contracts.
According to the stipulation of the parties, including the Government, on contract AT (29-1)-994, on which the National Surety Corporation was surety, there is due, before taxes, the sum of $100,918.34. On contract AT (29-1)-838, *733on which. Fidelity and Deposit Company of Maryland was surety, there is due the sum of $65,241.61. According to the stipulation, therefore, there is to be deducted from the $100,-918.34, which the plaintiff National Surety Corporation is entitled to recover, the sum of $27,591.95 for taxes, and there is to be deducted from the amount of $65,241.61, which the Fidelity and Deposit Company of Maryland is entitled to recover, the sum of $17,837.63 for taxes.
Judgment will be entered in favor of the National Surety Corporation for the sum of $73,326.39, and in favor of the Fidelity and Deposit Company of Maryland in the sum of $47,403.98.
Madden, Judge; and Littleton, Judge, concur.