Mr. Justice Clark
delivered the opinion of the Court.
The ultimate issue in this case is the applicability of the doctrine of marshaling of assets. The Government urges that it be applied to effect the collection of its junior income tax lien on the cash surrender value of certain life insurance policies. The senior lien is secured by the entire proceeds of the policies and absorbs practically all of their cash surrender value. The proceeds of the policies are exempt from levy by creditors of the insured under state law.
In 1943 the deceased, Peter Meyer, pledged his insurance policies to a bank as collateral security for a loan, giving the bank the right to satisfy its claim out of the “net proceeds of the policy when it becomes a claim by death.” When Mr. Meyer died, the insurance company paid the amount of the loan to the bank and the balance to the petitioner, Mr. Meyer’s widow and beneficiary. The Commissioner claims, however, that the insurance proceeds must be marshaled, that the Government’s admittedly junior tax lien must be paid from the cash surrender value of the policies and the bank from the remaining proceeds. The District Court agreed, 202 F. Supp. 606, and the Court of Appeals affirmed, 309 F. 2d 131. We granted certiorari because of the importance of the question in the administration of the income tax laws. 372 U. S. 934. We disagree with both courts and reverse the judgment.
I.
Peter Meyer owned four life insurance policies which named the petitioner, his wife, as beneficiary. Their face amount was $50,000 and their cash surrender value at his death was $27,285.87. He had retained the usual powers under such policies, namely, to change the beneficiaries, demand the cash surrender value and assign the policies. In 1943, long before the tax assessments in this suit, he assigned the policies as collateral security for the repayment of a loan from the Huntington National Bank of Columbus, Ohio. The bank was given the right, in the event of death, to satisfy its claim out of the “net proceeds of the policy when it becomes a claim by death.” At the time of Meyer’s death, $26,844.66 was due on this loan.
It is not disputed that the Commissioner assessed deficiencies covering income taxes due by Mr. Meyer for the years 1945 and 1946, with a balance of $6,159.09 plus interest due at his death, and that notice of lien was filed in 1955. Meyer died on December 28, 1955, and petitioner was named executrix of his estate. After the insurance company paid the full amount of the loan to the bank and the balance remaining due on the policies to the petitioner, this suit was begun against petitioner, individually and as executrix, for the recovery of the full amount of the taxes due. Petitioner tendered the sum of $441.21, the difference between the cash surrender value and the amount paid to the bank, but claimed the remainder as exempt under New York Insurance Law § 166. The District Court, however, granted summary judgment for the Government on the theory that the tax lien could be satisfied out of that portion of the proceeds that represented the cash surrender value by marshaling the funds and paying the bank’s claim from the remainder of the proceeds. It followed the holding of the Second Circuit in United States v. Behrens, 230 F. 2d 504. The Court of Appeals affirmed on the same basis. We cannot agree.
II.
This Court has held and the parties do not dispute that: absent a lien, recovery of unpaid federal income taxes from a beneficiary of insurance can be had only to the extent that applicable state law permits such recovery by other creditors of the insured, Commissioner v. Stern, 357 U. S. 39, 46-47 (1958); the insured taxpayer’s “property and rights to property” under § 3670 of the Internal Revenue Code of 1939 are measured by the policy contract as enforced by applicable state law, United States v. Bess, 357 U. S. 51, 55-56 (1958); the cash surrender value of an insurance policy, where subject to the control of the insured, is “property and rights to property” under the section, id., at 59; finally, the priority of liens is determined by the principle “first in time, first in right,” United States v. New Britain, 347 U. S. 81 (1954). Applying New York law, this results in the bank’s lien being the senior one on the entire proceeds of the policies with the tax lien only attaching to the cash surrender value subject to the bank’s claim. The narrow question remaining is whether in such a situation the doctrine of marshaling ,of assets is compelled.
III.
This Court has said that “[t]he equitable doctrine of marshalling [sic] rests upon the principle that a creditor having two funds to satisfy his debt, may not by his application of them to his demand, defeat another creditor, who may resort to only one of the funds.” Sowell v. Federal Reserve Bank, 268 U. S. 449, 456-457 (1925). The Courts of Appeals of two Circuits have applied the doctrine, despite state law, to the collection of federal tax liens. United States v. Behrens, supra, and United States v. Wintner, 200 F. Supp. 157, aff’d 312 F. 2d 749 (C. A. 6th Cir.). We note, however, that Behrens antedates our Stern and Bess opinions as well as those in Aquilino v. United States, 363 U. S. 509 (1960), and United States v. Durham Lumber Co., 363 U. S. 522 (1960). These latter two cases held that competing liens of the Government for taxes and of subcontractors for labor and materials to a fund due the taxpayer under a general construction contract were controlled by applicable state law. This Court has never applied the doctrine of marshaling to federal income tax liens although it did deny the petition for certiorari filed in the Behrens case, supra, 351 U. S. 919. Nor has the Congress seen fit to lay down any rules with reference to the application of the doctrine, apparently leaving the problem to this Court.
IV.
In considering the relevance of the doctrine here it is well to remember that marshaling is not bottomed on the law of contracts or liens. It is founded instead in equity, being designed to promote fair dealing and justice. Its purpose is to prevent the arbitrary action of a senior lienor from destroying the rights of a junior lienor or a creditor having less security. It deals with the rights of all who have an interest in the property involved and is applied only when it can be equitably fashioned as to all of the parties. Thus, state courts have refused to apply it where state-created homestead exemptions would be destroyed, Sims v. McFadden, 217 Ark. 810, 233 S. W. 2d 375; or where the rights of insurance beneficiaries would be adversely affected, Bruns v. First Trust & Deposit Co., 250 App. Div. 370, 295 N. Y. Supp. 412; or where the rights of third parties having equal equity would be prejudiced, Barbin v. Moore, 85 N. H. 362, 159 A. 409; or where the “head of the household” exemption was involved, Westgrove Savings Bank v. Dunlavy, 190 Iowa 1054, 181 N. W. 404, and Pugh v. Whitsitt & Guerry, 161 S. W. 953 (Tex. Ct. Civ. App.). Federal courts have likewise accepted this principle of the nonapplicability of the doctrine where, as here, one of the funds is exempt under state law. See In re Bailey, 176 F. 990, where a state legislative homestead exemption was held to be a superior equity in the hands of a bankrupt, preventing the marshaling of assets to his disadvantage; Robert Moody & Son v. Century Savings Bank, 239 U. S. 374, 378 (1915), where Iowa’s requirement that a homestead, even when validly mortgaged, may be sold only for a deficiency remaining after exhausting all other property was declared available to a junior mortgagee to prevent a marshaling of assets; and Lockwood v. Exchange Bank, 190 U. S. 294, 300-301 (1903), where a waiver of state exemption statutes was held to have no effect in bankruptcy since the title to the exempted property remained in the bankrupt and never reached the trustee’s hands. It, therefore, seems clear that the courts have considered state exemption statutes when weighing the equities between parties to determine the applicability of the marshaling doctrine. This is in line with that deference to state law of our recent cases, discussed above, holding that state law controls the determination of what is included within the “property or right to property” covered by § 3670 and upon which the federal tax lien could attach. In addition, this Court in United States v. Brosnan, 363 U. S. 237 (1960), when faced with a comparable problem involving collection of federal taxes, found
“it desirable to adopt as federal law state law governing divestiture of federal tax liens, except to the extent that Congress may have entered the field. It is true that such liens form part of the machinery for the collection of federal taxes .... However, when Congress resorted to the use of liens, it came into an area of complex property relationships long since settled and regulated by state law. . . . We think it more harmonious with the tenets of our federal system and more consistent with what Congress has already done in this area, not to inject ourselves into the network of competing private property interests, by displacing well-established state procedures governing their enforcement, or superimposing on them a new federal rule.” At 241-242.
Congress has not seen fit to change the rules this Court fashioned in these cases. Indeed, it has not only permitted them to stand but, as was said in Holden v. Stratton, 198 U. S. 202, 213-214 (1905), “It has always been the policy of Congress, both in general legislation and in bankrupt acts, to recognize and give effect to the state exemption laws.” There are many examples, among which is the incorporation in the bankruptcy law of the exemptions made available by the State of a bankrupt’s domicile. See 52 Stat. 847, 11 U. S. C. § 24. This includes the exemption of life insurance proceeds. See Holden v. Stratton, supra, at 212-213. In addition, other exemptions have been added from time to time, such as the exclusion from taxation of the benefits from life insurance policies, Internal Revenue Code of 1954, § 101 (a), and the exception of life insurance benefits in which the surviving spouse has exclusive power of appointment from the rule that terminal interests may not qualify for the marital deduction, Internal Revenue Code of 1954, §2056 (b)(6).
We cannot overlook this long-established policy. In the absence of a definitive statutory rule to the contrary we therefore adopt the state rule and refuse to extend the equitable doctrine of marshaling assets to this situation. New York has a specific statute which exempts insurance benefits of a widow from the claim of creditors of her husband’s estate and its courts have refused to marshal assets where to do so will diminish those rights. Bruns v. First Trust & Deposit Co., supra. To apply marshaling in this case would overturn New York’s beneficent policy and, in addition, would enlarge the federal tax lien that the Congress has provided in § 3670. This we will not do. The judgment is therefore
Reversed.
“1. If any policy of insurance has been or shall be effected by any person on his own life in favor of a third person beneficiary, or made payable, by assignment, change of beneficiary or otherwise, to a third person, such third person beneficiary, assignee or payee shall be entitled to the proceeds and avails of such policy as against the creditors, personal representatives, trustees in bankruptcy and receivers in state and federal courts of the person effecting the insurance.” New York Insurance Law § 166.