<PAGE>
 
================================================================================


                                THIRD AMENDMENT
                                      TO
                               CREDIT AGREEMENT


                                 By and Among


                                RAILTEX, INC.,


                      THE SEVERAL FINANCIAL INSTITUTIONS
                           PARTY TO THIS AGREEMENT,


                                      and


                           WELLS FARGO BANK (TEXAS),
                             NATIONAL ASSOCIATION,
                                   As Agent



                          Dated as of August 13, 1996




================================================================================
<PAGE>
 
<TABLE> 
<CAPTION> 
                               TABLE OF CONTENTS
                                                                            Page
<S>                                                                        <C> 

Section 1........................................Certain Defined Terms        1

Section 2.....................................................Recitals        1

Section 3...................................................Amendments        1

Section 4...................Ratification of Continued Force and Effect        4

Section 5.........................................Conditions Precedent        4

Section 6...............................................Applicable Law        4

Section 7.......................................Successors and Assigns        4

Section 8.................................................Counterparts        4

Section 9.............................................Effect of Waiver        4

Section 10....................................................Headings        5

Section 11..........Non-Application of Chapter 15 of Texas Credit Code        5

Section 12............................................ENTIRE AGREEMENT        5

</TABLE> 
                                       i
<PAGE>
 
                      THIRD AMENDMENT TO CREDIT AGREEMENT

          This is the Third Amendment (the "Amendment") dated as of August 13,
1996 to a Credit Agreement, dated as of May 17, 1996, among Wells Fargo Bank
(Texas), National Association (formerly known as First Interstate Bank of Texas,
N.A.), individually and as Agent, National Bank of Canada, New York Branch, ABN
Amro Bank, N.V. - Houston Agency, National City Bank, Kentucky and RailTex, Inc.
(as amended, the "Agreement").

          In consideration of the following Recitals, for $10 in hand paid and
for other good and valuable considerations, the receipt and sufficiency of which
are hereby acknowledged, the parties agree as follows, intending to be legally
bound:

     Section 1.   Certain Defined Terms. Capitalized terms used but not
defined herein have the meanings ascribed to them in the Agreement.

     Section 2.   Recitals. The Borrower has requested that the Issuing
Bank issue Letters of Credit. The Agent and the Banks concur in the request to
provide for Letters of Credit. This Amendment shall be effective on the date
(the "Effective Date") that all of the Conditions Precedent set out in Section 5
hereof have been met.

     Section 3.   Amendments.  The Agreement is amended as follows:

     (A)   The definitions of "Credit Exposure," "Letter of Credit" and
"Letter of Credit Agreement" are amended in their entirety to read as follows:

                "Credit Exposure" means the sum of the aggregate face amount of
           the Letters of Credit minus the aggregate amount of drafts paid under
           Letters of Credit for which the Issuing Bank has been reimbursed.

                "Letter of Credit" means a letter of credit issued pursuant to
           Section 3.1(b) of the Agreement; "Letters of Credit" means all
           letters of credit issued pursuant to Section 3.1(b) of the Agreement.

                "Letter of Credit Agreement" means each application and letter
           of credit agreement now or hereafter executed by the Borrower or a
           Subsidiary, or both, such agreement to be on the Issuing Bank's
           standard form (with such changes thereto as the Borrower and the
           Issuing Bank may agree to from time to time) and completed in form
           and substance satisfactory to the Issuing Bank; "Letter of Credit
           Agreements" means all of the Letter of Credit Agreements.

     (B)   The definition of "Loan Documents" found in Section 1.2 of the
Agreement is amended by changing the references to "Letter of Credit" and
"Letter of Credit Agreement" to be plural.

     (C)   Section 3.1 of the Agreement is amended by labeling the first
paragraph thereto "(a)", and by adding the following new subsections to the end
of Section 3.1:
<PAGE>
 
           "(b)   Letters of Credit. Subject to, and upon the terms,
     conditions, covenants and agreements contained herein and in the Letter of
     Credit Agreements, prior to the Revolving Termination Date, the Issuing
     Bank agrees to issue nontransferable standby Letters of Credit, in form and
     substance satisfactory to the Issuing Bank, for the account of a Borrower
     or a Subsidiary in an aggregate undrawn face amount at any time outstanding
     not to exceed the lesser of the (a) Revolving Loan Commitments and (b) the
     sum of (A) the then existing Credit Exposure plus (B) the then outstanding
     Borrowings on the Revolving Loan Commitments. In the event of an actual
     conflict between the terms and conditions of this Agreement and the terms
     and conditions of any Letter of Credit Agreement, the terms and conditions
     of this Agreement shall prevail. Letters of Credit shall be issued for a
     period not exceeding the Revolving Termination Date.

           "(c)   In the event, on the Revolving Termination Date, there
     remains any Credit Exposure, the Borrower agrees to deposit in a cash
     collateral account maintained by the Agent an amount equal to the aggregate
     undrawn amount of its respective Letters of Credit that are unmatured as of
     such date or with respect to which presentment for honor may not then be
     made; the unused portion thereof applicable to each respective Letter of
     Credit, if any, shall be returned to the Borrower after the expiration date
     of the Letter of Credit and after all Notes and Obligations hereunder and
     under the Loan Documents applicable to the Letter of Credit are paid in
     full."

     (D)   Section 3.2 of the Agreement is amended deleting subsections (c)
and (d) thereto.

     (E)   The first paragraph of Section 3.2(a) of the Agreement is
amended by deleting each reference to "plus any Credit Exposure."

     (F)   Subsection (d) of Section 3.6 of the Agreement is amended in its
entirety to read as follows:

           "(d)   Letter of Credit Fee. The Borrower agrees to pay to the
     Agent, for the benefit of the Lenders in proportion to their respective
     Commitment Percentages, a letter of credit fee of 1% per annum of the face
     amount of each Letter of Credit. Such fee shall be paid, fully earned and
     non-refundable upon acceptance by the Agent of the applicable Letter of
     Credit Agreement."

     (G)   Subsection (a) of Section 3.20 of the Agreement is amended by
(1) adding the letter "s" to the end of the word "Letter" in the heading
thereto, (2) deleting the word "the" before the first, second and fifth
references to Letter of Credit and inserting the letter "a" therefor, (3) by
deleting the word "the" before the third and fourth references to Letter of
Credit and inserting the word "such" therefor, and (4) inserting the word
"applicable" before the word beneficiary in the second sentence thereto.

                                      -2-
<PAGE>
 
     (H)   Subsections (i), (ii) and (iii) of Section 3.20(a) are amended
by deleting the word "the" before each reference to Letter of Credit and
inserting the word "any" therefor.

     (I)   Subsection (iv) of Section 3.20(a) of the Agreement is amended
by deleting the word "the" before the first and second reference to Letter of
Credit and inserting the word "any" in lieu thereof before the first reference,
and the letter "a" in lieu thereof before the second reference.

     (J)   Subsection (v) of Section 3.20(a) of the Agreement is amended by
deleting the word "the" before Letter of Credit and inserting the letter "a"
therefor.

     (K)   Subsection (b) of Section 3.20 of the Agreement is amended by (1)
deleting the word "the" before each reference to Letter of Credit and inserting
the word "each" before the first reference, the word "such" before the second
and fourth references, and the letter "a" before the third and fifth reference,
and (2) deleting the word "Acquisition" before each reference to Loan Commitment
and inserting the word "Revolving" therefor.

     (L)   Subsection (c) of Section 3.20 of the Agreement is amended by
deleting the word "the" before Letter of Credit and inserting the word "any"
therefor .

     (M)   Subsection (d) of Section 3.20 of the Agreement is amended by (1)
deleting the word "Acquisition" before each reference to Loan Commitments and
inserting the word "Revolving" therefor; (2) deleting the word "the" before the
second, third and fourth reference to Letter of Credit and inserting the letter
"a" therefor before the second reference, and the word "such" therefor before
the second and third reference; and (3) deleting each reference to "Interim
Acquisition Loan" and inserting the words "Borrowings under the Revolving Loan
Commitments" therefor.

     (N)   Subsection (g) of Section 3.20 of the Agreement is amended by
deleting the word "the" before Letter of Credit and inserting the letter "a"
therefor.

     (O)   Subsection (h) of Section 3.20 of the Agreement is amended by
changing the first three references of "Letter of Credit" to be references to
"Letters of Credit"; the fourth reference to "Letter of Credit" is amended by
inserting the word "applicable" before "Letter of Credit"; the fifth reference
to "Letter of Credit" is amended by deleting the word "the" before Letter of
Credit and inserting the word "any" therefor; the sixth reference to "Letter of
Credit" is amended by deleting the word "the" before "Letter of Credit" and
inserting the words "any such" therefor.

     (P)   Subsection (i) of Section 3.20 of the Agreement is amended by
deleting the word "the" before each reference to "Letter of Credit" and
inserting the letter "a" therefor.

     (Q)   Subsection (a) of Section 4.5 of the Agreement is amended by (1)
deleting the word "the" before the first reference to "Letter of Credit" and
inserting the word "each" therefor; (2) deleting the word "the" before the
fourth reference to "Letter of Credit" and inserting the word 

                                      -3-
<PAGE>
 
"such" therefor; and (3) deleting the word "the" before "Credit Request" in the
second paragraph thereof and inserting the word "each" therefor.

     Section 4.   Ratification of Continued Force and Effect.  Ratification of
Continued Force and Effect".  Except as specifically amended herein, all of the
terms and conditions of the Agreement and all of the Loan Documents executed in
connection therewith or contemplated thereby are and remain in full force and
effect in accordance with their respective terms.  All of the terms used herein
have the same meanings as set out in the Agreement, unless amended hereby or
unless the context clearly required otherwise.  References in the Agreement to
the "Agreement," and the "Credit Agreement," "hereof," "herein" and the words of
similar import shall be deemed to be references to the Agreement as amended
through the Effective Date.  Any reference in any Note or any other Loan
Documents to the "Credit Agreement" shall be deemed to be references to the
Agreement as amended through the Effective Date.

     Section 5.   Conditions Precedent. The effectiveness of this Amendment is
subject to the full and complete satisfaction of the following conditions
precedent:

     (A)   Certain Authorizations.  The Agent shall have received any
     evidence of corporate authorization by the Borrower and such other
     corporate documents as it may reasonably request.

     (B)   Certain Documents.  The Agent shall have received the following
     documents:

           (1)    This Amendment executed by all parties; and

           (2)    Such other and further documents and agreements as the Agent
           or its counsel shall reasonably request.

     Section 6.   Applicable Law. This Amendment and all other Loan Documents
executed pursuant hereto shall be deemed to have been made and to be performable
in Houston, Harris County, Texas and shall be governed by and construed in
accordance with the laws of the State of Texas.

     Section 7.   Successors and Assigns. This Amendment is binding upon and
shall inure to the benefit of the Lenders, the Agent and the Borrower and their
respective successors and assigns, except the Borrower may not assign or
transfer any of its rights or obligations hereunder without the prior written
consent of the Lenders and the Agent.

     Section 8.   Counterparts. This Amendment may be executed in one or more
counterparts, each of which when so executed shall be deemed to be an original,
but all of which when taken together shall constitute one and the same
instrument.

     Section 9.   Effect of Waiver. No consent or waiver, express or implied, by
any Lender

                                      -4-
<PAGE>
 
or the Agent to or for any breach of or deviation from any covenant, condition
or duty by the Borrower shall be deemed a consent or waiver to or of any other
breach of the same or any other covenant, condition or duty.

     Section 10.  Headings. The headings, captions, and arrangements used in
this Amendment are for convenience only and shall not affect the interpretation
of this Amendment.

     Section 11.  Non-Application of Chapter 15 of Texas Credit Code. The
provisions of Chapter 15 of the Texas Credit Code (Vernon's Annotated Texas
Statutes, Article 5069-15) are specifically declared by the parties not to be
applicable to this Amendment or any of the Loan Documents or the transactions
contemplated hereby.

     Section 12.  ENTIRE AGREEMENT. ENTIRE AGREEMENT".  THIS AMENDMENT, THE
AGREEMENT AND ALL OTHER INSTRUMENTS, DOCUMENTS, AND AGREEMENTS EXECUTED AND
DELIVERED IN CONNECTION WITH THIS AMENDMENT REPRESENT THE FINAL AGREEMENT
BETWEEN THE PARTIES HERETO MAY NOT BE CONTRADICTED BY EVIDENCE OF PRIOR,
CONTEMPORANEOUS OR SUBSEQUENT ORAL AGREEMENTS OF THE PARTIES HERETO.  THERE ARE
NO UNWRITTEN ORAL AGREEMENTS BETWEEN THE PARTIES HERETO.


     IN WITNESS WHEREOF, the parties have caused this Amendment to be duly
executed and delivered effective as of August 13, 1996.
 
BORROWER:
 
RAILTEX, INC.                          Address:  4040 Broadway, Suite 200
                                                 San Antonio, Texas 78209
                                                 Attn: Laura D. Davies
By: _________________________                          Vice President and
      Laura D. Davies                                  Chief Financial Officer
      Vice President and                         Telephone No. (210) 841-7600
      Chief Financial Officer                    Telecopy No. (210) 841-7629
 
 
 
AGENT:
 
WELLS FARGO BANK (TEXAS),              Address:  1000 Louisiana
NATIONAL ASSOCIATION                             Houston, Texas 77002
(formerly known as FIRST INTERSTATE
BANK OF TEXAS, N.A.)

                                      -5-
<PAGE>
 
                                                 Attn: Bennett D. Douglas
                                                       Vice President
                                                 Telephone No. (713) 250-1039
                                                 Telecopy No.  (713) 250-7031


By  
    -------------------------
       Bennett D. Douglas
       Vice President

                                      -6-
<PAGE>
 
LENDERS:

WELLS FARGO BANK (TEXAS),              Domestic Lending Office and
NATIONAL ASSOCIATION                   Eurodollar Lending Office
(formerly known as FIRST INTERSTATE
BANK OF TEXAS, N.A.)

                                       Address:  1000 Louisiana
By___________________________                    Houston, Texas 77002
    Bennett D. Douglas                           Attn: Bennett D. Douglas    
    Vice President                                     Vice President        
                                                 Telephone No. (713) 250-1039
                                                 Telecopy No.  (713) 250-7031 

                                       Domestic Lending Office and
                                       Eurodollar Lending Office


NATIONAL BANK OF CANADA,               Address:  National Bank of Canada,
 NEW YORK BRANCH                                   125 W. 55th Street
                                                   New York, New York  10019
                                                   Attn:  Mr. Wayne Rosen
                                                   Telephone No. (212) 632-8568
                                                   Telecopy No. (212) 632-8736


By
   -------------------------
     Larry L. Sears
     Group Vice President                        With a copy to:
 
and                                              National Bank of Canada
                                                 2121 San Jacinto, Suite 1850
                                                 Dallas, Texas 75201
By                                               Attn: Mr. Douglas Clark
   -------------------------                           Vice President
     Douglas Clark                               Telephone No. (214) 871-1265
     Vice President                              Telecopy No.  (214) 871-2015

                                       Domestic Lending Office and
                                       Eurodollar Lending Office

                                      -7-
<PAGE>
 
ABN AMRO BANK, N.V.-                   Address:  3 Riverway, Suite 1700
HOUSTON AGENCY                                   Houston, Texas  77056
By:  ABN AMRO NORTH AMERICA, INC.,               Attn: Belinda Rowell
     as Agent                                    Telephone No. (713) 964-3363
                                                 Telecopy No. (713) 629-7533

                                       Domestic Lending Office and
                                       Eurodollar Lending Office 
By:                                    
   --------------------------
  Name:
  Title:

     and


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


NATIONAL CITY BANK, KENTUCKY           Address:  101 South Fifth Street
                                                 Louisville, Kentucky  40202
                                                 Attn:  Donald R. Pullen, Jr.
                                                 Telephone No. (502) 581-6352
By:_________________________                     Telecopy No. (502) 581-5122
     Donald R. Pullen                  
     Vice President                    Domestic Lending Office and 
                                       Eurodollar Lending Office    

                                      -8-