
277 Md. 177 (1976)
353 A.2d 249
FINANCE COMPANY OF AMERICA, ASSIGNEE OF CREST INVESTMENT TRUST, INC.
v.
UNITED STATES FIDELITY AND GUARANTY COMPANY
[No. 100, September Term, 1975.]
Court of Appeals of Maryland.
Decided March 3, 1976.
*179 The cause was argued before MURPHY, C.J., and SMITH, LEVINE, ELDRIDGE and O'DONNELL, JJ., and reargued before MURPHY, C.J., and SMITH, LEVINE, ELDRIDGE and O'DONNELL, JJ., and CHARLES E. ORTH, JR., Chief Judge of the Court of Special Appeals and THOMAS HUNTER LOWE, Associate Judge of the Court of Special Appeals, specially assigned.
Argued and reargued by Sidney Kaplan, with whom were Irving Bowers and Arthur Guy Kaplan on the brief, for appellant.
Argued and reargued by William F. Mosner for appellee.
MURPHY, C.J., delivered the opinion of the Court.
Mega Marine Engineering Service Co. (Mega) entered into a contract for shore erosion work with the Maryland Department of Natural Resources (the Department), dated January 17, 1973, for the sum of $22,780; as a statutory condition precedent to the award of the contract, Mega was required to provide payment and performance bonds in accordance with Maryland Code (1974) Real Property Article, § 9-112.[1] The United States Fidelity and Guaranty Company (the surety) executed the required bonds on Mega's behalf, which were dated February 1, 1973.
Mega subsequently defaulted on its contract with the Department. On June 21, 1973, the Department filed a Bill of Interpleader in the Circuit Court for Anne Arundel County; it averred that $6,708.76, "due and owing" from the *180 Department to Mega upon completion of the contract, had been claimed both by the surety required to fulfill its bonded obligations upon Mega's default, and by Crest Investment Trust, Inc. (Crest), a creditor of Mega holding a security interest in its accounts receivable and contract rights pursuant to the provisions of Title 9 (Secured Transactions) of the Maryland Uniform Commercial Code (the UCC), Maryland Code (1975) Commercial Law Article.
Prior to filing the interpleader action, the Department had been notified of Crest's claim by letter dated May 7, 1973 which instructed it, as "account debtor" under § 9-502 of the UCC, to make payment to Crest of all monies due Mega under the contract. The surety had notified the Department by letter dated May 10, 1973  the same day it learned of Mega's default  that in view of its obligation under the payment and performance bonds, it claimed all funds due Mega pursuant to "The surety's equitable rights of subrogation."
The court designated the surety as plaintiff, and Crest as defendant, in the interpleader proceeding and directed that the parties interplead to settle the dispute between them. Thereafter, the surety filed a bill of complaint alleging that on May 10, 1973, the Department had called upon it "to complete the job under the performance bond and to satisfy labor and material claims under the ... [payment bond]"; and that in fulfillment of its obligations, the surety had paid $5,775.22 upon its payment bond and $10,439.97 upon its performance bond, the latter representing the excess amount over the original contract with Mega that the Department was required to pay to complete the work. The surety moved for summary judgment, asserting that it was entitled to the $6,708.76 which the Department "was holding but never paid to Mega ... on the basis that the surety, having paid for the completion of the contract, was entitled to receive as partial reimbursement all sums owed by ... [the Department] to ... [Mega]." Answering the surety's bill, Crest alleged that it was a secured party having a perfected security interest in the funds that the Department owed to Mega, and that its interest was superior to that of *181 the surety. In its affidavit in opposition to the surety's motion for summary judgment, Crest asserted that it had loaned $14,400 to Mega on November 28, 1972; that as security for the loan, Mega had executed a security agreement and financing statement covering all its accounts receivable and "rights to payment under contracts of any nature whatsoever"; that the financing statement was recorded at the office of the Clerk of the Circuit Court for Anne Arundel County on November 30, 1972 and at the State Department of Assessments and Taxation on December 18, 1972, pursuant to § 9-401 of the UCC; and that Mega had defaulted on its loan obligations and owed Crest $10,625 which was past due.
At the hearing below on the surety's motion for summary judgment, Crest maintained that the "whole point" of the case was that since it was a prior creditor with a perfected security interest in Mega's accounts receivable as of December 18, 1972, and in the proceeds of the contract with the Department as of January 17, 1973, its interest was superior to the surety's equitable subrogation claim. The court (Childs, J.) granted the surety's motion for summary judgment; it held that Title 9 of the UCC applied only to security interests created by contract, that the doctrine of subrogation was not founded upon contract, but was equitable in nature, that the UCC excluded the doctrine of equitable subrogation from its operation, and that the surety's equitable claim to the funds was superior to Crest's perfected security interest.
Crest's assignee, the Finance Company of America (the appellant) appealed to the Court of Special Appeals. We granted certiorari prior to argument in that court. Code (1974) Courts and Judicial Proceedings Article, § 12-203.

(1)
Appellant contends that because the surety failed to perfect a security interest in Mega's accounts receivable or contract rights in accordance with the requirements of the *182 UCC,[2] its equitable right of subrogation is necessarily subordinate to Crest's perfected security interest.[3] We cannot agree.
Subrogation is a long-standing equitable doctrine in Maryland whereby one who is secondarily liable for a debt, and has paid it, stands in the place of the creditor (in this case, the satisfied obligee) and is entitled to the benefit of all the securities and remedies which could have been resorted to for the payment of the debt. Blair v. Baker, 196 Md. 242, 76 A.2d 129 (1950); Embrey v. Embrey, 163 Md. 162, 161 A. 153 (1932); Poe v. Philadelphia Casualty Co., 118 Md. 347, 84 A. 476 (1912). The doctrine is recognized and enforced in both law and equity actions, Gov't Employees Ins. v. Taylor, 270 Md. 11, 310 A.2d 49 (1973); it arises out of the operation of law and does not depend on contract. Schnader, Inc. v. Cole Build. Co., 236 Md. 17, 202 A.2d 326 (1964); Maryland Trust Co. v. Poffenberger, 156 Md. 200, 144 A. 249, 62 A.L.R. 546 (1929); Orem v. Wrightson, 51 Md. 34 (1879).
There are three separate categories of subrogation in Maryland. Legal subrogation (as distinguished from conventional and statutory subrogation) arises by operation of law when there is a debt or obligation owed by one person which another person, who is neither a volunteer nor an intermeddler, pays or discharges under such circumstances as in equity entitles him to reimbursement. Maryland Title Co. v. Kosisky, 245 Md. 13, 225 A.2d 47 (1966).
The general rule with respect to the right of the surety of a building or construction contractor, who completes the contract upon the contractor's default, to monies in the hands of the contractee-obligee, earned by the contractor before default, is that upon completion of the contract the surety is entitled to be subrogated to the rights which the contractee-obligee had to, or could assert against, such funds *183 upon the contractor's default, to the extent necessary to reimburse himself for the outlay made to complete the contract. 17 Am.Jur.2d Contractors' Bonds §§ 42 and 107 (1964).[4] The surety, in a sense, is "secured" by its right of subrogation, which relates back to the issuance of the bond to defeat intervening creditors. See Henningsen v. United States Fid. & Guar. Co., 208 U.S. 404, 28 S.Ct. 389, 52 L.Ed. 547 (1908); Prairie State Nat. Bank v. United States, 164 U.S. 227, 17 S.Ct. 142, 41 L.Ed. 412 (1896); Industrial Bank of Washington v. United States, 424 F.2d 932 (D.C. Cir.1970); Western Casualty and Surety Co. v. Brooks, 362 F.2d 486 (4th Cir.1966); Gray v. Travelers Indemnity Co., 280 F.2d 549 (9th Cir.1960); Massachusetts Bonding & Ins. Co. v. Fago Construction Corp., 82 F. Supp. 619 (D. Md. 1949); Canter v. Schlager, 358 Mass. 789, 267 N.E.2d 492 (1971).
That the surety need not file a financing statement under § 9-302 of the UCC to protect its subrogation rights is clear. Section 1-103 of the UCC provides that "[u]nless displaced by the particular provisions of ... [the UCC], the principles of law and equity ... shall supplement its provisions...." Nothing in the provisions of Title 9 regarding secured transactions expressly or implicitly refutes the application of subrogation; in fact, § 9-102 implicitly recognizes the continued vitality of the doctrine. That section, entitled "Policy and scope of title," refers to security interests created by contract. The Official Comment states in part:
"The purpose of this section is to bring all consensual security interests in personal property and fixtures ... under this Title....
"... [T]he principal test whether a transaction comes under this Title is: Is the transaction intended to have effect as security?..."
As heretofore indicated, the right of subrogation does not depend on contract, nor is it intended to have effect as a *184 security interest. Section 1-201 (37) of the UCC defines "security interest" as "an interest in personal property or fixtures which secures payment or performance of an obligation ... [including] any interest of a buyer of accounts ... or contract rights...." Plainly, the surety is secured by the opportunity to complete the contract and apply any available funds to its costs, not by an interest in personal property or fixtures. Neither is the surety a buyer of accounts or contract rights. See § 9-106; National Shawmut Bk. of Boston v. New Amsterdam Cas. Co., 411 F.2d 843 (1st Cir.1969).
That it was not the intent of the UCC to impair the surety's equitable right of subrogation, or to make it subject to the filing provisions of Title 9, is similarly manifest from the Code's history. Proposed § 9-312 (7) of the 1952 Official Draft would have provided that "[a] security interest which secures an obligation to reimburse a surety ... secondarily obligated to complete performance is subordinate" to a later lender. The draftsmen deleted the section in 1953, explaining that it changed settled law under which "the surety's rights come first as to the funds owing by the owner...." See Uniform Laws Annotated, Uniform Commercial Code, Official Draft, Text and Comments, at 773, 777 (1952); Uniform Laws Annotated, Uniform Commercial Code, Changes in Text and Comments, at 25-26 (1953). Since no draft of the UCC has ever contained an express filing requirement for sureties, and since subrogation rights are not "security interests" within the meaning of Title 9, this rejection of even a partial preemption of subrogation rights is indeed cogent evidence that the filing requirements were not intended to impair the rights of subrogation. See National Shawmut Bk. of Boston v. New Amsterdam Cas. Co., supra, 411 F.2d at 846; Canter v. Schlager, supra, 267 N.E.2d at 495; White and Summers, Uniform Commercial Code, § 22-5 (1972); Coogan et al., The Outer Fringes of Article 9, 79 Harv. L. Rev. 229, 230 (1965).
Finally, mindful of the Code's policy to make the law uniform among the various jurisdictions (§ 1-102 (2) (c)), we note that the overwhelming weight of case authority also *185 supports the conclusion that a surety's subrogation rights exist independently of Title 9 filing. See, e.g., In re J.V. Gleason Co., 452 F.2d 1219, 1221-24 (8th Cir.1971); National Shawmut Bk. v. New Amsterdam Cas. Co., supra; McAtee v. United States Fidelity and Guaranty Co., 401 F. Supp. 11 (N.D. Fla. 1975); United States Fidelity & Guaranty Co. v. First State Bank of Salina, 208 Kan. 738, 494 P.2d 1149 (1972); National Surety Corp. v. State Nat. Bank of Frankfort, 454 S.W.2d 354 (Ky. 1970); Canter v. Schlager, supra; Mid-Continent Casualty Co. v. First National Bank & Trust Co., 531 P.2d 1370 (Okla. 1975); Jacobs v. Northeastern Corp., 416 Pa. 417, 206 A.2d 49, 11 A.L.R.3d 1220 (1965); First State Bank v. Reorganized School Dist., R-3, Bunker, 495 S.W.2d 471 (Mo. App. 1973); Stevelee Factors, Inc. v. State, 136 N.J. Supra. 461, 346 A.2d 624 (1975); Aetna Casualty & Surety Co. v. Perrotta, 62 Misc.2d 252, 308 N.Y.S.2d 613 (Sup. Ct. 1970).

(2)
Since subrogation is an equitable doctrine, it will not be applied in circumstances where it would be inequitable to do so. Maryland Trust Co. v. Poffenberger, supra; Orem v. Wrightson, supra. Its application here depends upon the rights of the contending parties in the contract and the retained fund itself.
Although Crest claimed it had a prior perfected security interest in Mega's contract rights (including right to payment), in actuality it had something less. While the security agreement between Mega and Crest covered accounts receivable and "rights to payment under contracts of any nature whatever,"[5] Crest's security interest did not *186 become perfected until, inter alia, it "attached."[6] Crest's security interest did not attach until Mega had rights in the collateral, which in the case of accounts was when the account came into existence after performance, and in the case of contract rights when the contract had been made.[7] Thus, Crest did not have a perfected security interest in Mega's accounts until performance had been rendered under its contract with the Department; nor did Crest have a perfected security interest in Mega's contract rights with the Department until the contract was executed on January 17.
As previously stated, the surety's subrogation rights attached at the time the contract of suretyship was entered into on February 1. In view of the provisions of § 9-112 of the Real Property Article, supra, n. 1, making the surety's obligation binding as of the date of the contract (January 17), its subrogation rights necessarily related back to that date. Consequently, the surety's right of subrogation in this case conflicts with a simultaneously perfected security interest in contract rights, not a prior perfected security interest as contended by Crest.
That Mega defaulted on its contract with the Department is of controlling significance in determining the equities of the parties in this case. As assignee of Mega's contract rights and accounts receivable, Crest was subject to any defense or claim arising from the contract.[8] That the Department *187 would have held Mega liable for its default, but for the subsequent completion of the contract by the surety, is entirely clear. Since the amount expended by the surety to complete the contract was greater than the fund in the Department's hands, it is plain that in the absence of the surety there would have been no fund for the assignee Crest to obtain.
Since the moneys held by the Department owe their existence directly to the completion of the contract by the surety, it is equitable in the circumstances of this case that the surety be allowed to obtain it in partial recovery of its performance expenses. In so concluding, we observe that it is the well-settled rule that the surety, who by subrogation takes all rights of the satisfied obligee, is entitled in similar circumstances to the entire fund. See the exhaustive list of *188 cases in National Shawmut Bank, supra, and 17 Am.Jur.2d Contractors' Bonds §§ 42, 107, 111 (1964).

(3)
Maryland Rule 610 b, which concerns summary judgment affidavits, states in part that "copies of all material papers ... referred to in an affidavit shall be attached thereto or filed therewith or their absence satisfactorily explained." Crest contends that the surety's failure to attach the bond applications and the bonds themselves to the affidavit rendered the entry of summary judgment below improper, since the burden of proving entitlement was on the surety. See Security Ins. Co. v. Mangan, 250 Md. 241, 242 A.2d 482 (1968). While the surety contends that the issue was not raised below, we shall nevertheless consider it since it relates to a possible substantive deficiency in the summary judgment affidavit in setting forth facts necessary to establish a prima facie case. See Wyand v. Patterson Agency, Inc., 266 Md. 456, 295 A.2d 773 (1972).
Considering the statutory requirement that payment and performance bonds must be issued by a surety before any state contract exceeding five thousand dollars is awarded (Real Property Article, § 9-112 (a)), in light of the undisputed allegation of the surety's performance of its bonded obligations after Mega's default contained in the surety's affidavit, we think a sufficient showing was made of the surety's obligation to perform and its entitlement to the retained funds by reason of its performance.
Having expended a greater monetary sum in the performance of its obligations than remained in the hands of the Department, the surety was properly awarded the entire amount in the court below.
Judgment affirmed, costs to be paid by appellant.
NOTES
[1]  This section provides that before any contract exceeding $5,000 for any public work is awarded, the contractor shall furnish payment and performance bonds "which shall become binding upon the award of the contract."
[2]  Section 9-302 states that a financing statement must be filed to perfect all security interests except those noted therein.
[3]  The surety's basis for relief throughout these proceedings has been solely that of subrogation. Therefore, we need not decide whether a surety who claims priority to funds after default under an assignment of accounts receivable (contained in the application for a performance bond) must comply with the UCC filing requirements.
[4]  It has been held that the surety, upon completing the contract, also stands in the place of the defaulting contractor, with respect to receivables due the contractor, and in the place of laborers and materialmen whom the surety has paid. National Shawmut Bk. of Boston v. New Amsterdam Cas. Co., 411 F.2d 843 (1st Cir.1969).
[5]  Section 9-106 of the UCC states in part:

"`Account' means any right to payment for goods sold or leased or for services rendered which is not evidenced by an instrument or chattel paper.
"`Contract right' means any right to payment under a contract not yet earned by performance and not evidenced by an instrument or chattel paper."
[6]  Section 9-303 states in part:

"(1) A security interest is perfected when it has attached and when all of the applicable steps required for perfection have been taken...."
[7]  Section 9-204 states in part:

"(1) A security interest cannot attach until ... the debtor has rights in the collateral....
(2) For the purposes of this section the debtor has no rights"
* * *
"(c) In a contract right until the contract has been made;
(d) In an account until it comes into existence."
[8]  Section 9-318 (1) of the UCC states:

"(1) Unless an account debtor has made an enforceable agreement not to assert defenses or claims arising out of a sale as provided in § 9-206 the rights of an assignee are subject to
(a) All the terms of the contract between the account debtor and assignor and any defense or claim arising therefrom; and
(b) Any other defense or claim of the account debtor against the assignor which accrues before the account debtor receives notification of the assignment."
The Official Comment states in part:
"1. Subsection (1) makes no substantial change in prior law. An assignee has traditionally been subject to defenses or set-offs existing before an account debtor is notified of the assignment. When the account debtor's defenses on an assigned account, chattel paper or a contract right arise from the contract between him and the assignor it makes no difference whether the breach giving rise to the defense occurs before or after the account debtor is notified of the assignment (subsection (1)(a))...."
Since a defense of the Department arose from the contract between it, as account debtor, and the assignor (Mega), whether notice of the actual assignment to Crest of the contract right and account was received before or after Mega's breach is irrelevant. As the comment implies, an assignee under Maryland law has traditionally been subject to defenses or setoffs existing before an account debtor is notified of the actual assignment. Assignments are equitable in nature and subject to equitable defenses. Md. Coop. Milk Producers v. Bell, 206 Md. 168, 110 A.2d 661 (1955); Michigan Fire and Marine Ins. Co. v. Genie Craft Corp., 195 F. Supp. 222 (D. Md. 1961). We observe that notification of the actual assignment (not merely of the security interest) was not received by the Department until after Mega had defaulted on its contract.
