
409 So.2d 788 (1982)
FIDELITY AND CASUALTY COMPANY OF NEW YORK, a corporation
v.
CENTRAL BANK OF BIRMINGHAM.
80-427.
Supreme Court of Alabama.
January 22, 1982.
Thomas R. Elliott, Jr. of London, Yancey, Clark & Allen, Birmingham, for appellant.
Stanley M. Brock of Balch, Bingham, Baker, Hawthorne, Williams & Ward, Birmingham, for appellee.
SHORES, Justice.
This is an appeal from a judicial determination as to which party has priority to money paid in settlement of a contract action between a contractor, Henry C. Beck Company, and a subcontractor, Lewis Powell Enterprises. The competing parties are the Central Bank of Birmingham (Central Bank) and Fidelity and Casualty Company of New York (F & C). Central Bank had a perfected security interest covering all inventory, accounts receivable, and contract rights, together with proceeds and products thereof, of Powell Enterprises. F & C issued a performance bond and a labor and material payment bond for Powell Enterprises, as called for in a contract between Beck and Powell Enterprises.
This appeal involves three consolidated actions filed in circuit court, which were: (1) A receivership proceeding brought by Lewis Powell individually against Powell Enterprises; (2) an action by Powell Enterprises against Beck for breach of contract; and (3) an action by Trust Company Bank as assignee of Stratton Industries (a material supplier) against Powell Enterprises, Beck, and F & C.
The receivership proceeding adjudicated the validity of a claim by Central Bank against Powell Enterprises. The court decreed that the Bank's claim in the sum of $191,592.42 was a valid secured claim superior to all claims other than administrative expenses.
Both Central Bank and F & C intervened in the contract action filed by Powell Enterprises *789 against Beck. Each claimed that it had a priority to the contract funds. Central Bank's claim rested on its security interest which was perfected prior to the contract. F & C's claim was based upon principles of equitable subrogation arising out of the fact that F & C bonded the contract which was the subject of the action and, further, that F & C had suffered judgment in the bond action by Trust Company Bank in the sum of $38,016.23 because of Powell Enterprises' failure to pay a material supplier for carpet used in the project.
The contract action was settled for $40,000. All parties entered into an agreement providing for payment of $10,000 of the $40,000 fund as attorneys' and receiver's fees.
The evidence regarding the competing claims of Central Bank and F & C to the $30,000 was heard in open court. Both the bank and F & C submitted briefs on the subject of their respective entitlements to the fund. The contract between Beck and Powell Enterprises contained the provisions that are pertinent to this appeal:
"1. Subcontractor agrees to furnish and pay for all materials, labor, scaffolding, equipment, tools, appliances, and everything necessary to fully do and complete the work described in paragraph 2 hereof, for Data Center, Birmingham, Alabama, located at 1876 Data Drive, Jefferson County, Alabama, for South Central Bell Telephone Company, hereinafter called Owner, in accordance with the General Conditions of the Contract between the Owner and the Contractor....
". . . .
"3. The Contractor agrees to pay the Subcontractor for the performance of his work the sum of $280,874.00 and to make payments on account thereof as follows: on or about the 25th day of each month, 90% of the value of labor and materials incorporated by Subcontractor in the work and of materials stored on the job site in a manner acceptable to Contractor, and for which payment has been made by the Owner to Contractor, less the aggregate of previous payments; and the balance of the contract price shall be paid to the Subcontractor upon completion of all of the Subcontractor's work, acceptance thereof by the Owner, furnishing to Contractor of satisfactory evidence by Subcontractor that all labor and material accounts incurred by Subcontractor in connection with his work have been paid in full, and receipt of final payment therefor by the Contractor from the Owner....
". . . .
"11. Payments otherwise due may be withheld by Contractor on account of defective work not remedied, claims filed, reasonable evidence indicating probability of filing of claims, failure of Subcontractor to make payments properly to its subcontractors or for material or labor, or a reasonable doubt that the subcontract can be completed for the balance then unpaid....
". . . .
"18. Subcontractor shall provide Payment and Performance Bonds on the form prescribed by and with surety acceptable to the Contractor in the full amount of this subcontract for the faithful performance of this subcontract. The premium for bonds shall be paid by Subcontractor." (Emphasis added.)
The trial court entered an order which, in pertinent part, said:
"IT IS THEREFORE ORDERED, ADJUDGED AND DECREED as follows:
"1. The claim of Central Bank of Birmingham in the sum of $191,592.42 is superior and prior in right to the claims of Fidelity & Casualty Company of New York and the Internal Revenue Service to the $30,000.00 fund now on deposit with the Register in Chancery, representing the proceeds of the settlement of the case of Lewis Powell Enterprises, Inc. v. Henry C. Beck Company."
F & C's appeal followed. We reverse.
The single issue in this appeal is whether the trial court erred in its determination that Central Bank had a superior and prior right to the $30,000.00.
*790 In its assertion that the trial court was correct, Central Bank raises two main arguments. First, although it recognizes that Article 9 of the Uniform Commercial Code is not applicable in this situation, nevertheless, Central Bank argues that it still had a superior right to the $30,000.00 because it had a perfected security interest covering the accounts receivable and contract rights of Powell Enterprises as of December 8, 1977, while F & C's bond was not issued until September 18, 1978. Therefore, it has priority to any proceeds owing to Powell under the contract through the application of the "first in time, first in right" rule of common law. Secondly, assuming arguendo, that the "first in time" rule does not apply to equitable subrogation, Central Bank argues that F & C still would not be entitled to the money because a necessary element of equitable subrogation is a default by the primary party, and in this situation, Powell Enterprises was never in default. In support, Central Bank points out that the court's order wherein the court, after acknowledging that "clearly the principal of equitable subrogation is recognized in Alabama," by way of Citizens Bank of Guntersville v. Pearson, 217 Ala. 391, 116 So. 350 (1927), attempted to distinguish the case at hand by saying:
"Thus, in the Citizens Bank of Guntersville case there were two important facts on which the Court based its decision; the fact that the assignment was made after the bond was written and the fact that the surety companynot the contractor completed the work and earned the right to payment under the contract. Neither of those facts is present in this case."
We cannot agree with either of Central Bank's arguments. While we are mindful of the applicable scope of review through the ore tenus rule, Sterling Oil of Oklahoma, Inc. v. Pack, 291 Ala. 727, 287 So.2d 847 (1973), we nevertheless hold that the trial court's decision that F & C had not completed the terms of the contract after a default by Powell Enterprises is clearly wrong. Powell Enterprises was obligated under the contract to pay its material suppliers. A failure to make such a payment breached the contract. Beck had the right under the bonded contract to withhold payment to Powell Enterprises until all material suppliers were paid. The very fact that F & C was ordered to pay the money to the representative of the materialmen establishes that Powell Enterprises defaulted under the bonded contract. We do not say that the court was incorrect in its determination that the contract was performed. It was performed, but only by F & C's payment as surety for Powell Enterprises.
The surety's right to equitable subrogation exists whether a surety steps in and physically completes the contract or whether it merely pays the laborers and materialmen under the contract. See, Maryland Casualty Company v. Dupree, 223 Ala. 420, 136 So. 811 (1931); Pearlman v. Reliance Insurance Company, 371 U.S. 132, 83 S.Ct. 232, 9 L.Ed.2d 190 (1962).
Moreover, since the surety's equitable subrogation rights, upon default of its principle contractor, arise by operation of law rather than by contract, First Alabama Bank of Birmingham v. Hartford Acc. & Indem. Company, Inc., 430 F.Supp. 907 (N.D.Ala.1977), Central Bank's argument for the application of the "first in time, first in line" rule is not well taken. The contract authorized the owner to make payments to the material supplier and to offset any sums to Powell for the payment. F & C, which was obligated to complete the contract through payment to materialmen, was subrogated not only to the obligation of Powell Enterprises to pay suppliers, but also to the right of the owner to offset any sums to Powell Enterprises for payment. See, Citizens Bank of Guntersville v. Pearson, supra; Pearlman v. Reliance Insurance Company, supra; Travelers Indemnity Company v. West Georgia National Bank, 387 F.Supp. 1090 (N.D.Ga.1974).
Therefore, the contract funds which were in the hands of Beck did not belong to Powell Enterprises once it had failed to pay the material supplier. F & C, through its obligation to pay under the bond, is entitled *791 to the funds, and not Powell Enterprises or Central Bank, claiming through Powell Enterprises. It makes no difference in this situation when the Bank's assignment was perfected because there is nothing owing to Powell Enterprises to pass by virtue of the assignment. This cause is reversed and remanded.
REVERSED AND REMANDED.
TORBERT, C. J., and MADDOX, JONES and BEATTY, JJ., concur.
