EXHIBIT 10.11.7 SEVENTH AMENDMENT TO FIFTH RESTATED CREDIT AGREEMENT This Seventh Amendment to Fifth Restated Credit Agreement (this "Seventh Amendment") is entered into as of the 13th day of October, 1997, by and among Snyder Oil Corporation ("Borrower"), NationsBank of Texas, N.A., as Agent ("Agent"), and NationsBank of Texas, N.A. ("NationsBank"), Bank One, Texas, N.A. ("Bank One"), Wells Fargo Bank, N.A. ("Wells Fargo"), Texas Commerce Bank National Association ("TCB," and together with NationsBank, Bank One and Wells Fargo, collectively referred to herein as the "Original Banks") and Credit Lyonnais New York Branch, as Banks (the "Banks"). W I T N E S E T H: WHEREAS, the Banks, Borrower and Agent are parties to that certain Fifth Restated Credit Agreement dated as of June 30, 1994, as amended by that certain (i) letter agreement by and among Borrower and the Original Banks dated as of May 1, 1995, (ii) Second Amendment to Fifth Restated Credit Agreement by and among Borrower, Agent and the Original Banks dated as of June 30, 1995, (iii) Third Amendment to Fifth Restated Credit Agreement by and among Borrower, Agent and the Original Banks dated as of November 1, 1995, (iv) Fourth Amendment to Fifth Restated Credit Agreement by and among Borrower, Agent and Original Banks dated as of April 4, 1996, (v) Fifth Amendment to Fifth Restated Credit Agreement by and among Borrower, Agent and the Original Banks dated as of November 1, 1996, and (vi) Sixth Amendment to Fifth Restated Credit Agreement by and among Borrower, Agent and Banks dated as of May 19, 1997 (as amended, the "Credit Agreement") (unless otherwise defined herein, all terms used herein with their initial letter capitalized shall have the meaning given such terms in the Credit Agreement); and WHEREAS, pursuant to the Credit Agreement, the Banks have made certain Loans to Borrower, and Agent has issued certain Letters of Credit on behalf of Borrower; and WHEREAS, Borrower has advised the Banks that Borrower intends, pursuant to a series of transactions, to sell all of the 14,000,000 shares of common stock of Patina Oil & Gas Corporation, a Delaware corporation, held by Borrower (the "Patina Stock Sale"); and WHEREAS, Borrower has requested that (i) the Credit Agreement be amended in certain respects in connection with the Patina Stock Sale, and (ii) the November 1, 1997 Determination Date be postponed until December 1, 1997; and WHEREAS, subject to the terms and conditions herein contained, the Banks have agreed to Borrower's request. NOW THEREFORE, for and in consideration of the mutual covenants and agreements herein contained and other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged and confessed, Borrower, Agent and each Bank hereby agree as follows: 1 SECTION 1. Amendments. Subject to the satisfaction of each condition precedent set forth in Section 4 hereof and in reliance on the representations, warranties, covenants and agreements contained in this Seventh Amendment, the Credit Agreement shall be amended effective upon the consummation of the sale of at least 10,000,000 shares of common stock of Patina Oil & Gas Corporation held by Borrower as provided in Section 2 hereof (the "Effective Date") in the manner provided in this Section 1. 1.1. Amendment to Definition. The definition of "Loan Papers" contained in Section 1.1 of the Credit Agreement shall be amended to read in full as follows: "Loan Papers" means this Agreement, the Letter Agreement, the Second Amendment, the Third Amendment, the Fourth Amendment, the Fifth Amendment, the Sixth Amendment, the Seventh Amendment, the Notes, the Mortgages, the Restricted Subsidiary Guarantees and all other certificates, documents or instruments delivered in connection with this Agreement, as the foregoing may be amended from time to time. 1.2. Additional Definitions. Section 1.1 of the Credit Agreement shall be amended to add the following definition to such Section: "Seventh Amendment" means that certain Seventh Amendment to Fifth Restated Credit Agreement dated as of October 13, 1997, by and among Borrower, Agent and the Banks. 1.3. Restricted Payments Covenant. Section 9.2 of the Credit Agreement shall be amended to read in full as follows: "SECTION 9.2. Restricted Payments. Neither Borrower nor any Restricted Subsidiary will declare or make any Restricted Payment; provided, that, so long as no Default or Event of Default, Borrowing Base Deficiency or non-compliance with Section 10.4 exists (without giving effect to the cure periods provided by Section 4.4 or 10.4), and provided further that no Default or Event of Default, Borrowing Base Deficiency or non-compliance with Section 10.4 would result from such Restricted Payment (without giving effect to the cure periods provided by Section 4.4 or 10.4), Borrower and Restricted Subsidiaries may (a) make Restricted Payments in an aggregate amount (measured, cumulatively from January 1, 1996) not to exceed the sum of the following (i) $75,000,000, plus (ii) the net cash proceeds to Borrower from all equity offerings completed by Borrower of Borrower's equity securities after January 1, 1996, plus (iii) all cash Distributions actually received by Borrower or any Restricted Subsidiary from Unrestricted Subsidiaries after January 1, 1996, plus (iv) the net cash proceeds to Borrower from the sale or other disposition of Borrower's Investment in any Unrestricted Subsidiary after January 1, 1996, plus (v) fifty percent (50%) of Borrower's Consolidated Cash Flow 2 earned on or after January 1, 1996 to the date of determination, (b) declare and make a Qualified Redemption of the Second Issue, (c) issue the Second Convertible Debentures in exchange for the Second Preferred Stock, and (d) redeem the Third Convertible Debentures with the proceeds of the issuance of the Fourth Debentures. SECTION 2. Amendments Effective Upon Consummation of Sale of Stock. Subject to the satisfaction of each condition precedent set forth in Section 4 hereof, upon the consummation of the sale of at least 10,000,000 shares of common stock of Patina Oil & Gas Corporation held by Borrower, and provided that such sale or series of sales is consummated on or before November 1, 1997, the Credit Agreement shall be automatically amended without the necessity of any further act by Borrower, Agent or any Bank to (a) delete the following definitions (the "Patina Defined Terms") from Section 1.1 of the Credit Agreement: "Patina," "Patina Ancillary Agreements" and "Patina Transaction Documents," and (b) delete each reference in the Credit Agreement and the other Loan Papers to each Patina Defined Term, such that, from and after the consummation of the sale of at least 10,000,000 shares of common stock of Patina Oil & Gas Corporation held by Borrower, each provision of the Credit Agreement shall be read and interpreted without giving effect to the Patina Defined Terms. SECTION 3. Determination of Borrowing Base. Agent and Banks hereby waive the Periodic Determination of the Total Borrowing Base scheduled to occur on November 1, 1997, and Borrower, Agent and Banks agree that, subject to Required Banks' rights under Section 4.3 of the Credit Agreement to make a Special Determination of the Total Borrowing Base at any time prior to December 1, 1997, the Total Borrowing Base shall be redetermined in accordance with Article IV of the Credit Agreement on or about December 1, 1997. Borrower, Agent and Banks further agree that (a) such Determination on or about December 1, 1997 shall not be deemed a Special Determination, and accordingly, shall not reduce the number of Special Determinations Required Banks are permitted under Section 4.3 of the Credit Agreement, and (b) after December 1, 1997, the dates for Periodic Determinations shall continue to be each May 1 and November 1, commencing May 1, 1998. SECTION 4. Conditions Precedent to Effectiveness of Amendments. The amendments to the Credit Agreement contained in Section 1 and Section 2 of this Seventh Amendment shall be effective only upon, and are conditioned upon, the delivery to Agent and each Bank of such resolutions, certificates and other documents as Agent or any Bank shall request relative to the Patina Stock Sale and the authorization, execution and delivery by Borrower of this Seventh Amendment (and, in the case of the amendments set forth in Section 2, the further condition that the sale of at least 10,000,000 shares of common stock of Patina Oil & Gas Corporation held by Borrower shall have been consummated on or before November 1, 1997). If the foregoing conditions have not been satisfied by the Effective Date, this Seventh Amendment and all obligations of the Banks and Agent contained herein shall, at the option of Majority Banks, terminate. SECTION 5. Representations and Warranties of Borrower. To induce the Banks and Agent to enter into this Seventh Amendment, Borrower hereby represents and warrants to Agent as follows: 3 5.1 Each representation and warranty of Borrower and each Restricted Subsidiary contained in the Credit Agreement and the other Loan Papers is true and correct on the date hereof and will be true and correct after giving effect to the amendments set forth in Section 1 and Section 2 hereof. 5.2 The execution, delivery and performance by Borrower of this Seventh Amendment are within the Borrower's corporate powers, have been duly authorized by necessary action, require no action by or in respect of, or filing with, any governmental body, agency or official and do not violate or constitute a default under any provision of applicable law or any Material Agreement binding upon Borrower or the Subsidiaries of Borrower or result in the creation or imposition of any Lien upon any of the assets of Borrower or the Subsidiaries of Borrower except Permitted Encumbrances. 5.3 This Seventh Amendment constitutes the valid and binding obligation of Borrower enforceable in accordance with its terms, except as (i) the enforceability thereof may be limited by bankruptcy, insolvency or similar laws affecting creditor's rights generally, and (ii) the availability of equitable remedies may be limited by equitable principles of general application. SECTION 6. Miscellaneous. 6.1 No Defenses. Borrower hereby represents and warrants to the Banks that there are no defenses to payment, counterclaims or rights of set-off with respect to the Loans existing on the date hereof. 6.2 Reaffirmation of Loan Papers; Extension of Liens. Any and all of the terms and provisions of the Credit Agreement and the Loan Papers shall, except as amended and modified hereby, remain in full force and effect. Borrower hereby extends the Liens securing the Obligations until the Obligations have been paid in full, and agrees that the amendments and modifications herein contained shall in no manner affect or impair the Obligations or the Liens securing payment and performance thereof. 6.3 Parties in Interest. All of the terms and provisions of this Seventh Amendment shall bind and inure to the benefit of the parties hereto and their respective successors and assigns. 6.4 Legal Expenses. Borrower hereby agrees to pay on demand all reasonable fees and expenses of counsel to Agent incurred by Agent, in connection with the preparation, negotiation and execution of this Seventh Amendment and all related documents. 6.5 Counterparts. This Seventh Amendment may be executed in counterparts, and all parties need not execute the same counterpart; however, no party shall be bound by this Seventh Amendment until all parties have executed a counterpart. Facsimiles shall be effective as originals. 4 6.6 Complete Agreement. THIS SEVENTH AMENDMENT, THE CREDIT AGREEMENT AND THE OTHER LOAN PAPERS REPRESENT THE FINAL AGREEMENT BETWEEN THE PARTIES AND MAY NOT BE CONTRADICTED BY EVIDENCE OF PRIOR, CONTEMPORANEOUS OR ORAL AGREEMENTS OF THE PARTIES. THERE ARE NO UNWRITTEN ORAL AGREEMENTS BETWEEN THE PARTIES. 6.7 Headings. The headings, captions and arrangements used in this Seventh Amendment are, unless specified otherwise, for convenience only and shall not be deemed to limit, amplify or modify the terms of this Seventh Amendment, nor affect the meaning thereof. IN WITNESS WHEREOF, the parties hereto have caused this Seventh Amendment to be duly executed by their respective authorized officers on the date and year first above written. BORROWER: SNYDER OIL CORPORATION, a Delaware corporation By:/s/Peter E. Lorenzen Name:Peter E. Lorenzen Title:Vice President AGENT: NATIONSBANK OF TEXAS, N.A. By: /s/ J. Scott Fowler J. Scott Fowler, Vice President BANKS: NATIONSBANK OF TEXAS, N.A. By:/s/ J. Scott Fowler J. Scott Fowler, Vice President 5 TEXAS COMMERCE BANK NATIONAL ASSOCIATION By:/s/ Lee E. Beckelman Name: Lee E. Beckelman Title: BANK ONE, TEXAS, N.A. By: /s/ Bradley D. Bartek Name:Bradley D. Bartek Title:Senior Vice President WELLS FARGO BANK, N.A. By:/s/Charles P. Kirkham Name:Charles P. Kirkham Title:Vice President CREDIT LYONNAIS NEW YORK BRANCH By:/s/Pascal Poupelle Name:Pascal Poupelle Title:Executive Vice President 6