EXHIBIT 10.6 Third Amendment to Security and Loan Agreement (Accounts Receivable) This Third Amendment ("Amendment") amends that certain Security and Loan Agreement (Accounts Receivable) ("Security and Loan Agreement") with the attached Addendum ("Addendum") both dated February 9, 1998, as amended (such Security and Loan Agreement and Addendum herein referred to as "Agreement") by and between Imperial Bank ("Bank") The Keith Companies, Inc., Keith Engineering, Inc., and ESI, Engineering Services, Inc. ("Co-Borrowers") as follows: 1. The first paragraph of the Security and Loan Agreement is hereby amended to read in full as follows: "This Agreement is entered into between The Keith Companies ("Companies"), Keith Engineering ("Engineering"), ESI, Engineering Services, Inc. ("ESI"), John M. Tettemer & Associates, Ltd. ("Tettemer") ("Companies, Engineering, ESI and Tettemer each a co-borrower hereunder and jointly and severally herein called "Borrower") and IMPERIAL BANK (herein called "Bank")" 2. Tettemer is hereby added as a Borrower to the Agreement, and wherever the term "Borrower" "Borrowers", "Co-Borrower" or "Co-Borrowers" is used in the Agreement it shall mean each Borrower jointly and severally. 3. Paragraph 1. of the Agreement is amended by deleting the term "75.000% of Eligible Accounts of Companies and Engineering, and 80% of Eligible Accounts of ESI and in no event more than $5,000,000" therefrom and substituting the following therefore "80.000% of Eligible Accounts and in no event more than $5,500,000". 4. Paragraph 1. of the Addendum is hereby amended in full to read as follows: "1.a. Any commitment of Bank, pursuant to the terms of the Security and Loan Agreement, to make advances against Eligible Accounts shall expire on APRIL 30, 1999, subject to Bank's right to renew said commitment at its sole discretion. Any renewal of the commitment shall not be binding upon the Bank unless it is in writing and signed by an officer of the Bank. b. The extensions of credit under the Security and Loan Agreement shall be available as follows: (i). Up to $5,500,000 in direct advances. (ii). Up to $ 150,000 for the issuance of a standby letter of credit with a termination date of no later than January 31, 1999. (iii) The aggregate amount of all (a) direct advances to ESI and (b) all letters of credit issued by the Bank for the Account of ESI cannot exceed $750,000 at any one time. (iv) The aggregate amount of all direct advances to Tettemer cannot exceed $450,000 at any one time. (iv). The combined outstandings of (i) and (ii) shall not exceed $5,500,000. 5. The following is hereby added to Paragraph 2 of the Addendum: "e. YEAR 2000 COMPLIANCE. Borrower and its subsidiaries, as applicable, have reviewed the areas within their operations and business which could be adversely affected by, and have developed or are developing a program to address on a timely basis, the Year 2000 Problem and have made related appropriate inquiry of material suppliers and vendors, and based on such review and program, the Year 2000 Problem will not have a material adverse effect upon their financial condition, operations or business as now conducted. "Year 2000 Problem" means the possibility that any computer applications or equipment used by Borrower may be unable to recognize and properly perform date sensitive functions involving certain dates prior to and any dates on or after December 31, 1999." 6. Paragraph 5 of the Addendum is amended in full to read: "As a condition precedent to Bank's obligation to make any advances to Borrowers, Borrowers shall, among other things: cause a guarantee to be executed by ARAM H. KEITH in the amount of $5,500,000 in form and substance satisfactory to Bank." 7. The following is hereby add to paragraph 8 of the Addendum: "q. YEAR 2000 COMPLIANCE. Perform all acts reasonably necessary to ensure that (a) Borrower and any business in which Borrower holds a substantial interest, and (b) all customers, suppliers and vendors that are material to Borrower's business, become Year 2000 Compliant in a timely manner. Such acts shall include, without limitation, performing a comprehensive review and assessment of all Borrower's systems and adopting a detailed plan, with itemized budget, for the remediation, monitoring and testing of such systems. As used in this paragraph, "Year 2000 Compliant" shall mean, in regard to any entity, that all software, hardware, firmware, equipment, goods or systems utilized by or material to the business operations or financial condition of such entity, will properly perform date sensitive functions before, during and after the year 2000. Borrower shall, immediately upon request, provide to Bank such certifications or other evidence of Borrower's compliance with the terms of this paragraph as Bank may from time to time require." 8. Paragraph 9 of the Addendum is amended in full to read: "The extensions of credit under the Security and Loan Agreement shall be available as follows: Up to a) $5,500,000 in direct advances and b) $150,000 in standby letters of credit, provided that the combined outstandings of a) and b) do not exceed $5,500,000. 9. Paragraph 10 of the Addendum is amended by adding the following to the end of the first paragraph: "A fee of .50% p.a. on the unused portion of the commitment shall be due quarterly in arrears, commencing with the quarter beginning October 1, 1998 and ending December 31, 1998, on the last $500,000.00 of the commitment." 10. Except as provided above, the Agreement remains unchanged. 11. This Amendment is effective as of October 7, 1998, and the parties hereby confirm that the Agreement as amended is in full force and effect. THE KEITH COMPANIES, INC. By: /s/ ARAM H. KEITH Name: Aram H. Keith Title: President Signatures continued on next page. KEITH ENGINEERING, INC. By: /s/ ARAM H. KEITH Name: Aram H. Keith Title: President ESI, ENGINEERING SERVICES, INC. By: /s/ ARAM H. KEITH Name: Aram H. Keith Title: President JOHN M. TETTEMER & ASSOCIATES, LTD. By: /s/ ARAM H. KEITH Name: Aram H. Keith Title: President IMPERIAL BANK By: /s/ DENISE PARDUE Name: Denise Pardue Title: Vice President