opinion: WESTERN CASUALTY AND SURETY COMPANY, a corporation, Appellant, v. Walter S. BROOKS, Trustee, Appellee. In the Matter of BRUNS COAL COMPANY, Inc. a corporation, d/b/a Bolt Mining Company, Bankrupt.
  No. 10236.
  United States Court of Appeals Fourth Circuit.
  Argued March 10, 1966.
  Decided June 1, 1966.
  Charles W. Yeager, Charleston, W. Va., and Joseph F. Hogan, Columbus, Ohio, for appellant.
  Robert J. Ashworth, Beckley, W. Va., for appellee.
  Before SOBELOFF, Circuit Judge, MARVIN JONES, Senior Judge, United States Court of Claims, and J. SPENCER BELL, Circuit Judge.
  Sitting by designation of the Chief Justice.
  MARVIN JONES, Senior Judge:
  The question presented on this appeal is the right of a surety on two public construction contracts, both performed by the same contractor, to setoff losses incurred on one bond with the excess realized on the other. In the bankruptcy proceedings against the contractor, the Referee held that the surety had no right of setoff, and therefore should surrender to the trustee the $23,882.26 excess realized on one contract. The District Court affirmed and this appeal followed. We affirm.
  The facts in this case, as stipulated by the parties, are briefly as follows: In 1958 the bankrupt, Bruns Coal Company, Inc., contracted with the State of Ohio to perform two separate road construction projects — Projects 24 and 37. Each contract was signed independently of the other and covered work in separate counties. As a prerequisite to entering into these two contracts, the contractor was required by State statute to execute a separate performance-payment bond for each contract. This was done, with the appellant becoming surety on both bonds. In the applications for these bonds, the contractor-principal assigned to the surety as collateral security all sums in the hands of the obligee-State and due to the contractor at the time of any breach, or which might become due thereafter. These agreements further provided that the assigned funds could be used by the surety to offset losses incurred on the individual bond or on any other bond between the two parties. The assignments were never recorded as required by State law.
  By the end of 1960 the contractor had completed all required construction work on the two projects. However, it had failed to pay certain subcontractors, laborers, and materialmen, who, in accordance with State law, filed mechanic’s liens with the State notifying it of the debts owed by the contractor. This statute further provided that the State, upon receipt of these lien notices, was to withhold all subsequent payments becoming due to the contractor until the laborers and materialmen had been paid. If payment did not follow, the State was to make payments directly to the laborers and materialmen out of the retained funds. If this latter course was not followed, the statute permits the unpaid parties to recover against the State up to, but not exceeding, the balance due to the contractor.
  Upon receipt of these various liens on the two projects, the State withheld all further payments to the contractor. The surety then proceeded to satisfy these various claims as it was obligated by the bond agreement and by State statute. By August 1962 all claims arising under both contracts had been paid by the surety.
  In December 1960 the contractor directed the State, by letter, to send all future payments falling due on each contract to the surety. This was done, and between December 8, 1961 and June 11, 1962 the surety received a total of $103,-414.87 from the State: $87,141.69 on Project 24 and $16,273.18 on Project 37. The payments the surety was required to make on Project 24 totaled $63,259.43, thereby leaving an excess on that bond of $23,882.26. However, the payments on Project 37 totaled $160,702.45, thereby causing a loss of $144,429.27.
  An involuntary petition in bankruptcy was filed against the contractor on March 15, 1962. This date was within 4 months of the receipt of the first payments by the surety from the retained funds in the hands of the State. The contractor was adjudged a bankrupt on April 9,1962 and the trustee in bankruptcy filed a petition for turnover of all the sums received by the surety from the State — $103,414.87, claiming these payments were voidable preferences under Section 60 of the Bankruptcy Act.
  It was decided by the Referee in Bankruptcy that the assignments made to the surety in the bond applications, not having been recorded in accordance with State law, were invalid as against the trustee in bankruptcy. Section 70c of the Bankruptcy Act. The Referee further held that the $103,414.87 in payments received by the surety within 4 months of the filing of the involuntary petition in bankruptcy were voidable preferences under Section 60 of the Bankruptcy Ait, unless the equitable doctrine of subrogation could be made applicable. On this latter point, both the Referee and the District Court agreed that- subrogation was applicable on each bond to the extent of the claims made by laborers and material-men on that particular bond. In other words, the surety was not permitted to apply the $23,882.26 in excess payments realized on Project 24 to offset either its legal or miscellaneous expenses on that project or its losses on Project 37.
  The surety has not appealed the decision holding the assignments invalid, or the determination that the payments were voidable preferences if subrogation is inapplicable to the $23,882.26. Likewise, the trustee in bankruptcy has not appealed the decision that the surety is legally entitled to $79,532.61 of the payments via subrogation. Therefore, the sole issue raised by this appeal is whether the appellant-surety is entitled to the $23,882.26 excess realized on the Project 24 bond, by way of subrogation.
  It is now settled law, since the decision in Pearlman v. Reliance Ins. Co., 371 U.S. 132, 83 S.Ct. 232, 9 L.Ed.2d 190 (1962), that when a surety meets its obligations on a contract bond by paying the claims of the laborers and materialman, it subrogates to whatever rights the owner (State), contractor, and laborers and materialmen had in the retained funds, “to the extent necessary to reimburse it.” And since this “equitable right” of the surety to the fund relates back to the date of the surety bond, it entitles the surety to priority in payment over all subsequent lienholders and general creditors. By the surety’s acquiring this equitable interest in the retained funds, “this property interest of the surety never became a part of the bankruptcy estate to be administered, liquidated, and distributed to general creditors of the bankrupt.”
  In the only pronouncement by the Supreme Court of Ohio related to this question, State ex rel. Southern Surety Co. v. Schlesinger, 114 Ohio St. 323, 151 N.E. 177, 45 A.L.R. 371 (1926), it was held that the surety on a performance bond, upon completing the performance of the contract (not the payment of claims by laborers and materialmen) was subrogated to the rights of the State in the retained funds. It may therefore be inferred that the Ohio Supreme Court would also apply the doctrine of subrogation where the surety acts on the payment bond to pay off the claims of laborers and materialmen.
  The right of subrogation is an equitable doctrine, designed to perform substantial justice. “[I] t goes no farther than the strict demands of equity and justice demand.” First Nat’l Bank of Seattle v. City Trust, Safe Deposit & Surety Co., 114 F. 529, 533 (9 Cir. 1902). The doctrine entails the right of “a surety who pays the debt of another * * * to [assert] all the rights of the person he paid to enforce his right to be reimbursed.” Pearlman v. Reliance Ins. Co., supra, at 137, 83 S.Ct. at 235.
  It is clear from the foregoing that the surety cannot, by way of subrogation, assert any greater rights than the creditor in whose shoes it is substituted. The surety has paid under legal obligation the debt of another (the contractor), and so is allowed to succeed to the rights of the creditor (laborers and material-men) in enforcing the collection of the debt so that the party primarily answerable on the debt, and who in equity and good conscience should pay the debt, will feel the ultimate expense. The appellant-surety cannot, therefore, by subrogation retain any of the funds on either project which are in excess of the claims of the laborers and materialmen on that individual project — claims paid by the surety under each separate bond. If the surety were allowed to offset either legal and miscellaneous expenses on the excesses received from Project 24, or the losses incurred on Project 37, the outcome would be contrary to the equal equities which other general creditors have in the property of the bankrupt.
  The mere fact that both these construction bonds had the same principal (contractor) and were executed by the same surety should not alter the result. Each contract and each bond was executed separately; each applied to a separate road construction job in a different county ; and the retained funds on each project were separate and distinct. The doctrine of subrogation arises out of the unpaid debts on each contract; relates back in time to the execution of that specific bond; and is limited in scope to the debts arising under one contract.
  The appellant-surety, however, has attempted to expand the scope of subrogation in this case through an application of its own interpretations of the Supreme Court decisions in United States v. Mun-sey Trust Co., 332 U.S. 234, 67 S.Ct. 1599, 91 L.Ed. 2022 (1947), and Pearlman v. Reliance Ins. Co., supra. In Mimsey it was held that the Government, as a debt- or of the contractor, “could offset against the contractor a claim bearing no relationship” to the fund being withheld. This offset of a portion of the retained fund took precedence over the right of the surety to the fund by way of subro-gation.
  In Pearlman the appellant relies on the language that the “Government had a right to use the retained fund to pay laborers and materialmen * * [371 U.S. at 141, 83 S.Ct. at 237.] And that the surety, upon payment of the claims, subrogates to this right of the Government. The appellant argues as follows: Since the Government has a right to pay off these debts of the bankrupt-contractor, and in so doing could offset its losses on one with the excesses on the other (a “claim” against the contractor as in Munsey), the surety by subrogating to the rights of the Government in the fund should be permitted the same right of offset. This is untenable.
  Neither the Federal Government under the Miller Act nor the State of Ohio under its laws has any obligation, legal or equitable, to insure that the laborers and materialmen are paid, when to do so would require payments in excess of the retained funds on each contract. The Ohio statute, note 5, supra, is explicit on this point and the Miller Act does not even allow a suit against the Government. Therefore, even if the State of Ohio did decide to pay the laborers and materialmen on the two contracts, these payments would only go to the extent of the retained funds on that particular contract. Any excesses would be turned over to the trustee in bankruptcy. There would, therefore, be no claim arising in the State against the contractor that could be offset against the excess funds from Project 24.
  In the instant case, as in Pearlman, the State is merely a “stakeholder.” It possesses no legal claim, as in Munsey, which could be set off against the retained funds. Someone other than the State is entitled to receive the funds on each project, and the sole interest of the State is to insure that the laborers and materialmen have been paid. If these claims have not been satisfied, the remaining funds on the contract under which their claims arose will be used to help satisfy the claims. If their claims have been met by either the contractor or the surety, then the funds will be given over to whichever of these two parties made the payments — to the extent of the retainages on each project for the claims made thereon.
  It should also be noted that in the Munsey case, upon which appellant places such heavy reliance, there also were several payment bonds covering various contracts between the United States and the same contractor. Each bond in that case was likewise with the same surety, as in our fact situation. The contractor in Munsey completed the performance on all six contracts but failed to pay the laborers and materialmen on five of the six projects. The reimbursement sought by the surety in the Court of Claims was for recovery on each of the five contracts under which a default in payment occurred, to the extent of the payments made on each particular contract. The excesses on each of the five funds were not claimed nor was a claim made on the fund remaining on the sixth contract — even though the surety’s over-all losses were greater than all the retained funds on all six contracts. Statements were made in both the opinion of the Court of Claims and in a footnote in the Supreme Court decision, that this formulation of the surety’s claim was correct. Setoff would not be an allowable remedy.
  For the above reasons we agree with the well-reasoned opinion of the Referee in Bankruptcy, as affirmed by the District Court, that the surety cannot by sub-rogation or assignment claim any rights in the $23,882.26 excess realized on Project 24.
  The decision of the lower court is affirmed.
  Affirmed.
  . Project 24 was signed on April 29, 1958 and covered road work in Lawrence County; whereas, Project 37 related to work in Ashtabula County and was dated May 27, 1958.
  . Ohio Revised Code, § 153.54, provides in part that a public contractor shall be required to execute: “ * * * the usual bond as provided for by law with good and sufficient sureties, with an additional obligation for the payment by the contractor * * * for all labor performed or materials and tools furnished * * This statutory requirement for performance-payment bonds is similar to requirements of the Miller Act on Federal building contracts, Sec. 1(a), 49 Stat. 793 (1935), 40 U.S.C. § 270a (1964).
  . The bond on Project 24 was executed on March 3, 1958 in the amount of $1,403,-600. The Project 37 bond was for $2,728,-450 and was signed on March 27, 1958.
  . Ohio Revised Code, §§ 1325.01-1325.04, requires notice to be filed with the county recorder of all assignments of an account receivable. If this recording is not done “prior to, or contemporaneously with, the assigning of the account receivable,” the assignee is not protected from the claim of any party other than the assignor. Bender v. Vaughan, 106 Ohio App. 136, 153 N.E.2d 778 (1958).
  . Ohio Revised Code, §§ 1311.26, 1311.28, 1311.32.
  By requiring the State to make direct payments to the unpaid laborers and ma-terialmen, upon refusal of the contractor to make payments, and permitting suit against the State to the extent of the unpaid funds in the hands of the State, the Ohio statute differs from the Federal Miller Act. Under the latter statute, the laborer’s or materialman’s sole means of recovery is against the surety in Federal District Court. 49 Stat. 794, 40 U.S.C. § 270b (1964).
  . Ohio Revised Code, § 153.56, permits the laborers and materialmen to bring suit against the surety on the payment bond if the surety fails to pay their claims once notified of the amounts owed.
  . 30 Stat. 562, as amended, 11 U.S.O. § 96 (1964), provides, in part, for the avoidance by the trustee in bankruptcy of any preference (a transfer of the debtor’s property to satisfy an antecedent debt within 4 months of the filing of the petition in bankruptcy and while the debtor was insolvent) if the creditor, at the time of transfer, had “reasonable cause to believe that the debtor is [was] insolvent.”
  . 30 Stat. 565, as amended, 11 U.S.O. § 110(c) (1964), provides in part:
  “The trustee, as to all property, whether or not coming into possession or control of the court, upon which a creditor of the bankrupt could have obtained a lien by legal or equitable proceedings at the date of bankruptcy, shall be deemed vested as of such date with all the rights, remedies, and powers of a creditor then holding a lien thereon by such proceedings, whether or not such a creditor actually exists.” See Lewis v. Manufacturers Nat’l Bank, 364 U.S. 603, 81 S.Ct. 347, 5 L.Ed.2d 323 (1961); In Re Collins & Kiser Constr. Co., 204 F.Supp. 42, 45 (S.D. Iowa 1962), aff’d, Employers Mut. Cas. Co. v. Hinshaw, 309 F.2d 806 (8 Cir. 1962).
  If the surety had recorded the assignment on the Project 24 bond, it is undisputed that appellant would then he legally entitled to the excess funds arising thereon.
  For a discussion by the Ohio Court of Appeals dealing with the State’s recording statute and its effect on assignments, see Bender v. Vaughan, 106 Ohio App. 136, 153 N.E.2d 778 (1958).
  . If the surety is not entitled to the $23,-882.26 by way of subrogation, it will be required to seek payment on its claim as a general creditor, sharing on an equality with them. Sec. 64, 30 Stat. 563, as amended, 11 U.S.O. § 104 (1964).
  . Prior to the decision in Pearlman v. Reliance Ins. Co., 371 U.S. 132, 83 S.Ct. 232, 9 L.Ed.2d 190 (1962), the Ninth and Tenth Circuits had construed the opinion in United States v. Munsey Trust Co., 332 U.S. 234, 67 S.Ct. 1599, 91 L.Ed. 2022 (1947), as denying the surety any equitable right of subrogation in the retained funds. American Sur. Co. of New York v. Hinds, 260 F.2d 366 (10 Cir. 1958) ; Phoenix Indem. Co. v. Earle, 218 F.2d 645 (9 Cir. 1955). See generally, Note, 71 Yale L.J. 1274 (1962).
  . This Supreme Court decision is case-noted in 61 Mich.L.Rev. 402 (1962).
  . “We therefore hold in accord with the established legal principles stated above that the Government had a right to use the retained fund to pay laborers and ma-terialmen : that the laborers and material-men had a right to be paid out of the fund; that the contractor, had he completed his job and paid his laborers and materialmen, would have become entitled to the fund; and that the surety, having paid the laborers and materialmen, is entitled to the benefit of all these rights to the extent necessary to reimburse it.” Pearlman v. Reliance Ins. Co., supra, n. 10, at 141, 83 S.Ct. at 237.
  There is some controversy in the cases and the published legal articles as to just what rights the surety subrogates to; those of the laborers and materialmen or those of the owner (State). See e. g., Pearlman v. Reliance Ins. Co., supra, at 142, 83 S.Ct. at 237 (concurring opinion) ; Continental Cas. Co. v. United States, 169 F.Supp. 945, 145 Ct.Cl. 99 (1959). See generally, Gleick, The Rights and Status of Sureties in Bankruptcy Cases of Contractors, 34 Fordham L.Rev. 451 (1966) ; Speidel, “Stakeholder” Payments Under Federal Construction Contracts : Payment Bond Surety vs. As-signee, 47 Va.L.Rev. 640 (1961).
  . Pearlman v. Reliance Ins. Co., supra, n. 10, at 138, 83 S.Ct. 232.
  . Gray v. Travelers Indem. Co., 280 F.2d 549, 552 (9 Cir. 1960).
  . See generally, Note 71 Yale L.J. 1274, 1288-89 (1962).
  . Pearlman v. Reliance Ins. Co., supra, n. 10, at 136, 83 S.Ct. at 234.
  . State law is controlling on this question of the property rights of the contractor at the time of bankruptcy (subrogation), as it also is on the question of the validity of an unrecorded assignment as to the trustee in bankruptcy. Cf. Corn Exchange Nat’l Bank & Trust Co., Philadelphia v. Klauder, 318 U.S. 434, 436-437, 63 S.Ct. 679, 87 L.Ed. 884 (1943).
  . “The right of subrogation is not founded on contract. It is a creature of equity; is enforced solely for the purpose of accomplishing the ends of substantial justice ; and is independent of any contractual relations between the parties.” Memphis & L. R. R. v. Dow, 120 U.S. 287, 301-302, 7 S.Ct. 482, 488, 30 L.Ed. 595 (1887).
  . Subrogation is “the substitution of another person in the place of the creditor, to whose rights he succeeds in relation to the debt.” 2 Bouv. Law Dict. (8th ed. Rawle’s 3d rev. 1914).
  . Black, Law. Dictionary 1595 (4th ed. 1951).
  . A similar result was reached in Lacy v. Maryland Casualty Co., 32 F.2d 48 (4 Cir. 1929), where the surety on two state road construction contracts was required to complete performance on both projects and attempted to setoff losses on one with the excess funds realized on the other. The Court denied the surety any right of offset via subrogation, but did allow it on the basis of a valid assignment — the latter not being present in the instant case. In First Nat. Bank of Seattle v. City Trust, Safe Deposit & Surety Co., 114 F. 529 (9 Cir. 1902), the Court denied the surety a profit on the bond and directed the excess funds to be paid to another creditor. See generally, Gleick, 34 Fordham L.Rev. 451, 462-63 (1966); 17 Am.Jur.2d Contractors’ Bonds § 112, n. 11 (1964) ; Annotation, 45 A.L.R. 383 (1926).
  . Pearlman v. Reliance Ins. Co., supra, n. 10, at 140, 83 S.Ct. at 237.
  . This equitable obligation of the Government to see that the laborers and ma-terialmen are paid, to the extent of retained funds, derives from the payment bond which is required by statute and which fixes for the contractor, as one of its obligations on the contract to the Government, the payment of all laborers and materialmen. Therefore, when the surety fulfills this obligation to the Government, it subrogates to the rights of the Government in the fund.
  Since the State of Ohio has a similar statutory requirement of a payment bond and, in addition, has a legal obligation to pay the laborers and materialmen out of the retainages if they are not otherwise paid, the surety in this case can be held to have subrogated to the rights of the State in the retained funds — as well as the rights of the laborers and materialmen in the fund. See generally Gleick, 34 Fordham L.Rev. 451 (1966) ; Note, 71 Yale L.J. 1274 (1962).
  . See nn. 5 and 23, supra.
  . The surety has a right to “make demand and to receive any balances due under the contracts, to the extent of such , balances or to the extent of the payments so made * * Munsey Trust Co. of Washington, D. C. v. United States, 67 F.Supp. 976, 982, 107 Ct.Cl. 131, 148 (1946), rev’d on other grounds, 332 U.S. 234, 67 S.Ct. 1599, 91 L.Ed. 2022 (1947).
  . United States v. Munsey Trust Co., supra, n. 10, at 238, n. 3, 67 S.Ct. at 1601.
  “The surety did not and could not claim the whole amount retained by the government. The payments for which it was liable and which it paid, on two of the contracts exceeded, and, on the other four, were less than, the amounts retained on each particular contract.”
  . See n. 21, supra. Cf., United Pacific Ins. Co. v. First Nat’l Bank, 222 F.Supp. 243, 250 (D.Or.1963) ; Continental Cas. Co. v. United States, 169 F.Supp. 945, 947, 145 Ct.Cl. 99, 103 (1959) ; Union Stone Co. v. Board of Chosen Freeholders, 71 N.J.Eq. 657, 65 A. 466, 471 (1906).