1 EXHIBIT 4.1 AMENDED AND RESTATED FIRST AMENDMENT AND CONSENT AMENDED AND RESTATED FIRST AMENDMENT AND CONSENT, dated as of November 10, 1999 (this "Amendment"), to the THIRD AMENDED AND RESTATED CREDIT AGREEMENT, dated as of July 2, 1998, among TESORO PETROLEUM CORPORATION, a Delaware corporation (the "Borrower"), the several banks and other financial institutions or entities from time to time parties to thereto (the "Lenders"), LEHMAN BROTHERS INC. ("LBI"), as advisor and arranger thereunder (in such capacity, the "Arranger"), LEHMAN COMMERCIAL PAPER INC. ("LCPI"), as syndication agent thereunder (in such capacity, the "Syndication Agent"), PARIBAS and BANK ONE, NA (formerly known as The First National Bank of Chicago), as co-administrative agents thereunder (in such capacity, the "Co-Administrative Agents"), BANK ONE, NA (formerly known as The First National Bank of Chicago), as general administrative agent thereunder (in such capacity, the "General Administrative Agent"), PARIBAS, as collateral agent thereunder (in such capacity, the "Collateral Agent"), and THE BANK OF NOVA SCOTIA, as documentation agent thereunder (in such capacity, the "Documentation Agent"). W I T N E S S E T H: WHEREAS, pursuant to the Credit Agreement, the Lenders have agreed to make, and have made, certain loans and other extensions of credit to the Borrower; WHEREAS, the Borrower intends to sell, in two or more transactions, all of the issued and outstanding Capital Stock of its subsidiaries and affiliates engaged in the business of exploring and developing hydrocarbons, including Tesoro Hydrocarbons Company USA, Tesoro Exploration and Production Company, Tesoro E&P, L.P., Tesoro Reserves Company, Tesoro Gathering Company, Tesoro Natural Gas Company and Tesoro Pipeline Company, L.P. (collectively, the Domestic E&P Entities"; the sale of such entities, the "Domestic E&P Sale") and Tesoro Bolivia Petroleum Company and Tesoro Latin American Company (collectively, the "Bolivian E&P Entities"; the sale of such entities, the "Bolivian E&P Sale"), and has requested the Lenders to consent thereto; WHEREAS, the Domestic E&P Sale and the Bolivian E&P Sale (collectively, the "Sale") will require the release of all of the Domestic E&P Entities and the Bolivian E&P Entities as Subsidiary Guarantors under the Guarantee and Collateral Agreement, the release of all security interests in the Capital Stock and assets of the Domestic E&P Entities and the Bolivian E&P Entities under the Guarantee and Collateral Agreement, and the release of all of the Oil and Gas Mortgages; WHEREAS, the Sale could be interpreted as a Fundamental Change under the Credit Agreement; WHEREAS, pursuant to the First Amendment and Consent, dated as of October 1, 1999 (the "Existing Amendment"), the Lenders consented to the Sale upon the terms and conditions set forth therein; 2 WHEREAS, the Borrower has advised the Lenders that, as permitted (upon Borrower providing the required Reinvestment Notice) by the Credit Agreement as in effect prior to the effectiveness of the Existing Amendment, the Borrower may wish to apply all or a portion of the proceeds of the Domestic E&P Sale toward the acquisition of other assets useful in the business of the Borrower and its Subsidiaries, and, to effect such acquisition as a like kind exchange pursuant to applicable law, the Borrower wishes to deposit the portion of such proceeds to be used for such acquisition in an escrow account (the "Escrow Account") pending such application; WHEREAS, the agreements governing the Escrow Account will provide that (i) the Borrower may withdraw funds from the Escrow Account during the six month period following the consummation of the Domestic E&P Sale for application toward the acquisition of assets useful in the business of the Borrower and its Subsidiaries and qualifying for "like kind exchange" under applicable law, (ii) the Borrower may at any time withdraw funds from the Escrow Account and apply such proceeds toward prepayment of the Term Loans and (iii) any funds on deposit in the Escrow Account on the date which is six months after the date of consummation of the Domestic E&P Sale will be transferred to the General Administrative Agent for application toward prepayment of the Term Loans, and any such funds remaining after such prepayment will be transferred to the Borrower; WHEREAS, in order to reflect the matters described in the preceding recitals, the parties hereto wish to amend and restate the Existing Amendment in its entirety; NOW, THEREFORE, in consideration of the premises and mutual agreements contained herein, and for other valuable consideration the receipt of which is hereby acknowledged, the Borrower and the Lenders hereby agree that on the Amendment Effective Date (as defined in Section 4 below) the Existing Amendment will be amended and restated in its entirety as follows: Definitions. Capitalized terms used herein and not otherwise defined shall have the meanings assigned to such terms in the Credit Agreement. 2. Consent. Subject to the terms and conditions hereof, the Lenders hereby (a) consent to the Sale subject to the proceeds of the Sale being applied toward the prepayment of the Term Loans and all accrued and unpaid interest thereon, provided that all or any portion of the proceeds of the Domestic E&P Sale may be deposited in the Escrow Account; and (b) authorize the Collateral Agent (i) to release its security interest in all Capital Stock of, and property owned by, the Domestic E&P Entities in connection with the Domestic E&P Sale (including, without limitation, the Oil and Gas Mortgages), (ii) to release its security interest in the Capital Stock of the Bolivian E&P Entities in connection with the Bolivian E&P Sale and (iii) to release from its obligations under the Guarantee and Collateral Agreement any Domestic E&P Entity and any Bolivian E&P Entity whose Capital Stock is sold pursuant to the Sale. 3. Amendments to Credit Agreement. (a) Section 1.1. of the Credit Agreement is hereby amended by deleting the definitions of "Excluded Subsidiaries" and "Responsible Officer" therefrom in their entirety and substituting therefor the following: "Excluded Subsidiaries": the collective reference to the "Excluded Subsidiaries" listed on Schedule 4.15 attached hereto. 3 "Responsible Officer": the chief executive officer, president, chief financial officer, general counsel, executive vice president corporate resources, senior vice president financial resources, vice president finance, vice president controller, or vice president treasurer of the Borrower, but in any event, with respect to financial matters, the chief financial officer, controller, senior vice president financial resources, vice president finance, or vice president treasurer of the Borrower. (b) Schedule 4.15 of the Credit Agreement is hereby amended by deleting such Schedule in its entirety and substituting in lieu thereof Schedule 4.15 in Exhibit A attached hereto. (c) Section 7.7(g) of the Credit Agreement is hereby amended by deleting such Section in its entirety and substituting in lieu thereof the following: "(g) to hold a 50% limited partnership interest in Tesoro Building Project, Ltd., a Delaware limited partnership." 4. Conditions to Effectiveness. This Amendment shall become effective, as of the date first written above, on the date (the "Amendment Effective Date") of receipt by the General Administrative Agent of (i) counterparts of this Amendment duly executed by the Borrower and the Required Lenders, and (ii) counterparts of the Acknowledgment and Consent attached hereto executed by each Subsidiary of the Borrower. 5. Representations and Warranties. On and as of the date hereof, and after giving effect to this Amendment, the Borrower confirms, reaffirms and restates that the representations and warranties set forth in Section 4 of the Credit Agreement are true and correct in all material respects, provided that the references to the Credit Agreement therein shall be deemed to be references to the Credit Agreement as amended by this Amendment. 6. Limited Amendment. Except as expressly amended hereby, the Credit Agreement is, and shall remain, in full force and effect. This Amendment shall not be deemed to be a waiver of, or consent to, or a modification or amendment of, any other term or condition of the Credit Agreement or to prejudice any other right or rights which the Lenders may now have or may have in the future under or in connection with the Credit Agreement or any of the instruments or agreements referred to therein, as the same may be amended from time to time. 7. Counterparts. This Amendment may be executed by one or more of the parties hereto in any number of separate counterparts and all of said counterparts taken together shall be deemed to constitute one and the same instrument. 8. GOVERNING LAW. THIS AMENDMENT SHALL BE GOVERNED BY, AND CONSTRUED AND INTERPRETED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK. 4 IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be executed and delivered by their respective duly authorized officers as of the date first above written. TESORO PETROLEUM CORPORATION By: /s/ SHARON L. LAYMAN ---------------------------------- Name: Sharon L. Layman Title: Vice President, Treasurer LEHMAN BROTHERS INC., as Arranger By: /s/ MICHELE SWANSON ---------------------------------- SYNDICATED LOAN FUNDING TRUST Name: Michele Swanson BY: LEHMAN COMMERCIAL PAPER Title: Authorized Signatory INC. NOT IN ITS INDIVIDUAL CAPACITY BUT SOLELY AS ASSET MANAGER LEHMAN COMMERCIAL PAPER INC., as Syndication Agent and as a Lender /s/ MICHELE SWANSON - ----------------------------- Name: Michele Swanson By: /s/ MICHELE SWANSON Title: Authorized Signatory ---------------------------------- Name: Michele Swanson Title: Authorized Signatory BANK ONE, NA (formerly known as The First National Bank of Chicago), as Co- Administrative Agent, General Administrative Agent and as a Lender By: /s/ THOMAS E. BOTH ---------------------------------- Name: Thomas E. Both Title: First Vice President 5 PARIBAS, as Co-Administrative Agent, Collateral Agent and as a Lender By: /s/ BRIAN M. MALONE ---------------------------------- Name: Brian M. Malone Title: Director By: /s/ BETSY JOCHER ---------------------------------- Name: Betsy Jocher Title: Vice President THE BANK OF NOVA SCOTIA, as Documentation Agent and as a Lender By: /s/ F.C.H. ASHBY ---------------------------------- Name: F.C.H. Ashby Title: Senior Manager Loan Operations ABN AMRO BANK N.V. By: /s/ ALLEN V. POOLE ---------------------------------- Name: Allen V. Poole Title: Senior Vice President By: /s/ W. BRYAN CHAPMAN ---------------------------------- Name: W. Bryan Chapman Title: Group Vice President BANK LEUMI USA By: /s/ JOUNG HEE HONG ---------------------------------- Name: Joung Hee Hong Title: Vice President BANK OF HAWAII By: /s/ BRENDA K. TESTERMAN ---------------------------------- Name: Brenda Testerman Title: Vice President 6 BANK OF SCOTLAND By: /s/ ANNIE GLYNN ---------------------------------- Name: Annie Glynn Title: Senior Vice President THE BANK OF TOKYO-MITSUBISHI, LTD. By: /s/ JOHN MCGHEE ---------------------------------- Name: John McGhee Title: VP & Manager BALANCED HIGH YIELD FUND I LTD. by BHF (USA) Capital corporation acting as attorney-in-fact By: ---------------------------------- Name: Title: By: ---------------------------------- Name: Title: BHF (USA) Capital Corporation By: ---------------------------------- Name: Title: By: ---------------------------------- Name: Title: CIBC INC. By: /s/ ROGER COLDEN ---------------------------------- Name: Roger Colden Title: Authorized Signatory 7 COMERICA BANK By: /s/ MARK B. GROVER ---------------------------------- Name: Mark B. Grover Title: Vice President CREDIT LYONNAIS NEW YORK BRANCH By: /s/ PHILIPPE SOUSTRA ---------------------------------- Name: Philippe Soustra Title: Senior Vice President FIRST HAWAIIAN BANK By: /s/ CHARLES L. JENKINS ---------------------------------- Name: Charles L. Jenkins Title: Vice President, Manager FIRST UNION NATIONAL BANK By: /s/ ROBERT R. WETTEROFF ---------------------------------- Name: Robert R. Wetteroff Title: Senior Vice President FROST NATIONAL BANK By: /s/ JENNIFER JENNINGS ---------------------------------- Name: Jennifer Jennings Title: Credit Administrative Officer THE FUJI BANK, LIMITED By: /s/ TEIJI TERAMOTO ---------------------------------- Name: Teiji Teramoto Title: Vice President & Manager 8 GUARANTY FEDERAL BANK By: /s/ JIM R. HAMILTON ---------------------------------- Name: Title: HIBERNIA NATIONAL BANK By: /s/ NANCY G. MORAGAS ---------------------------------- Name: Nancy G. Moragas Title: Assistant Vice President THE INDUSTRIAL BANK OF JAPAN, LTD. By: /s/ MICHAEL N. OAKES ---------------------------------- Name: Michael N. Oakes Title: Senior Vice President, HOUSTON OFFICE MEESPIERSON CAPITAL CORP. By: /s/ DEIRDRE SANBORN ---------------------------------- Name: Deirdre Sanborn Title: Vice President By: /s/ DARRELL W. HOLLEY ---------------------------------- Name: Darrell W. Holley Title: Managing Director NATIONAL BANK OF ALASKA By: /s/ PATRICIA JELLEY BENZ ---------------------------------- Name: Patricia Jelley Benz Title: Vice President NATIONAL BANK OF CANADA By: /s/ LARRY L. SEARS ---------------------------------- Name: Larry L. Sears Title: Vice President & Manager By: /s/ DOUG CLARK ---------------------------------- Name: Doug Clark Title: Vice President 9 THE ROYAL BANK OF SCOTLAND By: /s/ SCOTT BARTON ---------------------------------- Name: Scott Barton Title: Vice President SOCIETE GENERALE By: /s/ RICHARD A. GOULD ---------------------------------- Name: Richard A. Gould Title: Director THE SUMITOMO BANK, LTD. By: ---------------------------------- Name: Title: TORONOTO-DOMINION (TEXAS), INC. By: /s/ DEBBIE A. GREENE ---------------------------------- Name: Debbie A. Greene Title: Vice President MOUNTAIN CLO TRUST By: ---------------------------------- Name: Title: Schedule 4.15 listing Excluded Subsidiaries has been omitted. The Registrant will furnish a copy of this omitted schedule to the Securities and Exchange Commission upon request.