SIXTH AMENDMENT TO REVOLVING CREDIT AND LETTER OF CREDIT AGREEMENT This Sixth Amendment to Revolving Credit and Letter of Credit Agreement (this "Amendment"), dated as of July 1, 1996, is entered into by (1) FRONTIER OIL AND REFINING COMPANY, a Delaware corporation (the "Borrower"), (2) the bank parties to the Credit Agreement referred to below (the "Banks") and (3) UNION BANK OF CALIFORNIA, N.A.., a national banking association (successor in interest to Union Bank, a California banking corporation), as agent (the "Agent") for the Banks. Recitals A. The Borrower, the Banks and the Agent have entered into a Revolving Credit and Letter of Credit Agreement dated as of August 10, 1992, as amended by a letter of waiver and amendment dated March 17, 1993, a Second Amendment to Revolving Credit and Letter of Credit Agreement dated as of April 30, 1993, a Third Amendment to Revolving Credit and Letter of Credit Agreement dated as of December 31, 1993, a Fourth Amendment to Revolving Credit and Letter of Credit Agreement dated as of July 6, 1994 and a Fifth Amendment to Revolving Credit and Letter of Credit Agreement dated as of July 1, 1995 (said Agreement, as so amended, herein called the "Credit Agreement"). Terms defined in the Credit Agreement and not otherwise defined herein have the same respective meanings when used herein, and the rules of interpretation set forth in Sections 1.2 and 1.3 of the Credit Agreement are incorporated herein by reference. B. The Borrower, the Banks and the Agent wish to amend the credit Agreement to extend the Commitment Termination Date and change certain pricing terms thereunder. Accordingly, the Borrower, the Banks and the Agent hereby agree as set forth below. Section 1. Amendments to Credit Agreement. Effective as of the date first set forth above and subject to satisfaction of the conditions precedent set forth in Section 2, the Credit Agreement is hereby amended as follows: (a) The definition of "Commitment Termination Date" in Section 1.1 of the Credit Agreement is amended in full to read as follows: " 'Commitment Termination Date' means April 2, 1998; provided, however, that, upon (a) written request by the Borrower not later than May 15, 1997 and (b) notice of such extension by the Agent to the Borrower not later than July 15, 1997, the Commitment Termination Date may be extended by the Agent and the Banks, in their sole and absolute discretion, for up to an additional year; and further provided, however, that the Agent's failure to notify the Borrower of any such extension by the applicable date referred to above shall constitute a denial of such extension." (b) Section 2.2 (a) of the Credit Agreement is amended by deleting the words and figures "four-tenths percent (0.4%)" and substituting the words and figures "three hundred seventy-five thousandths percent (.375%)." (c) Section 2.6(a) of the Credit Agreement is amended by deleting the words and figures "seven-eighths percent (0.875%)" in clause (i) thereof and "two percent (2.00%)" in clause (ii) thereof and substituting the words and figures "(one-half percent (0.5%)" and "one and three-quarters percent (1.75%)," respectively. Section 2. Conditions to Effectiveness . This Amendment shall become effective as of the date first set forth above when the Agent has received a renewal fee of $100,000 for the account of the Banks and all of the following documents, each dated on or before the date hereof, in form and substance satisfactory to the Agent and in the number of originals requested by the Agent: (a) this Amendment, duly executed by the Borrower and the Banks; (b) an amendment to the FOC Guaranty for the purpose of amending Schedule 2 thereto, duly executed by FOC and the Banks, together with the other documents required to be delivered to the Agent as conditions precedent to the effectiveness of such amendment; (c) an amendment and restatement of the Agent's Fee Letter; (d) a consent to this Amendment, duly executed by Wainoco and the Guarantors; (e) copies of the resolutions of the Board of Directors of the Borrower approving this Agreement and any documents delivered by the Borrower pursuant hereto, certified by the Secretary or an Assistant Secretary of the Borrower to be correct and complete and in full force and effect as of the date of execution, and as of the effective date, of this Amendment; (f) a certificate of the Secretary of Assistant Secretary of the Borrower as to the incumbency, and setting forth a specimen signature, of each of the persons who has signed this Amendment or any document delivered by the Borrower pursuant hereto; (g) a certificate of the Borrower, signed on behalf of the Borrower by its President or Vice President and its Secretary or any Assistant Secretary, certifying as to (A) the absence of any amendments to the charter documents or bylaws of the Borrower on or after August 18, 1992, (B) the truthfulness in all material respects of the representations and warranties contained in the Credit Documents as though made on and as of the effective date of this Amendment and (C) the absence of any event occurring and continuing, or resulting from the effectiveness of this Amendment, that constitutes a Default or an Event of Default; and (h) such other approvals, opinions and documents as the Agent may reasonably request. Section 3. Representations and Warranties of Borrower. The Borrower represents and warrants as follows: (a) The Borrower is a corporation duly organized, validly existing and in good standing under the laws of the State of Delaware. (b) The execution, delivery and performance by the Borrower of this Amendment and the Credit Documents, as amended hereby, to which it is or is to be a party are within the Borrower's corporate powers, have been duly authorized by all necessary corporate action and do not (i) contravene the Borrower's charter documents or bylaws, (ii) contravene any Governmental Rule or contractual restriction binding on or affecting the Borrower or (iii) result in or require the creation or imposition of any Lien or preferential arrangement of any nature (other than any created by the Credit Documents) upon or with respect to any of the properties now owned or hereafter acquired by the Borrower. (c) No Governmental Action is required for the due execution, delivery or performance by the Borrower of this Amendment or any of the Credit Documents, as amended hereby, to which the Borrower is or is to be a party. (d) This Amendment and each of the Credit Documents, as amended hereby, to which the Borrower is a party constitute legal, valid and binding obligations of the Borrower enforceable against the Borrower in accordance with their respective terms. (e) The Security Agreement, the Account Pledge Agreement and the Note Pledge Agreement constitute valid and perfected first-priority Liens on the Collateral covered thereby, enforceable against all third parties in all jurisdictions, and secure the payment of all obligations of the Borrower under the Credit Documents, as amended hereby; and the execution, delivery and performance of this Amendment do not adversely affect the Lien of the Security Agreement, the Account Pledge Agreement or the Note Pledge Agreement. (f) The consolidated balance sheet of FOC and its Subsidiaries as of December 31, 1995 and the related consolidated statements of income, retained earnings and cash flows of FOC and its Subsidiaries for the fiscal year then ended, certified by Arthur Andersen & Co., independent public accountants, and the report as of May 31, 1996 referred to in Section 7.1(j)(i) of the FOC Guaranty, certified by the chief financial officer or chief accounting officer of FOC, fairly present the consolidated financial condition of FOC and its Subsidiaries as of such dates and the consolidated results of the operations of FOC and its Subsidiaries for the fiscal periods ended on such dates, all in accordance with generally accepted accounting principles applied on a consistent basis. Since May 31, 1996 there has been no material adverse change in the business, condition (financial or otherwise), operations, performance, properties or prospects of material contingent liabilities except as disclosed in such financial statements or the notes thereto. (g) There is no pending or, to the knowledge of the Borrower, threatened action or proceeding affecting FOC or any its Subsidiaries before any Governmental Person or arbitrator that may materially and adversely affect the financial condition or operations of FOC or any of its Subsidiaries or that purports to affect the legality, validity or enforceability of this Amendment or any of the Credit Documents, as amended hereby. Section 4. Reference to and Effect on Credit Documents. (a) On and after the effective date of this Amendment, each reference in the Credit Agreement to "this Agreement," "hereunder," "hereof," "herein" or any other expression of like import referring to the Credit Agreement, and each reference in the other Credit Documents to "the Credit Agreement," "thereunder," "therein" or any other expression of like import referring to the Credit Agreement, shall mean and be a reference to the Credit Agreement as amended by this Agreement. (b) Except as specifically amended or referred to above, the Credit Agreement and the other Credit Documents shall remain in full force and effect and are hereby ratified and confirmed. Without limiting the generality of the foregoing, the Security Agreement, the Account Pledge Agreement and the Note Pledge Agreement, and all of the Collateral described therein, do and shall continue to secure the payment of all obligations of the Borrower under the Credit Documents, as amended hereby. (c) The execution, delivery and effectiveness of this Amendment shall not, except as expressly provided herein, operate as a waiver of any right, power or remedy of any Bank or the Agent under any of the Credit Documents or constitute a waiver of any provision of any of the Credit Documents. Section 5. Costs, Expenses and Taxes. The Borrower agrees to pay on demand all costs and expenses of the Agent in connection with the preparation, execution and delivery of this Amendment and the other instruments and documents to be delivered hereunder, including the reasonable fees and out-of-pocket expenses of counsel for the Agent with respect thereto and with respect to advising the Agent as to its rights and responsibilities hereunder and thereunder. Section 6. Execution in Counterparts. This Amendment may be executed in any number of counterparts and by the parties hereto in separate counterparts, each of which when so executed and delivered shall be deemed to be an original and all of which taken together shall constitute one and the same instrument. Section 7. Governing Law. THIS AMENDMENT SHALL BE GOVERNED BY, AND CONSTRUED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF CALIFORNIA APPLICABLE TO CONTRACTS MADE AND PERFORMED IN THE STATE OF CALIFORNIA. FRONTIER OIL AND REFINING COMPANY By: /s/ Jon D. Galvin Jon D. Galvin Vice President and Chief Financial Officer UNION BANK OF CALIFORNIA, N.A., As Agent and as a Bank By: /s/ Richard P. DeGrey, Jr. Richard P. DeGrey, Jr. Vice President BANQUE PARIBAS By: /s/ Mark M. Green Name: Mark M. Green Title: Vice President By: /s/ Marian Livingston Name: Marian Livingston Title: Vice President DEN NORSK BANK AS By: /s/ Byron L. Cooley Name: Byron L. Cooley Title: First Vice President By: /s/ William V. Moyer Name: William V. Moyer Title: Vice President