EX-10.49



 Exhibit 10.49 
 THIRD AMENDMENT TO 
 AMENDED AND RESTATED CREDIT AGREEMENT

 THIS THIRD AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT (this “Amendment”),
dated as of November 23, 2011, is made by and among KMG CHEMICALS, INC., a Texas corporation, KMG-BERNUTH, INC., a Delaware corporation, and KMG ELECTRONIC CHEMICALS, INC., a Texas corporation (collectively, and as further
defined in the Credit Agreement, the “Borrowers”), and WELLS FARGO BANK, NATIONAL ASSOCIATION, a national banking association, successor by merger to Wachovia Bank, N.A., as Agent and Collateral Agent as defined in the Credit
Agreement (hereinafter defined), those lenders executing this Amendment as Lenders, and such other lenders (collectively, and as further defined in the Credit Agreement, the “Lenders”) as may become a party to the Credit Agreement.

 R E C I T A L S: 

A. Borrowers, Agent, Collateral Agent and Lenders have entered into that certain Amended and Restated Credit Agreement
dated as of December 31, 2007 (as heretofore amended, collectively, the “Credit Agreement”). 
 B. The Term Loan and the Term Notes have been paid in full. Borrowers have requested that Agent, Collateral Agent and Lenders (i) terminate the Term Loan Commitment, (ii) increase the amount of
the Revolving Loan (as defined in the Credit Agreement) from $50,000,000.00 to $60,000,000.00, (iii) make Revolving Loan advances without reference to the Borrowing Base, and (iv) modify certain terms of the Credit Agreement, and Lenders
have agreed to the same upon the terms and conditions set forth in this Amendment. 
 C. The Prudential
Insurance Company of America and PRUCO Life Insurance Company have proposed to sell their interests in the Revolving Loan to Wells Fargo Bank, National Association, as a Lender, which has agreed to purchase such interests. 

NOW, THEREFORE, in consideration of the premises herein contained and other good and valuable consideration, the receipt
and sufficiency of which are hereby acknowledged, the parties hereto agree as follows: 
 ARTICLE I 

DEFINITIONS 
 Section 1.01 Definitions Above. As used herein, the terms “Amendment,” “Borrowers,” “Credit Agreement” and “Lenders” shall have
the meanings as set forth above. 
 Section 1.02 Definitions in Agreement. Capitalized terms used in this
Amendment, to the extent not otherwise defined herein, shall have the same meanings as set forth in the Credit Agreement; without limiting the foregoing, the following terms are defined in the Credit Agreement: “Agent,”
“Borrowing Base,” “Collateral Agent,” “Collateral Report,” “Credit Agreement Obligations,” “Eligible Assignee,” “Intercreditor Agreement,”
“KMG-Bernuth,” “KMG ECI,” “Loan Documents,” “Prudential Term Note,” “Revolving Loan,” “Term Loan Commitment,” “Term Loans,” and
“Term Notes”. 







 Section 1.03 Additional Definitions. As used herein, the following
terms shall have the meanings set forth below: 
 “Assigning Lenders” means The
Prudential Insurance Company of America and PRUCO Life Insurance Company. 
 “Acquiring
Lender” means Wells Fargo Bank, National Association, as a Lender. 
 ARTICLE II 

AMENDMENTS TO AGREEMENT 
 Section 2.01 Defined Terms. Section 1.2 of the Credit Agreement is hereby amended as follows: 

(a) The term “Consolidated Current Assets” is inserted to read in full as follows:

 “Consolidated Current Assets” means, at any time, the consolidated current
assets of the Borrower Consolidated Group, as determined in accordance with Generally Accepted Accounting Principles. 
 (b) The term “Consolidated Current Liabilities” is inserted to read in full as follows: 

“Consolidated Current Liabilities” means, at any time, the consolidated current
liabilities of the Borrower Consolidated Group, as determined in accordance with Generally Accepted Accounting Principles. 
 (c) The term “Revolving Loan Commitment” is amended to read in full as follows: 
 “Revolving Loan Commitment” means Sixty Million and 00/100 Dollars ($60,000,000.00). 

(d) The term “Revolving Loan Maturity Date” is amended to read in full as follows:

 “Revolving Loan Maturity Date” means December 31, 2016. 

(e) The term “Revolving Notes” is amended to read in full as follows: 

“Revolving Notes” means (a) the following promissory notes, each executed by the
Borrowers: (i) Revolving Note dated November 23, 2011 in the face amount of $45,000,000.00 payable to the order of Wells Fargo Bank, National Association, and (ii) Revolving Note dated March 18, 2010 in the face amount of
$15,000,000.00 payable to the order of Bank of America, N.A.; and (b) any amendment to or modification of any such promissory note and any promissory note given in extension or renewal of, or in substitution for, such promissory note.


  
 2 








 Section 2.02 Borrowing Base; Collateral Report. The Borrowing Base
will no longer be used in determining the amount of the Revolving Loan. Therefore: 
 (a)
Section 7.2(J) is hereby restated to read in full as follows: 
 (J) There shall
have been delivered to Agent the Compliance Certificates as required under this Agreement and reflecting compliance with the terms of this Agreement. 

(b) Section 10.1(C)(5) is hereby deleted. 

(c) Exhibit B to the Credit Agreement is hereby deleted. 

Section 2.03 Term Loan Commitment. The Term Loan Commitment is hereby terminated. No further Term Loan Advances
shall be made. 
 Section 2.04 Lenders’ Credit Percentages. Exhibit D to the Credit Agreement
is hereby amended by substituting Exhibit D attached hereto for Exhibit D attached to the Credit Agreement. 
 Section 2.05 Financial Covenants. Section 10.3 of the Credit Agreement is hereby amended by restating Subsection 10.3 (A)(2) to read in full as follows: 

(2) A ratio of Consolidated Current Assets to Consolidated Current Liabilities of not less that 1.5 to
1.0. For purposes of this covenant, Consolidated Current Liabilities shall exclude any payment required to be made on the final maturity date of the Prudential Term Note. 

Section 2.06 Maintaining Bank Accounts. Section 10.14(A) of the Credit Agreement is hereby amended to
read in full as follows: 
 (A) Borrowers shall maintain all of their principal bank accounts
(collectively, the “Bank Accounts”), including any Deposit Accounts and disbursement accounts, with Wells Fargo Bank, National Association (the “Approved Bank Accounts”). 

  
 3 








 ARTICLE III 
 CONDITIONS PRECEDENT 
 The effectiveness of this Agreement
is conditioned upon the satisfaction of the following further conditions which must be satisfied as of the date of this Amendment: 
 Section 3.01 Representations and Warranties True and Correct. The representations and warranties contained herein and in all other Loan Documents, as amended hereby and by the other documents given
in connection with this Amendment, shall be true and correct as of the date hereof except as previously disclosed to Lender. 
 Section 3.02 No Default. No Default or Event of Default shall exist. 
 Section 3.03 Borrower Documents. Borrowers shall have executed and delivered to Agent, for the benefit of the Lenders, the following documents, in form and substance satisfactory to Agent in its
sole discretion; each of such documents shall be a Loan Document: 
 (a) this Agreement;

 (b) Revolving Note payable to Wells Fargo Bank, National Association in the face amount of
$45,000,000.00; 
 (c) First Amendment to Deed of Trust, Assignment of Rents, Security Agreement
and Financing Statement relating to real property owned by KMG ECI in Hollister, California; 

(d) Second Amendment to Deed of Trust and Security Agreement relating to real property owned by KMG ECI
in Pueblo County, Colorado; 
 (e) Second Amendment to Mortgage and Security Agreement relating
to real property owned by, KMG-Bernuth in Doniphan County, Kansas; 
 (f) CLTA Form 110.6
Endorsement to the Loan Policy of Title Insurance relating to real property owned by KMG ECI in Hollister, California; 
 (g) ALTA Form 11 Endorsement to the Loan Policy of Title Insurance relating to real property owned by KMG ECI in Pueblo County, Colorado; 

(h) ALTA Form 11 Endorsement to the Loan Policy of Title Insurance relating to real property owned by,
KMG-Bernuth in Doniphan County, Kansas; and 
 (i) Closing Certificates for each Borrower.

 Section 3.04 Opinion of Counsel. Borrower’s outside legal counsel shall have delivered to Agent a
legal opinion in form and substance satisfactory to Agent in its sole discretion. 

  
 4 








 Section 3.05 Execution of Revolving Loan Sale Documents. Assigning
Lenders and Acquiring Lender shall have executed and delivered to each other Assignment and Acceptance Agreements, the original Revolving Notes for the Assigning Lenders endorsed to Acquiring Lender and marked by Acquiring Lender as “Renewed
and Extended”, and such other documents as Assigning Lenders and Acquiring Lender shall agree are useful or necessary for the sale of Assigning Lenders’ portion of the Revolving Loan to Acquiring Lender, all in form and substance as
mutually agreed upon by Assigning Lenders and Acquiring Lender. 
 Section 3.06 Amendment to Intercreditor
Agreement. The parties to the Intercreditor Agreement shall have executed and delivered to Agent and Collateral Agent an amendment to the Intercreditor Agreement, in form and substance satisfactory to Agent in its sole discretion; such document
shall be a Loan Document. 
 Section 3.07 Amendment to Note Purchase Agreement. Borrowers and the
Purchasers (as defined in the Note Purchase Agreement dated December 31, 2007 as more particularly described in the Intercreditor Agreement) shall have executed and delivered among themselves an amendment to the Note Purchase Agreement,
granting such waivers and consents as may be required to permit the Transaction. 
 ARTICLE IV 

RATIFICATIONS, REPRESENTATIONS AND WARRANTIES 

Section 4.01 Renewal and Extension of Revolving Notes. To the extent of $35,000,000.00, the Revolving Note of even
date herewith in favor of Wells Fargo Bank, National Association is given in renewal and extension, and not in extinguishment or novation, of the following Revolving Notes, each executed by Borrowers: (i) dated March 18, 2010, payable to
the order of Wachovia Bank, N.A., in the face amount of $30,000,000.00, (ii) dated December 31, 2007, payable to the order of The Prudential Insurance Company of America, in the face amount of $2,500,000.00, and (iii) dated
December 31, 2007, payable to the order of PRUCO Life Insurance Company, in the face amount of $2,500,000.00; the Liens securing said Revolving Notes are hereby renewed and extended to secure the Credit Agreement Obligations, and said Liens are
hereby ratified and confirmed in every respect by Borrowers and shall continue in full force and effect. 

Section 4.02 Ratifications. The terms and provisions set forth in this Amendment shall modify and supersede all
inconsistent terms and provisions set forth in the Credit Agreement and except as expressly modified and superseded by this Amendment, the terms and provisions of the Credit Agreement are ratified and confirmed and shall continue in full force and
effect. Borrowers and Lenders agree that the Credit Agreement as amended hereby shall continue to be legal, valid, binding and enforceable in accordance with its terms. The terms, provisions, and conditions of any and all of the Loan Documents are
hereby ratified and confirmed in every respect by Borrowers and shall continue in full force and effect. 

  
 5 








 Section 4.03 Representations and Warranties. Borrowers hereby
represent and warrant to Lenders that: 
 (a) the execution, delivery and performance of this
Amendment and any and all other Loan Documents executed and/or delivered in connection herewith have been authorized by all requisite corporate action on the part of Borrowers and will not violate the articles of incorporation or bylaws of
Borrowers; 
 (b) after giving effect to the modifications contained in this Amendment, and any
other Loan Document, the representations and warranties contained in the Credit Agreement are true and correct in all material respects on and as of the date hereof except as previously disclosed to Lenders; 

(c) after giving effect to the modifications contained in this Amendment, no Default or Event of Default
has occurred and is continuing and no event or condition has occurred that with the giving of notice or lapse of time or both would be a Default or an Event of Default; 

(d) after giving effect to the modifications contained in this Amendment, Borrowers are in full
compliance with all covenants and agreements contained in the Credit Agreement as amended hereby; and 
 (e) Borrowers are not presently aware of any claim they have against Lenders, nor are they aware of any claim any of their respective Subsidiaries have against Lenders, for damages arising out of any
prior action or inaction on the part of Lenders or their representatives or agents. 
 ARTICLE V 

ASSIGNMENT OF PRUDENTIAL AND PRUCO 
 PORTIONS OF REVOLVING LOAN 
 Section 5.01 Assignment of
Portions of Revolving Loan. Contemporaneously with the execution and delivery of this Agreement, the Assigning Lenders are assigning their portion of the Revolving Loan to the Acquiring Lender, which is an Eligible Assignee, and endorsing their
Revolving Notes to the Acquiring Lender. 
 ARTICLE VI 
 MISCELLANEOUS 
 Section 6.01 Survival of Representations
and Warranties. All representations and warranties made in this Amendment or any other Loan Document including any Loan Document furnished in connection with this Amendment shall survive the execution and delivery of this Amendment and the other
Loan Documents executed in connection with this Amendment. 

  
 6 








 Section 6.02 Reference to Agreement. Each of the Loan Documents,
including the Credit Agreement and any and all other agreements, documents, or instruments now or hereafter executed and delivered pursuant to the terms hereof or pursuant to the terms of the Credit Agreement as amended hereby, are hereby amended so
that any reference in such Loan Documents to the Credit Agreement shall mean a reference to the Credit Agreement as amended hereby. 
 Section 6.03 Expenses of Lender. As provided in the Credit Agreement, Borrowers agree to pay on demand all reasonable costs and expenses incurred by Lenders in connection with the preparation,
negotiation, and execution of this Amendment and the other Loan Documents executed pursuant hereto and any and all amendments, modifications, and supplements thereto, including without limitation the reasonable costs and fees of Lenders’ legal
counsel, and all reasonable costs and expenses incurred by Lenders in connection with the enforcement or preservation of any rights under the Credit Agreement as amended hereby, or any other Loan Document, including without limitation the reasonable
costs and fees of Agent’s legal counsel. 
 Section 6.04 Severability. Any provision of this
Amendment held by a court of competent jurisdiction to be invalid or unenforceable shall not impair or invalidate the remainder of this Amendment and the effect thereof shall be confined to the provision so held to be invalid or unenforceable.

 Section 6.05 APPLICABLE LAW. THIS AMENDMENT IS ENTERED INTO AND PERFORMABLE IN HARRIS COUNTY, TEXAS,
AND THE SUBSTANTIVE LAWS, WITHOUT GIVING EFFECT TO PRINCIPLES OF CONFLICT OF LAWS, OF THE UNITED STATES AND THE STATE OF TEXAS SHALL GOVERN THE CONSTRUCTION OF THIS AGREEMENT AND THE DOCUMENTS EXECUTED AND DELIVERED PURSUANT HERETO, AND THE RIGHTS
AND REMEDIES OF THE PARTIES HERETO AND THERETO. 
 Section 6.06 Successors and Assigns. This Amendment is
binding upon and shall inure to the benefit of Lenders and Borrowers and their respective successors and assigns, except Borrowers may not assign or transfer any of their rights or obligations hereunder without the prior written consent of
Lenders. 
 Section 6.07 Counterparts. This Amendment may be executed in one or more counterparts,
each of which when so executed shall be deemed to be an original, but all of which when taken together shall constitute one and the same instrument. 
 Section 6.08 Effect of Waiver. No consent or waiver, express or implied, by Lenders to or for any breach of or deviation from any covenant, condition or duty by Borrowers shall be deemed a consent
or waiver to or of any other breach of the same or any other covenant, condition or duty. 
 Section 6.09
Headings. The headings, captions, and arrangements used in this Amendment are for convenience only and shall not affect the interpretation of this Amendment. 

  
 7 








 Section 6.10 SECTION 26.02 NOTICE. THE CREDIT AGREEMENT, AS AMENDED
BY THIS AMENDMENT, AND ALL OTHER INSTRUMENTS, DOCUMENTS AND AGREEMENTS EXECUTED AND DELIVERED IN CONNECTION WITH THE CREDIT AGREEMENT AND THIS AMENDMENT EMBODY THE FINAL, ENTIRE AGREEMENT AMONG THE PARTIES HERETO AND SUPERSEDE ANY AND ALL PRIOR
COMMITMENTS, AGREEMENTS, REPRESENTATIONS AND UNDERSTANDINGS, WHETHER WRITTEN OR ORAL, RELATING TO THE CREDIT AGREEMENT AND THIS AMENDMENT, AND MAY NOT BE CONTRADICTED OR VARIED BY EVIDENCE OF PRIOR, CONTEMPORANEOUS OR SUBSEQUENT ORAL AGREEMENTS
OR DISCUSSIONS OF THE PARTIES HERETO. 
 THERE ARE NO UNWRITTEN ORAL AGREEMENTS AMONG THE PARTIES HERETO. 

EXECUTED as of the date first written above. 
 [Remainder of page is blank. Signatures appear on following pages.] 

  
 8 








 SIGNATURE PAGES – BORROWERS 

 

			
	KMG CHEMICALS, INC.
		
	By:	 	/s/ J. Neal Butler
		 	J. Neal Butler
		 	President and Chief Executive Officer


  

			
	KMG-BERNUTH, INC.
		
	By:	 	/s/ J. Neal Butler
		 	J. Neal Butler
		 	President and Chief Executive Officer


  

			
	KMG ELECTRONIC CHEMICALS, INC.
		
	By:	 	/s/ J. Neal Butler
		 	J. Neal Butler
		 	President and Chief Executive Officer



  
 9 








 SIGNATURE PAGE – WELLS FARGO 

 

			
	 WELLS FARGO BANK,
 NATIONAL ASSOCIATION
 as Agent, Collateral Agent,

Lender and Issuing Lender

		
	By:	 	/s/ John L. Kallina
		 	 John L. Kallina
 Senior Vice
President



 Instructions for Wire Transfers to Agent: 

Wells Fargo Bank, National Association 
 Charlotte, NC 
 ABA Number: 053 000 219 

Account Number: 01459670001944 
 Account Name: Agency Svcs Synd Clearing 
 Payment Details: KMG Chemicals


  
 10 









 SIGNATURE PAGE – BANK OF AMERICA 

 

			
	 BANK OF AMERICA, N.A.,
 as a Lender

		
	By:	 	/s/ Shawyna Jarrett
	Name:	 	Shawyna Jarrett
	Title:	 	Vice President


  

  
 11 









 SIGNATURE PAGE – THE PRUDENTIAL INSURANCE COMPANY OF AMERICA 

 

			
	 THE PRUDENTIAL INSURANCE
 COMPANY OF AMERICA,
 as a Lender

		
	By:	 	/s/ Brian N. Thomas
	Name:	 	Brian N. Thomas
	Title:	 	Vice President



  
 12 









 SIGNATURE PAGE – PRUCO LIFE INSURANCE COMPANY 

 

			
	 PRUCO LIFE INSURANCE COMPANY,
 as a Lender

		
	By:	 	/s/ Brian N. Thomas
	Name:	 	Brian N. Thomas
	Title:	 	Assistant Vice President



  
 13 









 EXHIBIT D 

LENDERS’ CREDIT PERCENTAGES 
 Percentages have been rounded up/down to next whole percentage 
  

				September 30,	
	 Lender
	    	Revolving Loan Commitment
and
Revolving Loan Credit
Percentage	 
	 Wells Fargo Bank, N.A.
	    	$
  
	45,000,000
 75
	  
 % 

	 Bank of America, N.A.
	    	$
  
	15,000,000
 25
	  
 % 

	 The Prudential Insurance Company of America
	    	$
  
	0.00
 0
	  
 % 

	 Pruco Life Insurance Company
	    	$
  
	0.00
 0
	  
 % 

	 Total
	    	$
  
	60,000,000
 100
	  
 %