QuickLinks -- Click here to rapidly navigate through this document

EXHIBIT 10.4

THIRD AMENDMENT

        THIS THIRD AMENDMENT (this "Amendment") dated as of February 28, 2002 is
to the Credit Agreement (the "Credit Agreement") dated as of March 17, 2000
among TETRA TECH, INC. (the "Company"), various financial institutions and BANK
OF AMERICA, N.A., as administrative agent (the "Agent"). Unless otherwise
defined herein, terms defined in the Credit Agreement are used herein as defined
therein.

        WHEREAS, the parties hereto have entered into the Credit Agreement which
provides for the Banks to make Loans to, and to issue Letters of Credit for the
account of, the Company from time to time; and

        WHEREAS, the parties hereto desire to amend the Credit Agreement as set
forth below;

        NOW THEREFORE, in consideration of the premises and for other good and
valuable consideration (the receipt and sufficiency of which are hereby
acknowledged), the parties hereto agree as follows:

        SECTION 1    AMENDMENT.    Effective on (and subject to the occurrence
of) the Amendment Effective Date (as defined below), Section 10.12 of the Credit
Agreement shall be amended in its entirety to read as follows:

        10.12    Asset Dispositions.    Not, and not permit any Subsidiary to,
sell, transfer, convey, lease or otherwise dispose of, or grant options,
warrants or other rights with respect to, any of its assets, or sell, assign,
pledge or otherwise transfer any receivables, contract rights, general
intangibles, chattel paper or instruments, with or without recourse, except for
(a) dispositions of inventory or obsolete assets in the ordinary course of
business consistent with past practices and (b) other dispositions of assets
having an aggregate fair market value not exceeding $5,000,000 during the period
from the Effective Date to the Termination Date, provided that no dispostion
described in this clause (b) shall be made if an Event of Default or Unmatured
Event of Default exists or would result therefrom.

        SECTION 2    REPRESENTATIONS AND WARRANTIES.    The Company represents
and warrants to the Agent and the Banks that (a) each warranty set forth in
Section 9 of the Credit Agreement is true and correct as if made on the date
hereof, (b) the execution and delivery by the Company of this Amendment and the
performance by the Company of its obligations under the Credit Agreement as
amended hereby (as so amended, the "Amended Credit Agreement") (i) are within
the corporate powers of the Company, (ii) have been duly authorized by all
necessary corporate action, (iii) have received all necessary governmental
approval and (iv) do not and will not contravene or conflict with any provision
of law or of the charter or by-laws of the Company or any Subsidiary or of any
indenture, loan agreement or other material contract, or any judgment, order or
decree, which is binding upon the Company or any Subsidiary, and (c) this
Amendment and the Amended Credit Agreement are the legal, valid and binding
obligations of the Company, enforceable against the Company in accordance with
their terms, except as enforceability may be limited by bankruptcy, insolvency
or other similar laws of general application affecting the enforcement of
creditor's rights or by general principles of equity.

        SECTION 3    EFFECTIVENESS.    The amendment set forth in Section 1
shall become effective, as of the day and year first above written, on such date
(the "Amendment Effective Date") that the Agent shall have received each of the
following: (a) counterparts of this Amendment executed by the Company and the
Required Banks; (b) a Confirmation in the form of Exhibit A hereto signed by the
Company and each Subsidiary; and (c) such other documents as the Agent or any
Bank may reasonably request.

1

--------------------------------------------------------------------------------

        SECTION 4    MISCELLANEOUS.

        Section 4.1    Continuing Effectiveness, etc.    As herein amended, the
Credit Agreement shall remain in full force and effect and is hereby ratified
and confirmed in all respects.

        Section 4.2    Counterparts.    This Amendment may be executed in any
number of counterparts and by the different parties on separate counterparts,
and each such counterpart shall be deemed to be an original but all such
counterparts shall together constitute one and the same Amendment.

        Section 4.3    Governing Law.    This Amendment shall be a contract made
under and governed by the laws of the State of Illinois applicable to contracts
made and to be performed entirely within such State.

        Section 4.4    Successors and Assigns.    This Amendment shall be
binding upon the Company and the Agent and their respective successors and
assigns, and shall inure to the benefit of the Company and the Agent and the
successors and assigns of the Agent.

        Section 4.5    Expenses.    The Company agrees to pay the reasonable
costs and expenses of the Agent (including attorneys' fees) in connection with
the preparation, execution and delivery of this Amendment.

        Delivered at Chicago, Illinois, as of the day and year first above
written.

    TETRA TECH, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Name Printed: Richard A. Lemmon
Title: Executive Vice President          
 
 
BANK OF AMERICA, N.A., as
Administrative Agent
 
 
By:
 
/s/  KRISTINE THENNES      

--------------------------------------------------------------------------------

    Name Printed: Kristine Thennes
Title: Vice President          
 
 
BANK OF AMERICA, N.A., as Swing Line Bank, Issuing and as a Bank
 
 
By:
 
/s/  JENNIFER L. GERDES      

--------------------------------------------------------------------------------

    Name Printed: Jennifer L. Gerdes
Title: Vice President          

2

--------------------------------------------------------------------------------

 
 
WELLS FARGO BANK, N.A.,
as Documentation Agent
 
 
By:
 
/s/  RANDALL J. REPP      

--------------------------------------------------------------------------------

    Name Printed: Randall J. Repp
Title: Vice President          
 
 
HARRIS TRUST AND SAVINGS BANK,
as Syndication Agent and as a Bank
 
 
By:
 
         

--------------------------------------------------------------------------------

    Title:            

--------------------------------------------------------------------------------

         
 
 
THE FUJI BANK, LIMITED
 
 
By:
 
         

--------------------------------------------------------------------------------

    Title:            

--------------------------------------------------------------------------------

         
 
 
U.S. BANK, NATIONAL ASSOCIATION
(formerly known as Pacific Century Bank, N.A.)
 
 
By:
 
/s/  JOHN C. STIPANOV      

--------------------------------------------------------------------------------

    Name Printed: John C. Stipanov
Title: Vice President

3

--------------------------------------------------------------------------------

EXHIBIT A

CONFIRMATION

Dated as of February 28, 2002

        Each of the undersigned hereby acknowledges and agrees to the foregoing
Amendment and the Amended Credit Agreement and hereby confirms the continuing
validity and enforceability of the Guaranty and the Security Agreement after
giving effect thereto.

    SCM CONSULTANTS, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:             Secretary

--------------------------------------------------------------------------------

         
 
 
TETRA TECH EM, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
WHALEN & COMPANY, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
TETRA TECH NUS, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         

4

--------------------------------------------------------------------------------

 
 
MFG, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
DEA CONSTRUCTION COMPANY, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
UTILITIES & C.C., INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
COSENTINI ASSOCIATES, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
EVERGREEN UTILITY CONTRACTORS, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         

5

--------------------------------------------------------------------------------

 
 
KCM, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
LC OF ILLINOIS, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
MCNAMEE, PORTER & SEELEY, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
MCNAMEE INDUSTRIAL SERVICES, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
PDR ENGINEERS, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         

6

--------------------------------------------------------------------------------

 
 
GEOTRANS, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
FHC, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
RIZZO ASSOCIATES, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
ROCKY MOUNTAIN CONSULTANTS, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
WILLIAMS, HATFIELD & STONER, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
EXPERT WIRELESS SOLUTIONS, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

         
 
 
DRAKE CONTRACTORS, INC.
 
 
By:
 
/s/  RICHARD A. LEMMON      

--------------------------------------------------------------------------------

    Title:   Secretary

--------------------------------------------------------------------------------

       

7

--------------------------------------------------------------------------------

QuickLinks

EXHIBIT 10.4
THIRD AMENDMENT
EXHIBIT A