<PAGE>
                                                                    EXHIBIT 10.4

                               FIRST AMENDMENT TO
                            TRANCHE B LOAN AGREEMENT

                  This FIRST AMENDMENT TO TRANCHE B LOAN AGREEMENT, dated as of
October 15, 2001 (this "Amendment") is among BRL UNIVERSAL EQUIPMENT 2001 A,
L.P., a Delaware limited partnership ("Borrower"), the several financial
institutions listed on the signature pages hereof as Tranche B Lenders, (each a
"Tranche B Lender" and collectively "Tranche B Lenders"), BANKERS TRUST COMPANY,
as Administrative Agent for Tranche B Lenders (in such capacity, "Administrative
Agent") and BANKERS TRUST COMPANY, as Collateral Agent (in such capacity,
"Collateral Agent").


                                   WITNESSETH:

                  WHEREAS, Borrower, Administrative Agent, Collateral Agent and
Tranche B Lenders have entered into that certain Tranche B Loan Agreement dated
as of February 9, 2001 (together with all amendments and supplements thereto,
the "Tranche B Loan Agreement"); and

                  WHEREAS, the parties hereto desire to amend certain Sections
of the Tranche B Loan Agreement.

                  NOW, THEREFORE, in consideration of the premises and mutual
agreements contained herein and in the Participation Agreement, the parties
hereto agree as follows:

                  1. Definitions. Unless the context otherwise requires,
capitalized terms used herein and not otherwise defined herein shall have
meanings set forth or referred to in Appendix A to the First Amended and
Restated Participation Agreement dated as of October 15, 2001 (the
"Participation Agreement") among Universal Compression Inc., Universal
Compression Holdings, Inc., Borrower, The Bank of New York, the Tranche B
Lenders party thereto, BRL Universal Equipment Management, Inc., Administrative
Agent and Collateral Agent, which Appendix A also contains the rules of usage
that shall apply hereto.

                  2. Effectiveness. This Amendment shall become effective as of
the date first written above upon (i) the execution and delivery hereof by
Majority Tranche B Lenders, Lessee and Borrower and (ii) the First Amended and
Restated Participation Agreement becoming effective in accordance with the terms
thereof.

                  3.       Amendments.

                           (a) The introductory paragraph is hereby amended and
         restated as follows:

                                    This TRANCHE B LOAN AGREEMENT, dated as of
                  February 9, 2001 (the "Agreement") is among BRL UNIVERSAL
                  EQUIPMENT 2001 A, L.P., a Delaware limited partnership
                  ("Borrower"), the several financial institutions listed on the
                  signature pages hereof as Tranche B Lenders or who became
                  party to the Participation Agreement (as defined below) in
                  accordance
<PAGE>

                  with its terms (each a "Tranche B Lender" and collectively
                  "Tranche B Lenders"), BANKERS TRUST COMPANY, as Administrative
                  Agent for Tranche B Lenders (in such capacity, "Administrative
                  Agent") and BANKERS TRUST COMPANY, as Collateral Agent (in
                  such capacity, "Collateral Agent").

                           (b) Section 2.1 is hereby amended and restated as
         follows:

                                    "Subject to and upon the terms and
                  conditions set forth in this Agreement and the Participation
                  Agreement, each Tranche B Lender agrees to make one or more
                  non-revolving loans in accordance with Section 4.1 of the
                  Participation Agreement."

                           (c) Section 2.2(b) is hereby amended and restated as
         follows:

                                    "Each Tranche B Note issued to a Tranche B
                  Lender shall (i) be executed by Borrower, (ii) be payable to
                  such Tranche B Lender or registered assigns and be dated the
                  Funding Date therefor, (iii) be in a stated principal amount
                  equal to the principal amount funded by such Tranche B Lender
                  on such Funding Date, (iv) mature on the Maturity Date, (v)
                  bear interest as provided in Section 2.3.2, (vi) be subject to
                  mandatory repayment as provided in Section 2.5 and (vii) be
                  entitled to the benefits of this Agreement and the other
                  Operative Documents."

                           (d) Section 2.3.2 is hereby amended and restated as
         follows:

                                    "Borrower agrees to pay to each Tranche B
                  Lender on each Floating Payment Date interest accrued on the
                  unpaid principal amount of such Tranche B Lender's Tranche B
                  Loan (or Tranche B Loans) from the date the proceeds thereof
                  are disbursed to Borrower in accordance with Section 2.2 until
                  the date on which such Tranche B Loan (together with accrued
                  and unpaid interest thereon) is repaid in full (whether on the
                  Maturity Date, by acceleration or otherwise) at the Applicable
                  Tranche B Rate calculated for each day elapsed since the
                  immediately preceding Floating Payment Date, or in the case of
                  the first Floating Payment Date following the making of such
                  Tranche B Loan, since the Funding Date therefor as follows:




                                      -2-
<PAGE>

          AR x P x 1/D

          where,

          AR    =   the Applicable Tranche B Rate for such Tranche B Loan for
     such day;

          P     =   the unpaid principal balance of such Tranche B Loan on such
     day; and

          D     =   360 or, to the extent the Applicable Tranche B Rate is
     based on the Alternate Rate, 365 or 366 days, as applicable."

                  4. Authorization. By executing and delivering this Amendment,
each Lender hereby authorizes and instructs Collateral Agent to execute and
deliver the First Amended and Restated Participation Agreement and the First
Amendment to Equipment Lease Agreement, in each case, of even date herewith.

                  5. Miscellaneous. Sections 6.1, 6.2, 6.5, 6.7, 6.8, 6.10, 6.11
and 6.12 of the Tranche B Loan Agreement are incorporated herein by reference
mutatis mutandis.




                                      -3-
<PAGE>
                  IN WITNESS WHEREOF, the parties hereto have caused this
Amendment to be duly executed and delivered by their respective duly authorized
officers as of the date first above written.

                                BRL UNIVERSAL EQUIPMENT 2001 A, L.P.,
                                     as Borrower

                                By BRL Universal Equipment Management, Inc.
                                Its General Partner

                                By:/s/ Gregory C. Greene
                                   ---------------------------------------------
                                     President


                                BANKERS TRUST COMPANY
                                     as Administrative Agent

                                By: /s/ Calli S. Hayes
                                   ------------------- -------------------------
                                     Managing Director


                                BANKERS TRUST COMPANY
                                     as Collateral Agent

                                By: /s/ Calli S. Hayes
                                    --------------------------------------------
                                     Managing Director


                                FIRST UNION NATIONAL BANK
                                       as a Tranche B Lender

                                By: /s/ David E. Humphreys
                                    --------------------------------------------
                                     Vice President


                                BANK ONE, NA
                                     (Main Office Chicago)
                                       as a Tranche B Lender

                                By: /s/ Dianne L. Russell
                                    --------------------------------------------
                                     Vice President






                                THE BANK OF NOVA SCOTIA


                                -Signature Page-
                  [First Amendment to Tranche B Loan Agreement]
<PAGE>

                                    as a Tranche B Lender

                                By:/s/ F.C.H. Ashby
                                   ---------------------------------------------
                                    Senior Manager, Loan Operations


                                CITADEL HILL 2000 Ltd.,
                                      as a Tranche B Lender

                                By:/s/ Stephen Lockhart
                                   ---------------------------------------------
                                    Authorized Signatory


                                NATEXIS BANQUES POPULAIRES
                                      as a Tranche B Lender

                                By:
                                    --------------------------------------------
                                    Name:
                                    Title:


                                LANDMARK CDO LIMITED,
                                   as Tranche B Lender

                                By
                                  ----------------------------------------------
                                    Name:
                                    Title:


                                CSAM FUNDING I,
                                   as Tranche B Lender

                                By
                                  ----------------------------------------------
                                    Name:
                                    Title:


                                FIRST DOMINION FUNDING I,
                                   as Tranche B Lender

                                By
                                  ----------------------------------------------
                                    Name:
                                    Title:



                                -Signature Page-
                  [First Amendment to Tranche B Loan Agreement]
<PAGE>
                                FIRST DOMINION FUNDING II,
                                   as Tranche B Lender

                                By
                                  ----------------------------------------------
                                    Name:
                                    Title:




                                -Signature Page-
                  [First Amendment to Tranche B Loan Agreement]