FIRST AMENDMENT TO GUARANTY This Amendment, dated as of October 8, 1992, is entered into by FRONTIER OIL CORPORATION, a Delaware corporation (the "Guarantor"), the banks (the "Banks") parties to the Credit Agreement (as hereinafter defined) and UNION BANK, a California banking corporation, as agent (the "Agent") for the Banks. Recitals A. The Banks and the Agent have entered into a Revolving Credit and Letter of Credit Agreement dated as of August 10, 1992 (said Agreement, as it may hereafter be amended or otherwise modified from time to time, herein called the "Credit Agreement") with Frontier Oil and Refining Company, a Delaware corporation (the "Borrower"). 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 by reference herein. B. The Guarantor, as the legal and beneficial owner of all of the outstanding capital stock of the Borrower, has executed a Guaranty dated as of August 18, 1992 (said Guaranty, as it may hereafter be amended or otherwise modified from time to time, herein called the "Guaranty") in favor of the Banks and the Agent, guaranteeing all of the obligations of the Borrower under the Credit Agreement and the other Credit Documents. C. The Banks, the Agent and Guarantor wish to amend the Guaranty to require written consent of all of the Banks in order for waivers of certain covenants of the Guarantor set forth in the Guaranty to be effective. Section 1. Amendment to Guaranty. Effective as of the date hereof and subject to satisfaction of the conditions precedent set forth in Section 2, the first sentence of Section 7 of the Guaranty is amended in full to read as follows: "Section 7. Covenants. The Guarantor covenants and agrees that, so long as any part of the Guaranteed Obligations remains unpaid, any Bank has any Commitment or any Letter of Credit remains outstanding, the Guarantor will, unless the Majority Banks (or, with respect to Sections 7.2(a) and (b) only, all of the Banks) otherwise consent in writing, comply with all of the covenants set forth below." Section 2. Conditions to Effectiveness. This Amendment shall be become effective as of the date first written above when all of the parties hereto have executed this Amendment and the Borrower, Wainoco, FHI, FRI, FPLI and FPI have consented to this Amendment. Section 3. Representations and Warranties of Guarantor. The Guarantor represents and warrants as follows: (a) The Guarantor 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 Guarantor of this Amendment and the Credit Documents, as amended hereby, to which it is or is to be a party are within the Guarantor's corporate powers, have been duly authorized by all necessary corporate action and do not (i) contravene the Guarantor's charter documents or bylaws, (ii) contravene any Governmental Rule or contractual restriction binding on or affective the Guarantor 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 Guarantor. (c) No Governmental Action is required for the due execution, delivery and performance by the Guarantor of this Amendment or any of the Credit Documents, as amended hereby, to which the Guarantor is or is to be a party. (d) This Amendment and each of the other Credit Documents, as amended hereby, to which the Guarantor is a party constitute legal, valid and binding obligations of the Guarantor enforceable against the Guarantor in accordance with their respective terms. (e) The Stock Pledge Agreement constitutes a valid and perfected a first-priority Lien on the Collateral covered thereby, enforceable against all third parties in all jurisdictions, and secures the payment of all obligations of the Guarantor under the Guaranty, as amended hereby; and the execution, delivery and performance of this Amendment do not adversely affect the Lien of the Stock Pledge Agreement. (f) The consolidated balance sheet of the Guarantor and its Subsidiaries as of August 31, 1992 and the related consolidated statements of income and cash flows from operations of the Guarantor and its Subsidiaries for the month then ended, certified by the chief financial officer or chief accounting officer of the Guarantor as being true and correct and copies of which have been furnished to the Banks, fairly present the consolidated financial condition of the Guarantor and its Subsidiaries as of such date and the consolidated results of the operations of the Guarantor and its Subsidiaries for the month ended on such date, all in accordance with generally accepted accounting principles applied on a consistent basis. Since August 31, 1992 there has been no material adverse change in the business, condition (financial or otherwise), operations, performance, properties or prospects of the Guarantor or any of its Subsidiaries. The Guarantor and its Subsidiaries have no material contingent liabilities except as disclosed in such consolidated balance sheet or the notes thereto. (g) There is no pending or, to the knowledge of the Guarantor, threatened action or proceeding affecting the Guarantor or any its Subsidiaries before any Governmental Person or arbitrator that may materially and adversely affect the financial condition or operations of the Guarantor or any of its Subsidiaries or that purports to affect the legality, validity or enforceability of this Amendment or any of the other Credit Documents, as amended hereby, to which the Guarantor is a party. Section 4. Reference to and Effect on Credit Documents. (a) On and after the effective date of this Amendment, each reference in the Guaranty to "this Guaranty," "hereunder," "hereof" or any other expression of like import referring to the Guaranty, and each reference in the other Credit Documents to "the Guaranty," "thereunder," "thereof" or any other expression of like import referring to the Guaranty, shall mean and be a reference to the Guaranty as amended by this Amendment. (b) Except as specifically amended above, the Guaranty 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 Stock Pledge Agreement and all of the Collateral described therein do and shall continue to secure the payment of all obligations of the Guarantor under the Guaranty, 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 Guarantor 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. In addition, the Guarantor shall pay any and all stamp and other taxes payable or determined to be payable in connection with the execution and delivery of this Amendment and the other instruments and documents to be delivered hereunder, and the Guarantor agrees to save the Agent and each Bank harmless from and against any and all liabilities with respect to or resulting from any delay in paying or omission to pay such taxes. 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 CORPORATION By: /s/ Jon D. Galvin - ------------------------------ Jon D. Galvin Vice President and Chief Financial Officer UNION BANK, as Agent and as a Bank By: /s/ Richard P. DeGrey, Jr. - ------------------------------ Richard P. DeGrey, Jr. Vice President By: /s/ John M. Edmonston - ------------------------------ Name: John M. Edmonston Title: Vice President Each of the undersigned hereby consents to the foregoing Amendment as of the date first written above: FRONTIER OIL AND REFINING COMPANY By: /s/ Jon D. Galvin - ------------------------------ Jon D. Galvin Vice President and Chief Financial Officer WAINOCO OIL CORPORATION By: /s/ Julie H. Edwards - ------------------------------ Julie H. Edwards Vice President, Secretary and Treasurer FRONTIER HOLDINGS INC. By: /s/ Jon D. Galvin - ------------------------------ Jon D. Galvin Vice President and Chief Financial Officer FRONTIER REFINING INC. By: /s/ Jon D. Galvin - ------------------------------ Jon D. Galvin Vice President and Chief Financial Officer FRONTIER PIPELINE INC. By: /s/ Jon D. Galvin - ------------------------------ Jon D. Galvin Vice President FRONTIER PRODUCTS INC. By: /s/ Jon D. Galvin - ------------------------------ Jon D. Galvin Vice President