
737 S.W.2d 803 (1987)
ITT DIVERSIFIED CREDIT CORPORATION, et al.,
v.
FIRST CITY CAPITAL CORPORATION.
No. C-5894.
Supreme Court of Texas.
October 7, 1987.
J. Grady Randle, Ross, Banks, May, Cron & Cavin, Houston, for ITT.
Mark D. Wilson, Engel, Jones & Wilson, P.C., Houston, for FCCC.

OPINION
GONZALEZ, Justice.
This is a case of first impression concerning the effect of a subordination agreement made between the first and third lienholders on the priority status of a second lienholder. The trial court gave the second lienholder priority over the first and third lienholders. The court of appeals affirmed the judgment of the trial court. 717 S.W.2d 419. We reverse and remand.
First City National Bank (the Bank) acquired a first lien security interest on personal property owned by Sisco Enterprises. First City Capital Corporation (FCCC) obtained a second lien and ITT Diversified Corporation (ITT) obtained a third lien on the same assets.
In order for ITT to lend money to Sisco Enterprises, the Bank executed a subordination agreement to ITT, in which the Bank subordinated its interest in certain assets of the debtor to the interest of ITT. Thereafter, ITT foreclosed on these same assets. FCCC claimed the proceeds of the sale and when it was not paid, filed suit alleging that its security interest was superior to ITT's interest. The trial court held that the subordination agreement between the Bank and ITT did not give ITT priority over the interest possessed by FCCC. The trial court rendered judgment that FCCC recover from ITT the proceeds from the sale of the assets in question, plus interest and costs, and the court of appeals affirmed. ITT asserts that the trial court and the court of appeals erred in holding that the subordination agreement did not allow ITT to succeed to the interest of the Bank.
*804 The Texas Business & Commerce Code provides that nothing in article 9 prevents subordination by agreement by any person entitled to priority. Tex.Bus. & Com.Code Ann. § 9.316 (Vernon Supp. 1987). Section 1.102 of the Code specifically allows provisions of the Code to be varied by agreement. Tex.Bus. & Com.Code Ann. § 1.102(c) (Vernon 1968). Moreover, a subordination agreement is nothing more than a contractual modification of lien priorities and must be construed according to the expressed intention of the parties and its terms. Vahlsing Christina Corp. v. First Nat'l Bank of Hobbs, 491 S.W.2d 954 (Tex.Civ.App.El Paso 1973, writ ref'd n.r. e.).
The court of appeals relied on McConnell v. Mortgage Inv. Co. of El Paso, 292 S.W.2d 636, 638 (Tex.Civ.App. El Paso 1955), aff'd, 157 Tex. 572, 305 S.W.2d 280 (1957). McConnell is inapplicable because it dealt exclusively with the priorities between a deed of trust, a vendor's lien, and a mechanic's and a materialman's lien. In McConnell, we specifically noted that the litigation involved the priority of liens arising from a real estate transaction. In a non-real property situation, the third lienholder should be able to succeed to that part of the interest that was subordinated by the first lienholder, so long as the second lienholder is neither burdened nor benefitted by the subordination agreement. For example, A, B and C have claims against the debtor which are entitled to priority in alphabetical order. "A" subordinates his claim to "C." After foreclosure of the secured interest, the resulting fund is insufficient to satisfy all three claims. The proper distribution of the fund is as follows.
1. Set aside from the fund the amount of "A"'s claim.
2. Out of the money set aside, pay "C" the amount of its claim, pay "A" to the extent of any balance remaining after "C"'s claim is satisfied.
3. Pay "B" the amount of the fund remaining after "A"'s claim has been set aside.
4. If any balance remains in the fund after "A"'s claim has been set aside and "B"'s claim has been satisfied, distribute the balance to "C" and "A".
See Gilmore, Security Interests in Personal Property § 39.1 at 1021 (1965).
Thus, "C", by virtue of the subordination agreement, is paid first, but only to the amount of "A"'s claim, to which "B" was in any event junior. "B" receives what it had expected to receive, the fund less "A"'s prior claim. If "A"'s claim is smaller than "C"'s, "C" will collect the balance of its claim, in its own right, only after "B" has been paid in full. "A", the subordinator, receives nothing until "B" and "C" have been paid except to the extent that its claim, entitled to first priority, exceeds the amount of "C"'s claim, which, under its agreement, is to be first paid.
The trial court should set aside from the fund the amount of the Bank's claim and out of this amount, pay ITT the amount of its claim. Then, the trial court should allocate to the Bank any balance remaining after ITT's claim is satisfied, and then allocate to FCCC the amount of the fund remaining after the Bank's claim has been set aside. If any balance remains in the fund after the Bank's claim has been set aside and FCCC's claim has been satisfied, the court should distribute the balance to ITT and then to the Bank. Thus, ITT, by virtue of the subordination agreement, is paid first but only to the amount of the Bank's claim, to which FCCC was in any event junior. FCCC will receive what it expected to receive, the fund less the Bank's prior claim.
The judgment of the court of appeals is reversed and this cause is remanded to the trial court for rendition of judgment consistent with this opinion.
