Document:

<PAGE>   1
                                                                   EXHIBIT 10.17

                      FOURTH AMENDMENT TO CREDIT AGREEMENT

     THIS FOURTH AMENDMENT TO CREDIT AGREEMENT (this "Amendment") is entered
into as of January 31, 2001, by and among THE KEITH COMPANIES, INC., a
California corporation, and HEA ACQUISITION, INC., a California corporation
(individually and collectively "Borrower"), and WELLS FARGO BANK, NATIONAL
ASSOCIATION ("Bank").

                                    RECITALS

     WHEREAS, Borrower is currently indebted to Bank pursuant to the terms and
conditions of that certain Credit Agreement between Borrower and Bank dated as
of September 1, 1999, as amended from time to time ("Credit Agreement").

     WHEREAS, Bank and Borrower have agreed to certain changes in the terms and
conditions set forth in the Credit Agreement and have agreed to amend the Credit
Agreement to reflect said changes.

     NOW, THEREFORE, for valuable consideration, the receipt and sufficiency of
which are hereby acknowledged, the parties hereto agree that the Credit
Agreement shall be amended as follows:

     1. John M. Tettemer & Associates, Ltd., a California corporation ("JMTA")
is a party to and named as a Borrower under the Credit Agreement. JMTA is no
longer separate legal entity, but rather a division of The Keith Companies,
Inc.("Keith"). Accordingly, all references in the Agreement and in the other
Loan Documents to JMTA as a Borrower are hereby deleted; and all references in
the Credit Agreement and in the other Loan Documents to Keith as a Borrower
include, without limitation, JMTA as a division of Keith.

     2. HEA Acquisition, Inc., a California corporation ("HEA"), has become a
subsidiary of Keith, and is hereby added to the Credit Agreement as a "Borrower"
and included in the definition of such term. HEA hereby assumes and agrees to
perform all the obligations of Borrower under the Credit Agreement and the other
Loan Documents. HEA hereby grants to Bank security interests of first priority
in all of HEA's assets comprising collateral as described in all security
agreements executed by Keith (alone or with others) with the same effect as if
HEA had signed such security agreements, except that the security interest in
the equipment described in Schedule I hereto shall be of second priority.
Borrower shall execute and deliver to Bank a promissory note substantially in
the form of Exhibit A hereto, which note shall constitute the Line of Credit
Note and shall amend and replace the Line of Credit Note previously attached to
the Credit Agreement as Exhibit A thereto.

     3. A new Section 1.5 is hereby added to the Credit Agreement, which Section
1.5 reads as follows:

     "Section 1.5. SUBORDINATION.

          All obligations of Borrower to Hook & Associates Engineering, Inc.
     shall be subordinated to all obligations of Borrower to Bank pursuant to
     the terms of a Subordination Agreement in form and content acceptable to
     Bank."

                                      -1-
<PAGE>   2

     4. The third paragraph of Section 2.1 is hereby amended to read as follows:

          "HEA Acquisition, Inc. is a corporation, duly organized and existing
     and in good standing under the laws of the state of California, and is
     qualified or licensed to do business (and is in good standing as a foreign
     corporation, if applicable) in all jurisdictions in which such
     qualification or licensing is required or in which the failure to so
     qualify or to be so licensed could have a material adverse effect on
     Borrower."

     5. Section 4.11 is hereby deleted without substitution.

     6. Section 5.3 is hereby amended to read as follows:

          "SECTION 5.3. OTHER INDEBTEDNESS. Create, incur, assume or permit to
     exist any indebtedness or liabilities resulting from borrowings, loans or
     advances, whether secured or unsecured, matured or unmatured, liquidated or
     unliquidated, joint or several, except (a) the liabilities of Borrower to
     Bank, (b) any other liabilities of Borrower existing as of, and disclosed
     to Bank prior to, the date hereof, (c) leases permitted under Section 5.6
     below, and (d) the subordinated indebtedness described in Section 1.5
     above."

     7. Section 5.4 is hereby amended to read as follows:

          "SECTION 5.4 MERGER, CONSOLIDATION, TRANSFER OF ASSETS. Merge into or
     consolidate with any other entity, nor acquire all or substantially all of
     the assets of any other entity; (provided, however that notwithstanding the
     foregoing, Borrower shall be permitted to merge, so long as a Borrower is
     the surviving entity, and/or acquire assets of other entities, so long as
     the total consideration paid by Borrower (whether in cash, notes, stock or
     otherwise) in each such merger, consolidation or acquisition does not
     exceed $1,000,000.00); nor make any substantial change in the nature of
     Borrower's business as conducted as of the date hereof ; nor sell, lease,
     transfer or otherwise dispose of all or a substantial or material portion
     of Borrower's assets except in the ordinary course of its business."

     8. Section 5.5 is hereby amended to read as follows:

          "SECTION 5.5 LOANS, ADVANCES, INVESTMENTS. Make any loans or advances
     to or investments in any person or entity, except (a) any of the foregoing
     existing as of, and disclosed to Bank prior to, the date hereof, (b) loans
     and advances to, and/or investments in, any Borrower consistent with
     Borrowers' prior practices, and (c) investments consisting of the purchase
     of all or substantially all of the equity interests in other entities
     engaged in businesses similar to that of Borrower, provided, that (i) the
     total consideration paid by Borrower (whether in cash, notes, stock or
     otherwise) in each such purchase does not exceed $1,000,000.00, and (ii)
     each such entity executes and delivers to Bank security agreements and
     UCC-1's substantially similar to those executed by Borrower in favor of
     Bank. No investment otherwise permitted under clause (c) hereunder, or
     merger or consolidation otherwise permitted under Section 5.4, shall be
     permitted if following such transaction, a breach of this Agreement would
     exist."

                                      -2-
<PAGE>   3

     Bank hereby consents to Keith's investment in HEA and to the purchase by
HEA of the assets of Hook & Associates Engineering, Inc.

     9. Except as specifically provided herein, all terms and conditions of the
Credit Agreement remain in full force and effect, without waiver or
modification. All terms defined in the Credit Agreement shall have the same
meaning when used in this Amendment. This Amendment and the Credit Agreement
shall be read together, as one document.

     10. Borrower hereby remakes all representations and warranties contained in
the Credit Agreement and reaffirms all covenants set forth therein. Borrower
further certifies that as of the date of this Amendment there exists no Event of
Default as defined in the Credit Agreement, nor any condition, act or event
which with the giving of notice or the passage of time or both would constitute
any such Event of Default.

     IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be
executed as of the day and year first written above.

THE KEITH COMPANIES, INC.                 WELLS FARGO BANK, NATIONAL ASSOCIATION

By: /s/ GARY CAMPANARO                    By: /s/ STEPHANIE JUNEAU
    --------------------------------          ----------------------------------
Title:  CFO                               Title:  Vice President

HEA ACQUISITION, INC.

By: /s/ GARY CAMPANARO
    --------------------------------
Title:  CFO

                                      -3-<PAGE>   1
                                                                   EXHIBIT 10.18

                       FIFTH AMENDMENT TO CREDIT AGREEMENT

THIS FIFTH AMENDMENT TO CREDIT AGREEMENT (this "Amendment") is entered into as
of April 27, 2001, by and between THE KEITH COMPANIES, INC., a California
corporation, HEA ACQUISTION, INC., a California corporation, (individually and
collectively "Borrower"), and WELLS FARGO BANK, NATIONAL ASSOCIATION ("Bank").

                                    RECITALS

WHEREAS, Borrower is currently indebted to Bank pursuant to the terms and
conditions of that certain Credit Agreement between Borrower and Bank dated as
of September 1, 1999, as amended from time to time ("Credit Agreement").

WHEREAS, Bank and Borrower have agreed to certain changes in the terms and
conditions set forth in the Credit Agreement and have agreed to amend the Credit
Agreement to reflect said changes.

NOW, THEREFORE, for valuable consideration, the receipt and sufficiency of which
are hereby acknowledged, the parties hereto agree that the Credit Agreement
shall be amended as follows:

     1. Section 6.1.(h) is hereby deleted in its entirety, and the following
substituted therefor:

           "(h) Aram Keith shall not for any reason own less than an
           aggregate of eighteen percent (18%) of the common stock of
           Borrower."

     2. Except as specifically provided herein, all terms and conditions of the
Credit Agreement remain in full force and effect, without waiver or
modification. All terms defined in the Credit Agreement shall have the same
meaning when used in this- Amendment. This Amendment and the Credit Agreement
shall be read together, as one document.

     3. Borrower hereby remakes all representations and warranties contained in
the Credit Agreement and reaffirms all covenants set forth therein. Borrower
further certifies that as of the date of this Amendment there exists no Event of
Default as defined in the Credit Agreement, nor any condition, act or event
which with the giving of notice or the passage of time or both would constitute
any such Event of Default.

IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be executed
as of the day and year first written above.

WELLS FARGO BANK,

THE KEITH COMPANIES, INC.                         NATIONAL ASSOCIATION

By: /s/ Gary Campanaro                            By: /s/ Stephanie Juneau
    --------------------------------                  --------------------------
Title:  CFO                                       Title:  Vice President

HEA ACQUISITION, INC.

By: /s/ Gary Campanaro
    -------------------------------
Title:  CFO

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00028-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00028-of-00352.parquet"}]]