EXIBIT 10.57 AGREEMENT TO RELEASE TRITON ENERGY CORPORATION AND SECOND AMENDMENT TO CREDIT AGREEMENT This Agreement to Release Triton Energy Corporation and Second Amendment to Credit Agreement (this "Second Amendment") is entered into as of the 21st day of July, 1997, by and among Triton Energy Limited, a Cayman Islands corporation ("TEL"), Triton Energy Corporation, a Delaware corporation ("TEC"), NationsBank of Texas, N.A., as Administrative Agent ("Administrative Agent"), Barclays Bank PLC, as Documentary Agent, ("Documentary Agent"), MeesPierson, N.V. and The Chase Manhattan Bank as Co-Agents ("Co-Agents"), and NationsBank of Texas, N.A., Barclays Bank PLC, MeesPierson, N.V., The Chase Manhattan Bank and Societe Generale, Southwest Agency as Banks (the "Banks"). W I T N E S S E T H: WHEREAS, TEL, TEC, Administrative Agent, Documentary Agent, Co-Agents and the Banks are parties to that certain Credit Agreement dated as of August 30, 1996 (as amended by a First Amendment to Credit Agreement dated as of April 4, 1997 by and among TEL, TEC, Administrative Agent, Documentary Agent, Co-Agents and the Banks, 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 as amended hereby); and WHEREAS, pursuant to the Credit Agreement the Banks have made a Loan to TEL and TEC, and certain Issuers have issued certain Letters of Credit on behalf of TEL and TEC; and WHEREAS, TEL and TEC have requested that TEC be released from its obligations under the Credit Agreement; and WHEREAS, TEL and TEC have requested that the Credit Agreement be amended in certain respects. 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, TEL, TEC, each Agent and each Bank hereby agree as follows: Section 1. Release. Each Agent and each Bank hereby agree that, upon 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 Second Amendment, each Agent and each Bank shall execute and deliver to TEC a Release (herein so called) in the form of Exhibit "A" attached hereto, pursuant to which TEC shall be released from and shall have no further liability for the payment or performance of any of the Obligations under the Credit Agreement or any of the other Loan Papers. Section 2. 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 Second Amendment, the Credit Agreement shall be amended, simultaneously with the execution and delivery of the Release, and without the requirement of any other act by either Borrower, any Agent or any Bank, in the manner provided in this Section 2. 2.1. Amendment to Definitions. The definitions of "Borrower", "Borrowers" and "Loan Papers", contained in Section 2.1 of the Credit Agreement shall be amended to read in full as follows: "Borrower" means TEL and "Borrowers" means TEL. "Loan Papers" means this Agreement, the First Amendment, the Second Amendment, the Notes and all other certificates, documents or instruments delivered in connection with this Agreement, as the foregoing may be amended from time to time. "Material Subsidiaries" means TEC, TCI, TIOC, TOCT, TOCT (JDA), Triton Pipeline Colombia, Inc., TIOC-Cayman, CTOC, and Triton International Petroleum, Inc. Notwithstanding the foregoing, CTOC shall not be considered a "Material Subsidiary" for purposes of Section 7.5(b) or 7.7. "Restricted Payment" means (a) any Distribution by TEL or any of its Subsidiaries to any Person other than TEL or any wholly owned Subsidiary of TEL, or (b) any retirement, redemption, purchase, repurchase, payment or defeasance by TEL or any of its Subsidiaries of Debt of TEL or any of its Subsidiaries other than the Obligations (including, without limitation, the retirement, redemption, purchase, repurchase, payment or defeasance of the 1997 Notes, the 9 % Notes, the 2002 Notes or the 2005 Notes); provided, that "Restricted Payment" shall not include (i) the payment at scheduled maturity of Debt permitted to be outstanding hereunder by the Persons obligated to repay such Debt to the extent such payment is not prohibited under the subordination provisions, if any, applicable to such Debt, or (ii) the payment or prepayment of Debt owed by TEL or any of its Subsidiaries to any other Subsidiary of TEL or to TEL which is not prohibited pursuant to the terms of the Subordination Agreement applicable to such Debt, if any. 2.2 Additional Definitions. Section 1.1 of the Credit Agreement shall be amended to add (in alphabetical order) the following defined terms: "2002 Notes" means TEL's and TEC's 8 3/4% Senior Notes due April 15, 2002 in an aggregate stated principal amount of $200,000,000. "2005 Notes" means TEL's and TEC's 9 1/4% Senior Notes due April 15, 2005 in an aggregate stated principal amount of $200,000,000. "2002 Notes Indenture" means the Senior Indenture dated as of April 10, 1997 as amended and supplemented by a First Supplemental Indenture dated as of April 10, 1997 by and among TEL, TEC and The Chase Manhattan Bank, as trustee which sets forth certain terms and conditions applicable to the 2002 Notes. "2005 Notes Indenture" means the Senior Indenture dated as of April 10, 1997 as amended and supplemented by a Second Supplemental Indenture dated as of April 10, 1997 by and among TEL, TEC and The Chase Manhattan Bank, as trustee which sets forth certain terms and conditions applicable to the 2005 Notes. 2.3 Amendment to Section 8.1(c). The first sentence of Section 8.1(c) of the Credit Agreement shall be amended to read in full as follows: During the period from and including the Production Milestone Date to the Termination Date (the "Final Leverage Test Period") TEL will not, and will not permit any of its Subsidiaries to, incur, become or remain liable for any Debt or Advance Payment Contract Liabilities which causes the sum of (i) the aggregate total Debt of TEL and its Subsidiaries, and (ii) the aggregate total Advance Payment Contract Liabilities of TEL and its Subsidiaries, in each case on a consolidated basis, to exceed the lesser of (A) $700,000,000, or (B) an amount which would cause the Final Leverage Ratio to exceed 4.0 to 1 as of any date during the Final Leverage Test Period. 2.4 Amendment to Section 8.1(d). Section 8.1(d) of the Credit Agreement shall be amended to read in full as follows: (d) TEL will not permit TEC or any Subsidiary of TEC to incur, become or remain liable for any Debt other than (i) Permitted ECA Debt, (ii) Debt under Hedge Transactions provided that the Net Hedge Transaction Exposure for all Hedge Transactions to which TEC and Subsidiaries of TEC are parties shall not exceed $5,000,000 at any time, (iii) other Debt not to exceed $10,000,000 outstanding at any time in the aggregate, and (iv) Debt owed to TEL or any of its Subsidiaries. 2.5 Amendment to Section 8.6. Section 8.6 of the Credit Agreement shall be amended to read in full as follows: SECTION 8.6. Amendments to Material Documents. TEL will not, nor will TEL permit any of its Subsidiaries to enter into or permit any modification or amendment of, or waive any material right or obligation of any Person under (a) its articles of association, certificate of incorporation, bylaws, partnership agreement, regulations or other organizational documents other than amendments, modifications and waivers which could not reasonably be expected to have a Material Adverse Effect, (b) the 2002 Notes Indenture or the 2005 Notes Indenture if the effect of any such modification, amendment or waiver (i) is to accelerate the maturity of the 2002 Notes or the 2005 Notes or the date on which any payment is due thereunder, (ii) is to increase the interest rate applicable to the 2002 Notes or the 2005 Notes, or (iii) is to add representations, warranties, covenants or events of default or otherwise cause the 2002 Notes Indenture or the 2005 Notes Indenture to be more restrictive or burdensome to TEL or any of its Subsidiaries, (c) the Existing Advance Payment Contract, (d) the License Agreements, or (e) the Joint Operating Agreement (other than in the case of clauses (d) and (e) hereof, modifications, amendments and waivers which have no material adverse effect on the rights, interests or obligations [economic or otherwise] of TEL and its Subsidiaries arising under such agreements). Section 3. Representations and Warranties of Borrower. To induce the Banks and Agents to enter into this Second Amendment, TEL and TEC hereby jointly and severally represent and warrant to each Bank and each Agent as follows: (a) Each representation and warranty of each Borrower 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 release contemplated by Section 1 hereof and the amendments set forth in Section 2 hereof. (b) The execution, delivery and performance by TEL and TEC of this Second Amendment are within such Person's corporate powers, have been duly authorized by necessary corporate action, require no action by or in respect of, or filing with, any Governmental Authority do not violate or constitute a default under any provision of Law or any agreement binding upon TEL or any of its Material Subsidiaries or result in the creation or imposition of any Lien upon any of the assets of TEL or any of its Subsidiaries other than Permitted Encumbrances. (c) This Second Amendment constitutes the valid and binding obligation of TEL and TEC enforceable against each such Person 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. (d) Neither Borrower has any defense to payment, counterclaim or right of set-off with respect to the Obligations existing on the date hereof. TEL further represents and warrants that after giving effect to the execution and delivery of the Release, TEL shall remain fully and unconditionally obligated for the payment and performance in full of all of the Obligations, and the Credit Agreement, the Notes and the other Loan Papers constitute the valid and binding obligation of TEL enforceable in accordance with their 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. (e) The 1997 Notes have been paid in full, the 1997 Notes Indenture has been terminated and neither TEL nor TEC has any obligation or liability thereunder. Not more than $1,000,000 is outstanding under the 9 3/4% Notes. Section 4. Conditions Precedent to Release and Amendments. The agreement of the Agents and the Banks to execute and deliver the Release in accordance with Section 1 hereof and the effectiveness of the amendments to the Credit Agreement contained in Section 2 of this Second Amendment are subject to the satisfaction of each of the conditions set forth in this Section 4. 4.1 Release of TEC. TEL, TEC and the Trustee under the 2002 Notes Indenture and the 2005 Notes Indenture shall have entered into a supplement to each such Indenture contemplated by Section 8.1 of the 2002 Notes Indenture and Section 8.1 of the 2005 Notes Indenture evidencing the release of TEC from the obligations under the 2002 Notes, the 2002 Notes Indenture, the 2005 Notes and the 2005 Notes Indenture. 4.2 Representations and Warranties. Each representation and warranty of Borrowers 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 the execution of the Release pursuant to Section 1 and after giving effect to the amendments set forth in Section 2. 4.3 No Default. Each Borrower represents and warrants that no Default or Event of Default exists on the date hereof and will not exist after the execution of the Release pursuant to Section 1 and after giving effect to the amendments set forth in Section 2. 4.4 Certificate of Officer. TEL and TEC shall have delivered to Administrative Agent a certificate of an authorized officer of TEL and TEC certifying that the conditions in Section 4.1, 4.2 and 4.3 hereof have been satisfied, and shall furnish Administrative Agent with an executed copy of the supplements to the 2002 Notes Indenture and 2005 Notes Indenture referred to in Section 4.1. Section 5. Miscellaneous. 5.1 Reaffirmation of Loan Papers. 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. 5.2 Parties in Interest. All of the terms and provisions of this Second Amendment shall bind and inure to the benefit of the parties hereto and their respective permitted successors and assigns. 5.3 Legal Expenses. TEL hereby agrees to pay on demand all reasonable fees and expenses of counsel to Administrative Agent incurred by Administrative Agent in connection with the preparation, negotiation and execution of this Second Amendment and all related documents. 5.4 Counterparts. This Second Amendment may be executed in counterparts, and all parties need not execute the same counterpart; however, no party shall be bound by this Second Amendment until all parties have executed a counterpart. Facsimiles shall be effective as originals. 5.5 Complete Agreement. THIS SECOND 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 SUBSEQUENT ORAL AGREEMENTS OF THE PARTIES. THERE ARE NO UNWRITTEN ORAL AGREEMENTS BETWEEN THE PARTIES. 5.6 Headings. The headings, captions and arrangements used in this Second Amendment are, unless specified otherwise, for convenience only and shall not be deemed to limit, amplify or modify the terms of this Second Amendment, nor affect the meaning thereof. IN WITNESS WHEREOF, the parties hereto have caused this Second Amendment to be duly executed by their respective authorized officers on the date and year first above written. TRITON ENERGY LIMITED, a Cayman Islands company By: Its: TRITON ENERGY CORPORATION, a Delaware corporation By: Its: BANKS: NATIONSBANK OF TEXAS, N.A. By: Name: Title: BARCLAYS BANK PLC By: Name: Title: THE CHASE MANHATTAN BANK By: Name: Title: MEESPIERSON N.V. By: Name: Title: SOCIETE GENERALE SOUTHWEST AGENCY By: Name: Title: ADMINISTRATIVE AGENT: NATIONSBANK OF TEXAS, N.A. By: Name: Title: DOCUMENTARY AGENT: BARCLAYS BANK PLC By: Name: Title: CO-AGENTS: MEESPIERSON N.V. By: Name: Title: THE CHASE MANHATTAN BANK By: Name: Title: