exv10w4






Exhibit 10.4




EXECUTION COPY




WAIVER, CONSENT, PARTIAL RELEASE

AND FOURTH AMENDMENT TO

AMENDED REVOLVING CREDIT AGREEMENT

AND LOAN DOCUMENTS




          WAIVER, CONSENT, PARTIAL RELEASE AND FOURTH AMENDMENT, dated as of July 2, 2008 (this
“Agreement”), by and among Alon USA Energy, Inc., a Delaware corporation (the
“Parent”), Alon USA, LP, f/k/a SWBU, L.P., a Texas limited partnership (“Alon LP”;
together with such other subsidiaries of the Parent as may be designated as a borrower hereunder by
Alon LP with the prior written consent of the Agent and the Required Lenders (as defined in the
Credit Agreement), each individually a “Borrower”, and, collectively, the
“Borrowers”), all direct and indirect subsidiaries of the Parent other than the “Excluded
Subsidiaries” referred to below (the Parent and such direct and indirect subsidiaries that are not
Excluded Subsidiaries are hereinafter referred to individually as a “Guarantor Company”
and, collectively, as the “Guarantor Companies”), the Lenders (as defined below), Israel
Discount Bank of New York, as administrative agent, co-arranger and collateral agent for the
Lenders (in such capacity, the “Agent”), and Bank Leumi USA, as co-arranger for the Lenders
(“Bank Leumi”).




WITNESSETH




          WHEREAS, the Borrowers, the Guarantor Companies, the financial institutions from time to time
party thereto (each a “Lender” and collectively, the “Lenders”), the Agent and Bank
Leumi are parties to the Amended Revolving Credit Agreement, dated as of June 22, 2006 (as amended
by (i) the First Amendment, dated as of August 4, 2006, (ii) the Waiver, Consent, Partial Release
and Second Amendment, dated as of February 28, 2007, and (iii) the Third Amendment, dated as of
June 29, 2007, the “Credit Agreement”), pursuant to which the Lenders have made revolving
loans to the Borrowers;




          WHEREAS, the obligations of the Borrowers and the Guarantor Companies to the Agent and the
Lenders in respect of the Credit Agreement and the other Loan Documents are secured, inter
alia, by the collateral and other security interests referred to in the Credit Agreement,
the Security Agreement, the Pledge Agreement and the other Security Documents;




          WHEREAS, the Borrowers have informed the Lenders that (i) Alon Louisiana Holdings, Inc., a
Delaware corporation and a direct, wholly-owned subsidiary of Alon Assets (“Alon Louisiana
Holdings”), (ii) Alon Refining Louisiana, Inc., a Delaware corporation and a direct subsidiary
of Alon Louisiana Holdings (“Alon Louisiana”), and (iii) Alon Refining Krotz Springs, Inc.,
a Delaware corporation and a direct subsidiary of Alon Louisiana Holdings (“Alon Krotz
Springs”; together with Alon Louisiana, Alon Louisiana Holdings, and each other Person (other
than any Person that has been at any time a party to the Credit Agreement) that becomes a
Subsidiary of Alon Louisiana Holdings from time to time, the “Released Parties”), intend to
acquire a refinery located in Krotz Springs, Louisiana from Valero Energy Corporation (the
“Krotz Springs Refinery”) and to enter into new loan documents to finance the acquisition
of the Krotz Springs Refinery, including (x) the Term Loan Agreement to be dated on or about July
3, 2008, among Alon Louisiana, Alon Krotz Springs, the lenders party thereto and Credit Suisse, as
administrative agent and collateral agent and (y) the Loan and Security Agreement to be dated on



 









 






or about July 3, 2008, among Alon Louisiana, Alon Krotz Springs, the lenders party thereto and
Bank of America, N.A., as administrative agent (as such documents may be amended, supplemented or
otherwise modified from time to time, the “Krotz Springs Loan Documents”);




          WHEREAS, the Borrowers, the Guarantor Companies, the Lenders, Bank Leumi and the Agent wish to
amend the Credit Agreement and the Loan Documents, in order to exclude the Released Parties from
certain provisions of the Credit Agreement that would otherwise be applicable to such Subsidiaries
of the Parent; and




          WHEREAS, the Borrowers and the Guarantor Companies have requested that the Agent and the
Required Lenders (i) consent to and waive any Event of Default that would or will otherwise arise
under Section 10.01(c) or (d) of the Credit Agreement as a result of a breach of Section 7.02(a) or
(b) of the Credit Agreement as a result of the execution of the Krotz Springs Loan Documents, (ii)
consent to the release of the Agent’s Liens on the Released Parties’ Capital Stock and all assets
of the Released Parties and (iii) release the Released Parties from the Credit Agreement and the
other Loan Documents and all Obligations thereunder;




          NOW THEREFORE, in consideration of the foregoing and the mutual covenants herein contained,
and for other good and valuable consideration, the receipt and sufficiency of which are hereby
acknowledged, the parties hereby agree as follows:




          1. Definitions. Any capitalized term used herein and not defined shall have the
meaning assigned to it in the Credit Agreement.




          2. Amendments to Credit Agreement.




               (a) Preamble. The Preamble to the Credit Agreement is hereby amended and restated in
its entirety to read as follows:




     “AMENDED REVOLVING CREDIT AGREEMENT (this “Agreement”), dated
as of June 22, 2006 by and among Alon USA Energy, Inc., a Delaware
corporation (the “Parent”), Alon USA, LP, f/k/a SWBU, L.P., a Texas
limited partnership (“Alon LP”; and together with such other
subsidiaries of the Parent as may be designated as a borrower hereunder by
Alon LP with the prior written consent of the Agent and the Required Lenders
(each as defined below), each individually a “Borrower”, and,
collectively, the “Borrowers”), all direct and indirect subsidiaries
of the Parent other than the “Excluded Subsidiaries” referred to below (the
Parent and such direct and indirect subsidiaries that are not Excluded
Subsidiaries are hereinafter referred to individually as a “Guarantor
Company” and, collectively, as the “Guarantor Companies”), the
financial institutions from time to time party hereto (each a
“Lender” and collectively, the “Lenders”), Israel Discount
Bank of New York, as administrative agent, co-arranger and collateral agent
for the Lenders (in such capacity, the “Agent”), and Bank Leumi USA,
as co-arranger for the Lenders.”



-2-









 





               (b) New Definitions. Section 1.01 of the Credit Agreement is hereby amended to add
the following defined terms in the appropriate alphabetical order:




     ““Alon Krotz Springs” means Alon Refining Krotz
Springs, Inc., a Delaware corporation and a direct
subsidiary of Alon Louisiana Holdings.”




     ““Alon Louisiana” means Alon Refining
Louisiana, Inc., a Delaware corporation and a direct
subsidiary of Alon Louisiana Holdings.”




     ““Alon Louisiana Holdings” means Alon Louisiana
Holdings, Inc., a Delaware corporation and a direct,
wholly-owned subsidiary of Alon Assets.”




     “Alon Louisiana Subsidiaries” means Alon Krotz
Springs, Alon Louisiana, Alon Louisiana Holdings, and each
of their respective Subsidiaries (other than any Person that
has been at any time a party to the Credit Agreement).




     ““Excluded Subsidiaries” means (i) the
Subsidiaries of Alon Interests, (ii) the Bank of America
Financed Subsidiaries, and (iii) the Alon Louisiana
Subsidiaries.”



               (c) Amendment and Restatement of Existing Definitions. The following defined terms in
Section 1.01 of the Credit Agreement are hereby amended and restated in their entirety to read as
follows:




     ““Company” means all direct and indirect subsidiaries of the
Parent (including, without limitation, Alon Interests), other than the
Excluded Subsidiaries.”




     ““Fixed Assets and Other Specified Property” means any (a)
Fixed Assets, (b) any Capital Stock issued by a Subsidiary of a Company and
owned by a Company (other than any Capital Stock of (i) the Bank of America
Financed Subsidiaries owned by Paramount Petroleum Holdings, (ii) Alon
Interests owned by Alon LP, (iii) any Subsidiary of Alon Interests and (iv)
any Alon Louisiana Subsidiary), and (c) any Indebtedness owed by one Company
to another Company which is evidenced by a promissory note.”



               (d) Interest Rate and Payment; Production Increase. Section 2.13(b) of the Credit
Agreement is hereby amended by deleting the parenthetical in the second line thereof—“other than
the Bank of America Financed Subsidiaries)”—and by substituting therefor the following: “(other
than the Bank of America Financed Subsidiaries and the Alon Louisiana Subsidiaries)”.



-3-









 





               (e) Interest Rate and Payment; Making a Request for a Facility Sublimit Increase.
Section 2.13(c) of the Credit Agreement is hereby amended by deleting the parenthetical in clause
(B) of the third sentence thereof containing the phrase “(other than the Bank of America Financed
Subsidiaries)” and by substituting therefor the following: “(other than the Bank of America
Financed Subsidiaries and the Alon Louisiana Subsidiaries)”.



               (f) Representations and Warranties; Subsidiaries. Section 6.01(f) of the Credit
Agreement is hereby amended by deleting the words “and the Bank of America Financed Subsidiaries”
and by substituting therefor the following: “the Bank of America Financed Subsidiaries and the Alon
Louisiana Subsidiaries”.



               (g) Affirmative Covenants; Subsidiaries, Etc. Section 7.01(b)(i) of the Credit
Agreement is hereby amended by deleting the first parenthetical (which begins in the first line) in
its entirety and by substituting therefor the following:




“(other than (A) a Subsidiary of Alon Interests, (B) any direct Subsidiary
of the Parent and any Subsidiary of any direct Subsidiary of the Parent
(other than Subsidiaries of Alon USA), (C) the Bank of America Financed
Subsidiaries and (D) the Alon Louisiana Subsidiaries)”



               (h) Negative Covenants; Liens, Etc. Section 7.02(a) of the Credit Agreement is hereby
amended by deleting each parenthetical in the first paragraph of such Section containing the phrase
“(other than the Bank of America Financed Subsidiaries and Subsidiaries of Alon Interests)” and by
substituting therefor the following: “(other than the Excluded Subsidiaries)”.



               (i) Negative Covenants; Indebtedness. Section 7.02(b) of the Credit Agreement is
hereby amended by deleting the parenthetical in the second and third lines of such Section
containing the phrase “(other than the Bank of America Financed Subsidiaries and Subsidiaries of
Alon Interests)” and by substituting therefor the following: “(other than the Excluded
Subsidiaries)”.



               (j) Negative Covenants; Merger, Consolidation, Sale of Assets, Etc. Section 7.02(c)
of the Credit Agreement is hereby amended by deleting in the second and third lines of clause (i)
and clause (ii) of such Section the phrase “, other than the Bank of America Financed Subsidiaries
and Subsidiaries of Alon Interests,” and by substituting therefor the following: “, other than the
Excluded Subsidiaries,”.



               (k) Negative Covenants; Investments, Etc. Section 7.02(e) of the Credit Agreement is
hereby amended by deleting in the second and third lines and the fourth and fifth lines of such
Section the parenthetical “(other than the Bank of America Financed Subsidiaries and Subsidiaries
of Alon Interests)” and by substituting therefor the following: “(other than the Excluded
Subsidiaries)”.



          3. Amendments to the Pledge Agreement and Security Agreement.




               (a) Section 2 of the Pledge Agreement is hereby amended by deleting the last sentence of
Section 2 in its entirety and by substituting therefor the following:



-4-









 






“Anything to the contrary notwithstanding, the Pledged Shares shall not
include (i) the Capital Stock of Alon USA Interests, LLC, a Texas limited
liability company, and its Subsidiaries, (ii) the Capital Stock of the Bank
of America Financed Subsidiaries, (iii) the Capital Stock of the Alon
Louisiana Subsidiaries and (iv) Capital Stock in any Pledgor held by
management or employees or issuable upon the exercise of warrants or
options, in each case to the extent permitted by and in accordance with the
Revolving Credit Agreement.”



               (b) Section 2 of the Security Agreement is hereby amended by deleting the last sentence of
Section 2 in its entirety and by substituting therefor the following:




“Anything to the contrary notwithstanding, Collateral shall not include (i)
the Capital Stock of the Bank of America Financed Subsidiaries, (ii) the
Capital Stock of the Alon Louisiana Subsidiaries and (iii) the Capital Stock
of Alon Interests.”



          4. Waiver, Consent and Release. Subject to the satisfaction of the conditions
contained in Section 7 hereof and pursuant to Section 12.03 of the Credit Agreement:




               (a) The Agent and the Required Lenders consent to, and waive any Default or Event of Default
that would otherwise arise under Section 10.01(c) or (d) of the Credit Agreement as a result of a
breach of Section 7.02(a) or (b) of the Credit Agreement by reason of the execution and delivery of
the Krotz Springs Loan Documents.



               (b) The Agent and the Required Lenders hereby release their security interest in and lien on
the Capital Stock and all assets of the Released Parties and release the Released Parties from the
Credit Agreement and the other Loan Documents and all Obligations thereunder.



          5. Releases of Security Interests and Liens.




               (a) Subject to the satisfaction of the conditions set forth in Section 7 hereof, the Agent’s
security interest in and lien on the Capital Stock and assets of the Released Parties is hereby
released without recourse, representation or warranty of any kind, express or implied and at the
sole cost and expense of Borrowers.



               (b) The Agent will, at the request of Administrative Borrower, execute and deliver, and hereby
authorizes the Administrative Borrower to execute and deliver, such other instruments and
documents, and take such further action, as Administrative Borrower may reasonably request to
effect or evidence the termination of Agent’s security interest in and lien on the Capital Stock
and assets of the Released Parties and releases the Released Parties from the Credit Agreement and
the other Loan Documents and all Obligations thereunder as provided in clause (a) above, but
without recourse, representation or warranty of any kind, express or implied, and at the sole cost
and expense of Borrowers.



-5-









 





          6. Representations and Warranties. To induce the other parties hereto to enter into
this Agreement, the Loan Parties represent and warrant to the Agent and the Lenders that, as of the
Agreement Effective Date (as defined below):




               (a) The execution, delivery and performance by each of the Loan Parties of this Agreement has
been duly authorized by all requisite corporate actions; that this Agreement has been duly executed
and delivered by each of the Loan Parties; and that this Agreement and the Credit Agreement, as
amended by this Agreement, constitute legal, valid and binding obligations of the Loan Parties,
enforceable against them in accordance with its terms (subject to the applicable bankruptcy,
reorganization, insolvency, moratorium or similar laws affecting creditors’ rights generally and
subject, as to enforceability, to equitable principles of general application (regardless of
whether enforcement is sought in a proceeding in equity or at law)).



               (b) The representations and warranties contained in Article VI of the Credit Agreement and in
each other Loan Document and certificate or other writing delivered to Agent or any Lender pursuant
thereto on or prior to the Agreement Effective Date are true and correct in all material respects
on and as of the Agreement Effective Date, after giving effect to the terms of this Agreement, as
though made on and as of such date, except to the extent that such representations and warranties
expressly relate solely to an earlier date (in which case such representations and warranties shall
be true and correct in all material respects on and as of such date).



               (c) No Default or Event of Default has occurred and is continuing on the Agreement Effective
Date or will result from this Agreement becoming effective in accordance with its terms.



               (d) The organizational structure of Parent and its Subsidiaries is as set forth on
Schedule A hereto.



          7. Conditions to Effectiveness. The effectiveness of this Agreement is subject to the
fulfillment on or before July 2, 2008, in a manner satisfactory to the Agent, of the condition
precedent that this Agreement shall have been executed and delivered by the Loan Parties, the Agent
and the Lenders (the date such condition is fulfilled is hereafter referred to as the
“Agreement Effective Date”).




          8. Reservation of Rights. This release shall apply only to the Capital Stock and all
assets of the Released Parties and does not, in any manner whatsoever, allow for the release of
liens on any other Collateral of any other Loan Party. The Agent’s liens on all such other
Collateral shall remain in full force and effect. No action or acquiescence by the Agent and the
Lenders, including, without limitation, the amendment under this Agreement of, or the acceptance of
any payments under, the Credit Agreement, shall constitute a waiver of any Default or Event of
Default, except as expressly set forth herein. Accordingly, the Agent and the Lenders reserve all
of their rights under the Credit Agreement, the Loan Documents, at law and otherwise regarding any
such Default or Event of Default.




-6-









 








          9. Continued Effectiveness of Loan Documents. Each of the Loan Parties hereby (i)
confirms and agrees that each Loan Document to which it is a party is, and shall continue to be, in
full force and effect and is hereby ratified and confirmed in all respects except that on and after
the Agreement Effective Date all references in any such Loan Document to “the Credit Agreement”,
“thereto”, “thereof”, “thereunder” or words of like import referring to the Credit Agreement shall
mean the Credit Agreement as amended by this Agreement, and (ii) confirms and agrees that to the
extent that any such Loan Document purports to assign or pledge to the Collateral Agent, or to
grant to the Collateral Agent a security interest in or lien on, any collateral as security for the
Obligations of the Loan Parties from time to time existing in respect of the Credit Agreement and
the Loan Documents, such pledge, assignment and/or grant of the security interest or lien is hereby
ratified and confirmed in all respects, except with respect to the Capital Stock or other
Collateral released hereunder.




          10. Loan Parties; Borrowing Base; Intercreditor Agreement.




               (a) Notwithstanding anything to the contrary, after the Agreement Effective Date:



                    (i) none of the Released Parties shall be deemed to be a Loan Party, a Company, or a Guarantor
Company under the Credit Agreement or any of the other Loan Documents;



                    (ii) no assets of the Released Parties shall be included in any calculation of the Borrowing
Base under the Credit Agreement;



                    (iii) the Capital Stock and all assets of the Released Parties shall no longer be collateral
of the Agent and the Lenders under the Intercreditor Agreement;



                    (iv) the Released Parties shall be released from the Intercreditor Agreement; and



                    (v) none of the Released Parties shall be subject to the terms and conditions of the Credit
Agreement and the other Loan Documents, and no Default or Event of Default shall result on account
of any representation, warranty, covenant or agreement set forth in the Credit Agreement and the
other Loan Documents insofar as they relate to any Released Party or any action or failure to act
by any Released Party.



               (b) In no event shall any Person that has been at any time a party to the Credit Agreement be
a Released Party.



          11. Miscellaneous.




               (a) This Agreement may be executed in any number of counterparts and by different parties
hereto in separate counterparts, each of which shall be deemed to be an original, but all of which
taken together shall constitute one and the same agreement. Delivery



-7-









 







of a counterpart hereby by facsimile transmission shall be equally effective as delivery of a
manually executed counterpart hereof.



               (b) Section and paragraph headings herein are included for convenience of reference only and
shall not constitute a part of this Agreement for any other purpose.



               (c) This Agreement shall be governed by, and construed in accordance with, the laws of the
State of New York.



               (d) The Loan Parties will pay on demand all reasonable fees, reasonable out-of-pocket costs
and expenses of the Agent in connection with the preparation, execution and delivery of this
Agreement, including, without limitation, the reasonable fees, out-of-pocket disbursements and
other client charges of Schulte Roth & Zabel LLP.



[REMAINDER OF THIS PAGE INTENTIONALLY LEFT BLANK]





-8-









 








          IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be executed by their
respective officers thereunto duly authorized, as of the date first above written.




	 	 	 	 	 
	 	Borrowers:



ALON USA, LP



By:   Alon USA GP, LLC, a Delaware limited

         liability company, its general partner

 	 
	 	By:  	/s/ Shai Even
 	 
	 	 	Name:  	Shai Even 	 
	 	 	Title:  	Chief Financial Officer 	 
	 



Signatures Pages to the Waiver, Consent, Partial Release and Fourth Amendment














 








	 	 	 	 	 
	 	Guarantor Companies:




ALON ASSETS, INC.

ALON USA OPERATING, INC

ALON USA REFINING, INC.

ALON ASPHALT BAKERSFIELD, INC

ALON USA, INC.

ALON USA ENERGY, INC.

ALON USA CAPITAL, INC.

 	 
	 	By:  	/s/ Shai Even
 	 
	 	 	Name:  	Shai Even 	 
	 	 	Title:  	Chief Financial Officer 	 
	 
	 	ALON USA GP, LLC

 	 
	 	By:  	/s/ Shai Even
 	 
	 	 	Name:  	Shai Even 	 
	 	 	Title:  	Chief Financial Officer 	 
	 
	 	ALON USA INTERESTS, LLC

 	 
	 	By:  	/s/ Shai Even
 	 
	 	 	Name:  	Shai Even 	 
	 	 	Title:  	Vice President 	 
	 
	 	ALON USA DELAWARE, LLC

ALON PIPELINE LOGISTICS, LLC

 	 
	 	By:  	/s/ David Wiessman
 	 
	 	 	Name:  	David Wiessman 	 
	 	 	Title:  	Chief Executive Officer 	 
	 



Signatures Pages to the Waiver, Consent, Partial Release and Fourth Amendment














 








	 	 	 	 	 
	 	ALON CRUDE PIPELINE, LLC

ALON PARAMOUNT HOLDINGS, INC.

PARAMOUNT OF WASHINGTON, LLC

PARAMOUNT OF OREGON, LLC

 	 
	 	By:  	/s/ Shai Even
 	 
	 	 	Name:  	Shai Even 	 
	 	 	Title:  	Chief Financial Officer 	 
	 



Signatures Pages to the Waiver, Consent, Partial Release and Fourth Amendment














 








	 	 	 	 	 
	 	Agent and Lender:



ISRAEL DISCOUNT BANK OF NEW YORK

 	 
	 	By:  	/s/ Amir Barash
 	 
	 	 	Name:  	Amir Barash 	 
	 	 	Title:  	Senior Vice President 	 
	 
	 	By:  	                      /s/ David Herzog
 	 
	 	 	Name:  	David Herzog 	 
	 	 	Title:  	First Vice President 	 
	 
	 	Lender and Co-arranger:




BANK LEUMI USA

 	 
	 	By:  	/s/ Yuval Talmy
 	 
	 	 	Name:  	Yuval Talmy 	 
	 	 	Title:  	First Vice President 	 
	 
	 	By:  	                   /s/ Michaela Klein, 212
 	 
	 	 	Name:  	Michaela Klein, 212 	 
	 	 	Title:  	Senior Vice President 	 
	 



Signatures Pages to the Waiver, Consent, Partial Release and Fourth Amendment