Money realized from a foreclosure sale shall be made available for obligation and expenditure in the following order:

To cover the costs of the foreclosure proceeding described in section 3761 of this title.

To pay valid tax liens or assessments if required by the notice of default and foreclosure sale.

To pay any liens recorded before the recording of the mortgage which are required to be paid in conformity with the terms of sale in the notice of default and foreclosure sale.

To pay service charges and advances for taxes, assessments, and property insurance premiums.

To pay any outstanding interest.

To pay the principal outstanding balance secured by the mortgage (including expenditures for the necessary protection, preservation, and repair of the security property as authorized under the mortgage agreement and interest thereon if provided for in the mortgage agreement).

To pay any late charges or fees.

Any surplus of proceeds from a foreclosure sale, after payment of the items described in subsection (a) of this section shall be paid in the following order:

(A) First, to holders of liens recorded after the mortgage in the order of priority under Federal law or the law of the State in which the security property is located.

(B) Second, to the appropriate mortgagor.

If the person to whom such surplus is to be paid cannot be located, or if the surplus available is insufficient to pay all claimants and the claimants cannot agree on the allocation of the surplus, or if any person claiming an interest in the mortgage proceeds does not agree that some or all of the sale proceeds should be paid to a claimant as provided in this section, that part of the sale proceeds in question may be deposited by the foreclosure commissioner with an appropriate official or court authorized under law to receive disputed funds in such circumstances. If a procedure for the deposit of disputed funds is not available, and the foreclosure commissioner files a bill of interpleader or is sued as a stakeholder to determine entitlement to such funds, the foreclosure commissioner's necessary costs incurred in taking or defending such action shall be deductible from the disputed funds.

(Pub. L. 103–327, title II, Sept. 28, 1994, 108 Stat. 2316.)

Section is based on section 813 of title VIII of S. 2281, One Hundred Third Congress, as reported July 13, 1994, which was enacted into law by Pub. L. 103–327.