1 EXHIBIT 10.5 October 31, 1996 To each of the Parties Listed on attached Schedule I Re: Apache Corporation Global Credit Facility Indemnity Agreement Ladies and Gentlemen: Reference is hereby made to (i) that certain Intercreditor Agreement of even date herewith, in the form attached hereto as Exhibit "A" unless the parties hereto otherwise agree (the "Intercreditor Agreement"), among the various commercial lending institutions (the "U.S. Lenders") as are or may become parties to that certain Fourth Amended and Restated Credit Agreement of even date herewith among the U.S. Borrower (as herein defined), the U.S. Lenders, the Global Administrative Agent (as herein defined), the U.S. Co-Agent (as herein defined) and the Arrangers therein named (the "Arrangers") (as it may be amended, supplemented, restated or otherwise modified and in effect from time to time, the "U.S. Credit Agreement"), the various commercial lending institutions (the "Australian Lenders") as are or may become parties to that certain Credit Agreement of even date herewith among the Australian Borrower (as herein defined), the Australian Lenders, the Global Administrative Agent, the Australian Administrative Agent (as herein defined) and the Arrangers (as it may be amended, supplemented, restated or otherwise modified and in effect from time to time, the "Australian Credit Agreement"), the various commercial lending institutions (the "Canadian Lenders", and together with the U.S. Lenders and the Australian Lenders, the "Lenders") as are or may become parties to that certain Credit Agreement of even date herewith among the Canadian Borrower (as herein defined), the Canadian Lenders, the Global Administrative Agent, the Canadian Administrative Agent (as herein defined) and the Arrangers (as it may be amended, supplemented, restated or otherwise modified and in effect from time to time, the "Canadian Credit Agreement"), The First National Bank of Chicago, as Global Administrative Agent (the "Global Administrative Agent"), The Chase Manhattan Bank, as Co-Agent under the U.S. Credit Agreement (the "U.S. Co-Agent"), Chase Securities Australia Limited (ACN 002 888 011), as the Administrative Agent for the Australian Lenders (the "Australian Administrative Agent"), Bank of Montreal, as the Administrative Agent for the Canadian Lenders (the "Canadian Administrative Agent" and together with the Global Administrative Agent and the Australian Administrative Agent, the "Administrative Agents"), First Chicago Capital Markets, Inc., as Arranger, and Chase Securities Inc., as Arranger; (ii) that certain Fourth Amended and Restated Credit Agreement of even date herewith among Apache Corporation (the "U.S. Borrower"), the U.S. Lenders, the Global Administrative Agent, the U.S. Co-Agent and the Arrangers; (iii) that certain Credit Agreement of even date herewith among Apache Energy Limited (ACN 009 301 2 To each of the Parties Listed on attached Schedule I October 31, 1996 Page 2 964) and Apache Oil Australia Pty. Limited (ACN 050 611 688) (collectively, the "Australian Borrower"), the Australian Lenders, the Global Administrative Agent, the Australian Administrative Agent and the Arrangers; (iv) that certain Credit Agreement of even date herewith among Apache Canada Ltd. (the "Canadian Borrower", and together with the U.S. Borrower and the Australian Borrower, the "Borrowers"), the Canadian Lenders, the Global Administrative Agent, the Canadian Administrative Agent and the Arrangers, as each may be amended, supplemented, restated or otherwise modified and in effect from time to time. Capitalized terms not otherwise defined herein shall have the meanings assigned to such terms in the Intercreditor Agreement. The Australian Borrower consents to the terms and provisions of this letter agreement (this "Indemnity Agreement") and the Intercreditor Agreement, including, without limitation, the terms and provisions regarding the disclosure of information, the sharing of payments, and the purchase and sale of participations in the Credit Agreements, consents to all actions required of any Administrative Agent or Lender pursuant to the terms and conditions of the Intercreditor Agreement, and agrees to take all actions necessary to give effect to the terms and provisions of this Indemnity Agreement and the Intercreditor Agreement. The Australian Borrower agrees that any amounts which are paid (or received by way of setoff, combination of accounts or similar arrangements) to cure any Debt Limit Excession shall be made by the U.S. Borrower to the U.S. Lenders, by the Australian Borrower to the Australian Lenders and by the Canadian Borrower to the Canadian Lenders in accordance with their respective Sharing Percentages as determined by the Administrative Agents in accordance with the terms of the Intercreditor Agreement. It is the intention of the parties hereto that, except as otherwise set forth in this Indemnity Agreement, under no circumstances will any Borrower be required to pay any principal amount under the Global Loan Documents in excess of outstanding Obligations with respect to its Credit Agreement and any guaranty executed by the Borrower plus any interest, fees and other amounts as set forth in this Indemnity Letter and any other Global Loan Document. If after any amount is paid under Section 3.3(c) of the Intercreditor Agreement a Borrower or any trustee, liquidator, receiver or receiver-manager or Person with analogous powers (collectively the "Reimbursed Borrower") recovers any amount from any Lenders ("Disgorging Lenders") in respect of any amount theretofore used to reduce outstanding Obligations under any Credit Agreement or to purchase or repurchase participation interests from the other Lenders, then the amount so recovered (including any interest paid by the Lenders) shall be treated for all purposes: (i) as between the relevant Reimbursed Borrower and the Disgorging Lenders, and (ii) as between the Disgorging Lenders and the other Lenders (the 3 To each of the Parties Listed on attached Schedule I October 31, 1996 Page 3 "Non-Disgorging Lenders"), to be outstanding as U.S. Credit Outstandings, Canadian Credit Outstandings or Australian Credit Outstandings, as applicable, in which case the Reallocable Payment Proportions shall thereupon be adjusted and, notwithstanding the fact that no reallocable payment is received, Section 3.3(c) of the Intercreditor Agreement again applied in order that the Reallocable Payment Proportions equal the applicable Target Sharing Percentages. To the extent the application of the provisions of this Indemnity Agreement or the Intercreditor Agreement give rise to any liability for any tax payments (other than income tax and franchise tax payments) in connection with any payments made by the U.S. Borrower, the Australian Borrower, the Canadian Borrower, any Administrative Agent, the Co-Agent, any Arranger, or any Lender or any other party to any Credit Agreement, then (notwithstanding any provisions to the contrary set forth in the Credit Agreements), the Australian Borrower agrees that the Borrowers, including the Australian Borrower, jointly and severally, shall indemnify each Lender, Administrative Agent, Co-Agent and Arranger (the "Loan Parties") and shall hold each Loan Party free and harmless from and against any such liability; provided, however, that each Loan Party (if so requested by a Borrower under a Credit Agreement through the appropriate Administrative Agent) will use good faith efforts to accommodate any reasonable request by such Borrower in order to avoid the need for, or reduce the amount of, such compensation so long as the request will not, in the sole opinion of the applicable Loan Party, be disadvantageous to such Loan Party. The Australian Borrower agree to reimburse each Loan Party for any reasonable costs and out-of-pocket expenses (including fees and expenses of consultants and attorneys' fees (on a solicitor and his own client basis with respect to the Canadian Loan Documents) for such Loan Party) paid or incurred by such Loan Party in connection with the preparation, review, execution, delivery, amendment, modification and administration of the Global Loan Documents, including, without limitation, this Indemnity Agreement and the Intercreditor Agreement. The Australian Borrower agrees to reimburse each Loan Party for any reasonable costs and out-of-pocket expenses (including attorneys' fees (on a solicitor and his own client basis with respect to the Canadian Loan Documents) for the Loan Parties) paid or incurred by any Loan Party in connection with the collection and enforcement of the Global Loan Documents, including this Indemnity Agreement and the Intercreditor Agreement. The Australian Borrower hereby indemnifies, exonerates and holds each Loan Party, and their respective directors, agents, officers and employees ("Indemnified Persons") free and harmless from and against any and all losses, claims, damages, penalties, judgments, liabilities, actions, suits, costs and expenses (including, without limitation, all expenses of litigation or 4 To each of the Parties Listed on attached Schedule I October 31, 1996 Page 4 preparation therefor whether or not any Loan Party or any Indemnified Person is a party thereto and all other attorneys' fees (on a solicitor and his own client basis with respect to the Canadian Loan Documents) and disbursements) ("Claims") which any of them may pay or incur as a result of, arising out of, or relating to, this Indemnity Agreement, the Intercreditor Agreement, the other Global Loan Documents or the transactions contemplated hereby or thereby (the "Indemnified Liabilities"), except to the extent that a final order of a court of competent jurisdiction finds that such Indemnified Liability arises solely from such Indemnified Person's gross negligence or wilful misconduct. If and to the extent that the foregoing undertaking may be unenforceable for any reason, the Australian Borrower hereby agrees to make the maximum contribution to the payment and satisfaction of each of the Indemnified Liabilities which is permissible under applicable law. The Australian Borrower shall be obligated to indemnify the Indemnified Persons for all Claims regardless of whether the Australian Borrower had knowledge of the facts and circumstances giving rise to such Claims. Nothing contained in this agreement shall be construed in a manner which would deem any party to this Indemnity Agreement, the Intercreditor Agreement or any other Global Loan Document (under state law or for tax purposes) to be acting in partnership with any other party. The obligations of the Australian Borrower under this Indemnity Agreement and the Intercreditor Agreement shall survive the termination of this Indemnity Agreement, the Intercreditor Agreement or any other Global Loan Document or any non-assumption of this Indemnity Agreement, the Intercreditor Agreement or any other Global Loan Document in a bankruptcy or similar proceeding. This Indemnity Agreement may be executed in any number of counterparts and by different parties on separate counterparts, and all such counterparts shall together constitute but one and the same agreement. 5 To each of the Parties Listed on attached Schedule I October 31, 1996 Page 5 THIS INDEMNITY AGREEMENT SHALL BE CONSTRUED IN ACCORDANCE WITH THE INTERNAL LAWS (AND NOT THE LAW OF CONFLICTS) OF THE STATE OF ILLINOIS, BUT GIVING EFFECT TO FEDERAL LAWS APPLICABLE TO NATIONAL BANKS. This Indemnity Agreement constitutes the entire understanding of the parties hereto with the Australian Borrower with respect to the Intercreditor Agreement and this Indemnity Agreement and supersedes any prior agreements, written or oral, with respect thereto. Very truly yours, APACHE ENERGY LIMITED (ACN 009 301 964), as an Australian Borrower By: /s/ APACHE ENERGY LIMITED ---------------------------------- Name: Matthew W. Dundrea Title: Treasurer APACHE OIL AUSTRALIA PTY. LIMITED (ACN 050 611 688), as an Australian Borrower By: /s/ APACHE OIL AUSTRALIA PTY. LIMITED -------------------------------------- Name: Matthew W. Dundrea Title: Treasurer 6 To each of the Parties Listed on attached Schedule I October 31, 1996 Page 6 AGREED AND CONSENTED TO BY: THE FIRST NATIONAL BANK OF CHICAGO, as Global Administrative Agent and on behalf of the U.S. Lenders under the U.S. Credit Agreement By: /s/ THE FIRST NATIONAL BANK OF CHICAGO --------------------------------------- Name: W. Walter Green Title: Attorney-in-fact for The First National Bank of Chicago 7 To each of the Parties Listed on attached Schedule I October 31, 1996 Page 7 AGREED AND CONSENTED TO BY: THE CHASE MANHATTAN BANK, as U.S. Co-Agent By: /s/ THE CHASE MANHATTAN BANK ---------------------------------------- Name: Title: 8 To each of the Parties Listed on attached Schedule I October 31, 1996 Page 8 AGREED AND CONSENTED TO BY: CHASE SECURITIES AUSTRALIA LIMITED (ACN 002 888 011), as Australian Administrative Agent and on behalf of the Australian Lenders under the Australian Credit Agreement SIGNED on behalf of ) CHASE SECURITIES ) AUSTRALIA LIMITED ) by its attorney in the ) presence of: ) /s/ CHASE SECURITIES AUSTRALIA LIMITED ------------------------------------- Attorney Lori Vetters - ------------------------------ ------------------------------------- Witness Print Name Christopher Click - ------------------------------ Print Name 9 To each of the Parties Listed on attached Schedule I October 31, 1996 Page 9 AGREED AND CONSENTED TO BY: BANK OF MONTREAL, as Canadian Administrative Agent and on behalf of the Canadian Lenders under the Canadian Credit Agreement By: /s/ BANK OF MONTREAL ---------------------------------------- Name: Title: 10 To each of the Parties Listed on attached Schedule I October 31, 1996 Page 10 AGREED AND CONSENTED TO BY: FIRST CHICAGO CAPITAL MARKETS, INC., as Arranger By: /s/ FIRST CHICAGO CAPITAL MARKETS, INC. ---------------------------------------- Name: Title: 11 To each of the Parties Listed on attached Schedule I October 31, 1996 Page 11 AGREED AND CONSENTED TO BY: CHASE SECURITIES INC., as Arranger By: /s/ CHASE SECURITIES INC. ---------------------------------------- Name: Tod Benton Title: Managing Director 12 SCHEDULE I The First National Bank of Chicago, as Global Administrative Agent The Chase Manhattan Bank, as U.S. Co-Agent Chase Securities Australia Limited, as Australian Administrative Agent Bank of Montreal, as Canadian Administrative Agent First Chicago Capital Markets, Inc., as Arranger Chase Securities Inc., as Arranger The U.S. Lenders party to the Fourth Amended and Restated Credit Agreement The Australian Lenders party to the Australian Credit Agreement The Canadian Lenders party to the Canadian Credit Agreement c/o The First National Bank of Chicago One First National Plaza Chicago, Illinois 60670