Exhibit








EXHIBIT 10.4


AMENDMENT NO. 3 TO CREDIT AGREEMENT


This Amendment No. 3 to Credit Agreement ("Agreement") entered into on December 5, 2018 but made effective as of February 9, 2018 ("Effective Date"), is among Alta Mesa Holdings, LP, a Texas limited partnership ("Borrower"), the Lenders (as defined below), Wells Fargo Bank, National Association, as administrative agent for the Lenders (as defined below) (in such capacity, the "Administrative Agent"), and as issuing lender (in such capacity, the "Issuing Lender").


RECITALS


A.     The Borrower is party to that certain Eighth Amended and Restated Credit Agreement dated as of February 9, 2018, among the Borrower, the lenders party thereto from time to time (the "Lenders"), the Administrative Agent and the Issuing Lender, as amended prior to entering into of this Agreement (as so amended, the "Credit Agreement").


B.     The Borrower had made certain investments prior to the closing of the Credit Agreement and has requested that the Lenders amend the Credit Agreement as provided herein. 


THEREFORE, the Borrower, the Lenders hereto, the Issuing Lender and the Administrative Agent hereby agree as follows:


Section 1.    Defined Terms; Interpretation. As used in this Agreement, each of the terms defined in the opening paragraph and the Recitals above shall have the meanings assigned to such terms therein. Each term defined in the Credit Agreement and used herein without definition shall have the meaning assigned to such term in the Credit Agreement, as amended by this Agreement, unless expressly provided to the contrary. The words "hereby", "herein", "hereinafter", "hereof", "hereto" and "hereunder" when used in this Agreement shall refer to this Agreement as a whole and not to any particular Article, Section, subsection or provision of this Agreement. Article, Section, subsection and Exhibit references herein are to such Articles, Sections, subsections and Exhibits of this Agreement unless otherwise specified. All titles or headings to Articles, Sections, subsections or other divisions of this Agreement or the exhibits hereto, if any, are only for the convenience of the parties and shall not be construed to have any effect or meaning with respect to the other content of such Articles, Sections, subsections, other divisions or exhibits, such other content being controlling as the agreement among the parties hereto. Whenever the context requires, reference herein made to the single number shall be understood to include the plural; and likewise, the plural shall be understood to include the singular. Words denoting sex shall be construed to include the masculine, feminine and neuter, when such construction is appropriate; and specific enumeration shall not exclude the general but shall be construed as cumulative. Definitions of terms defined in the singular or plural shall be equally applicable to the plural or singular, as the case may be, unless otherwise indicated.


Section 2.    Amendment to Credit Agreement. Section 6.06 of the Credit Agreement (Investments) is hereby amended by (i) deleting the word "and" at the end of clause (f), (ii) re-lettering clause (g) as clause (h), and (iii) adding a new clause (g) therein as follows: 


(g) term loans to High Mesa Services, LLC pursuant to (i) that certain Promissory Note from Northwest Gas Processing, LLC payable to the Borrower dated December 31, 2014, in the original principal amount of $8,500,000, and (ii) that certain Promissory Note from Northwest Gas Processing, LLC payable to the Borrower, dated September 29, 2017, in the original principal amount of $1,515,000, which notes were assigned to and assumed by High Mesa Services, LLC, pursuant to Assignment and Assumption Agreement dated December 31, 2104, and Assignment and Assumption Agreement dated November 8, 2107, respectively, (as same may be amended, modified and renewed from time to time, collectively, the "High Mesa Investments"); provided that, the aggregate principal amount of the High Mesa Investments shall not exceed in the aggregate $10,015,000 plus the amount of any increase in principal as a result of interest paid-in-kind; and













Section 3.    Representations and Warranties. Each Loan Party represents and warrants that: (a) after giving effect to this Agreement, the representations and warranties contained in the Credit Agreement and the representations and warranties contained in the other Loan Documents are true and correct in all material respects (except that such materiality qualifier shall not be applicable to any representations and warranties that already are qualified or modified by materiality in the text thereof) on and as of the date this Agreement is entered into except to the extent that any such representation or warranty expressly relates solely to an earlier date, in which case it shall have been true and correct in all material respects (except that such materiality qualifier shall not be applicable to any representations and warranties that already are qualified or modified by materiality in the text thereof) as of such earlier date; (b) after giving effect to this Agreement, no Default has occurred and is continuing; (c) the execution, delivery and performance of this Agreement are within the corporate or limited liability company power and authority of such Loan Party, as applicable, and have been duly authorized by appropriate corporate r limited liability company action and proceedings, as applicable; (d) this Agreement constitutes the legal, valid, and binding obligation of such Loan Party enforceable in accordance with its terms, except as limited by applicable bankruptcy, insolvency, reorganization, moratorium, or similar laws affecting the rights of creditors generally and general principles of equity; and (e) there are no governmental or other third party consents, licenses and approvals required in connection with the execution, delivery, performance, validity and enforceability of this Agreement.


Section 4.    Conditions to Effectiveness. This Agreement and the amendments provided herein shall become effective and enforceable against the parties hereto upon the occurrence of the following conditions precedent: 


(a)    Administrative Agent shall have received multiple original counterparts, as requested by Administrative Agent, of this Agreement, duly and validly executed and delivered by duly authorized officers of the Borrower, the Guarantors and the Majority Lenders, and


(b)    Borrower shall have paid all fees and expenses of the Administrative Agent's outside legal counsel and other consultants pursuant to all invoices presented for payment on or prior to the date this Agreement is entered into.


Section 5.    Effect on Loan Documents; Acknowledgments; Agreements.


(a)    The Borrower and each Guarantor acknowledges that on the date this Agreement is entered into all outstanding Obligations are payable in accordance with their terms and the Borrower and each Guarantor hereby waives any defense, offset, counterclaim or recoupment with respect thereto. 


(b)    The Administrative Agent, the Issuing Lender, and the Lenders hereby expressly reserve all of their rights, remedies, and claims under the Loan Documents. After giving effect to this Agreement, nothing in this Agreement shall constitute a waiver or relinquishment of (i) any Default or Event of Default under any of the Loan Documents, (ii) any of the agreements, terms or conditions contained in any of the Loan Documents, (iii) any rights or remedies of the Administrative Agent, the Issuing Lender, or any Lender with respect to the Loan Documents, or (iv) the rights of the Administrative Agent, the Issuing Lender, or any Lender to collect the full amounts owing to them under the Loan Documents.


(c)    Each of the Borrower, the Administrative Agent, the Issuing Lender, and the Lenders does hereby adopt, ratify, and confirm the Credit Agreement, as amended hereby, and acknowledges and agrees that the Credit Agreement, as amended hereby, and all other Loan Documents are and remain in full force and effect, and the Borrower acknowledges and agrees that its liabilities under the Credit Agreement, as amended hereby, and the other Loan Documents are not impaired in any respect by this Agreement.


(d)    From and after the date this Agreement is entered, all references to the Credit Agreement and the Loan Documents shall mean such Credit Agreement and such Loan Documents as amended prior hereto as described in the recitals, and by this Agreement. 











(e)    This Agreement is a Loan Document for the purposes of the provisions of the other Loan Documents. Without limiting the foregoing, any breach of representations, warranties, and covenants under this Agreement shall be a Default or Event of Default, as applicable, under the Credit Agreement.


Section 6.    Reaffirmation of the Guaranty. Each Guarantor hereby ratifies, confirms,acknowledges and agrees that its obligations under its respective Guaranty are in full force and effect and that such Guarantor continues to unconditionally and irrevocably guarantee the full and punctual payment, when due, whether at stated maturity or earlier by acceleration or otherwise, of all of the Guaranteed Obligations (as defined in such Guaranty), as such Guaranteed Obligations may have been amended by this Agreement, and its execution and delivery of this Agreement does not indicate or establish an approval or consent requirement by such Guarantor under its respective Guaranty in connection with the execution and delivery of amendments, consents or waivers to the Credit Agreement, the Notes or any of the other Loan Documents.


Section 7.    Reaffirmation of Security Documents. Each Loan Party (a) represents and warrants that it has no defenses to the enforceability of any Security Instrument, (b) reaffirms the terms of and its obligations (and the security interests granted by it) under each Security Instrument, and agrees that each such Security Instrument will continue in full force and effect to secure the Obligations as the same may be amended, supplemented, or otherwise modified from time to time, and (c) acknowledges, represents, warrants and agrees that the Liens and security interests granted by it pursuant to the Security Instruments are valid and subsisting and create a security interest to secure the Obligations.


Section 8.    Counterparts. This Agreement may be signed in any number of counterparts, each of which shall be an original and all of which, taken together, constitute a single instrument. This Agreement may be executed by facsimile or email (i.e., PDF) signature and all such signatures shall be effective as originals.


Section 9.    Successors and Assigns. This Agreement shall be binding upon and inure to the benefit of the Borrower, Holdings, the Lenders, the Issuing Lender, and the Administrative Agent and their respective successors and assigns permitted pursuant to the Credit Agreement.


Section 10.    Invalidity. In the event that any one or more of the provisions contained in this Agreement shall for any reason be held invalid, illegal or unenforceable in any respect, such invalidity, illegality or unenforceability shall not affect any other provision of this Agreement.


Section 11.    Governing Law. This Agreement and any claim, controversy, dispute or cause of action (whether in contract or tort or otherwise) based upon, arising out of or relating to this Agreement and the transactions contemplated hereby shall be governed by, and construed in accordance with, the law of the State of New York (including Section 5-1401 and Section 5-1402 of the General Obligations Law of the State of New York), without reference to any other conflicts or choice of law principles thereof.


Section 12.    WAIVER OF JURY TRIAL. EACH LOAN PARTY, THE LENDERS, THE ISSUING LENDER AND THE ADMINISTRATIVE AGENT EACH HEREBY ACKNOWLEDGES THAT IT HAS BEEN REPRESENTED BY AND IT HAS CONSULTED WITH COUNSEL OF ITS CHOICE, AND EACH HEREBY KNOWINGLY, VOLUNTARILY, INTENTIONALLY, AND IRREVOCABLY WAIVES ANY AND ALL RIGHT TO TRIAL BY JURY IN RESPECT OF ANY LEGAL PROCEEDING ARISING OUT OF OR RELATING TO THIS AGREEMENT OR ANY OF THE TRANSACTIONS CONTEMPLATED HEREBY.


Section 13.    Entire Agreement. THIS AGREEMENT, THE CREDIT AGREEMENT, AS AMENDED BY THIS AGREEMENT, THE NOTES, AND THE OTHER LOAN DOCUMENTS CONSTITUTE THE ENTIRE UNDERSTANDING AMONG THE PARTIES HERETO WITH RESPECT TO THE SUBJECT MATTER HEREOF AND SUPERSEDE ANY PRIOR AGREEMENTS, WRITTEN OR ORAL, WITH RESPECT THERETO.


[The remainder of this page has been left blank intentionally.]














EXECUTED effective as of the Effective Date.


	
	
	BORROWER:

	 

	ALTA MESA HOLDINGS, LP

	By: Alta Mesa Holdings GP, LLC,

	       its general partner



	
	
	By: /s/ Michael A. McCabe
 

	Michael A. McCabe



	Chief Financial Officer



	
	
	GUARANTORS:

	 

	ALTA MESA HOLDINGS GP, LLC

	 

	By: /s/ Michael A. McCabe
 

	Michael A. McCabe

	Chief Financial Officer

	 

	ALTA MESA FINANCE SERVICES CORP.

	 

	By: /s/ Michael A. McCabe
 

	Michael A. McCabe

	Chief Financial Officer

	 

	OEM GP, LLC

	 

	By :/s/ Michael A. McCabe
 

	Michael A. McCabe

	Chief Financial Officer

	 

	ALTA MESA SERVICES, LP

	OKLAHOMA ENERGY ACQUISITIONS, LP

	Each By:  OEM GP, LLC, its general partner

	 

	By: /s/ Michael A. McCabe
 

	Michael A. McCabe

	Chief Financial Officer








Signature Page to
Amendment No. 3 to Credit Agreement
(Alta Mesa Holdings, LP)









	
	
	ADMINISTRATIVE AGENT/ ISSUING LENDER/ EXISTING LENDER:

	 

	WELLS FARGO BANK, NATIONAL ASSOCIATION,

	as Administrative Agent, Issuing Lender, and Lender

	 

	By: /s/ Shiloh Davila 

	Shiloh Davila

	Director








Signature Page to
Amendment No. 3 to Credit Agreement
(Alta Mesa Holdings, LP)







	
	
	EXISTING LENDERS:

	 

	TORONTO DOMINION (NEW YORK) LLC

	 

	By: /s/ Annie Dorval

	Name: Annie Dorval

	Title: Authorized Signatory








Signature Page to
Amendment No. 3 to Credit Agreement
(Alta Mesa Holdings, LP)







    	
	
	ING CAPITAL LLC

	 

	By: /s/ Josh Strong

	Name: Josh Strong

	Title: Director

	 

	By: /s/ Charles Hall

	Name: Charles Hall

	Title: Managing Director




    


Signature Page to
Amendment No. 3 to Credit Agreement
(Alta Mesa Holdings, LP)







	
	
	CITIBANK, N.A.



	 

	By: /s/ William McNeely

	Name: William McNeely

	Title: Senior Vice President






    


Signature Page to
Amendment No. 3 to Credit Agreement
(Alta Mesa Holdings, LP)







    
	
	
	CAPITAL ONE, NATIONAL ASSOCIATION



	 

	By: /s/ Matthew Brice

	Name: Matthew Brice

	Title: Vice President




                    
        


Signature Page to
Amendment No. 3 to Credit Agreement
(Alta Mesa Holdings, LP)







	
	
	BOKF, NA dba Bank of Texas

	 

	By: /s/ Brandon Starr

	Name: Brandon Starr



	Title: Vice President








            


Signature Page to
Amendment No. 3 to Credit Agreement
(Alta Mesa Holdings, LP)







	
	
	NATIXIS, NEW  YORK BRANCH

	 

	By: /s/ Vikram Nath

	Name: Vikram Nath

	Title: Director

	 

	By: /s/ Brian O'Keefe

	Name: Brian O'Keefe

	Title: Vice President








            


Signature Page to
Amendment No. 3 to Credit Agreement
(Alta Mesa Holdings, LP)







	
	
	MORGAN STANLEY BANK, N.A.





	 

	By: /s/ John Kuhns

	Name: John Kuhns



	Title: Authorized Signatory










Signature Page to
Amendment No. 3 to Credit Agreement
(Alta Mesa Holdings, LP)







	
	
	MORGAN STANLEY SENIOR FUNDING, INC.

	 

	By: /s/ John Kuhns

	Name: John Kuhns



	Title: Vice President












Signature Page to
Amendment No. 3 to Credit Agreement
(Alta Mesa Holdings, LP)







	
	
	




	BARCLAYS BANK PLC

	 

	By: /s/ Jake Lam

	Name: Jake Lam



	Title: Assistant Vice President








Signature Page to
Amendment No. 3 to Credit Agreement
(Alta Mesa Holdings, LP)