QuickLinks
 -- Click here to rapidly navigate through this document
  



 
 

EXHIBIT 10.4    
    


 
  SECOND AMENDMENT TO CREDIT AGREEMENT    
    


        THIS SECOND AMENDMENT TO CREDIT AGREEMENT (this "Amendment") dated as of the 20th day of April 2004, by and among PLAINS MARKETING, L.P. ("Borrower"),
FLEET NATIONAL BANK, as Administrative Agent, and the Lenders party hereto. 


W I T N E S S E T H:  


        WHEREAS, Borrower, Administrative Agent and Lenders named therein entered into that certain Credit Agreement dated as of November 21, 2003, as amended by
that certain First Amendment to Credit Agreement dated as of December 19, 2003 (as heretofore amended, the "Original Agreement") for the purposes and consideration therein expressed; and 


        WHEREAS,
Borrower, Administrative Agent and Lenders desire to amend the Original Agreement for the purposes described herein; 


        NOW,
THEREFORE, in consideration of the premises and the mutual covenants and agreements contained herein and in the Original Agreement, and for other good and valuable consideration,
the receipt and sufficiency of which are hereby acknowledged, the parties hereto do hereby agree as follows: 


ARTICLE
I.—Definitions and References


        §
1.1. Terms Defined in the Original Agreement. Unless the context otherwise requires or unless otherwise
expressly defined herein, the terms defined in the Original Agreement shall have the same meanings whenever used in this Amendment. 



        §
1.2. Other Defined Terms. Unless the context otherwise requires, the following terms when used in this
Amendment shall have the meanings assigned to them in this § 1.2. 


        "Amendment" means this Second Amendment to Credit Agreement. 


        "Credit Agreement" means the Original Agreement as amended hereby. 


ARTICLE
II.—Amendments


        §
2.1. Special Financing Requests. Section 2.1 of the Original Agreement is hereby amended by adding a new
subsection (f) at the end thereof, to read as follows: 



        (f)    Special Financing Requests. During the Request Period, Borrower may from time to time submit to Lenders special financing
requests (a "Special Financing Request") substantially in the form of a Financing Request-Initial and otherwise acceptable to Lenders, except that such Special Financing Request shall
(i) specify volumes of Petroleum Products that would otherwise qualify as Hedged Eligible Inventory, except that such Petroleum Products have been previously purchased or are scheduled for
purchase prior to the following month, and (ii) request Lenders to make pro rata advances on such date following delivery of such Petroleum Products as Borrower may specify with a repayment
date as specified in such Special Financing Request, but in no event more than six months after the specified funding date, to fund the purchase of such Petroleum Products. For purposes of the
foregoing: (A) the Hedged Value and Sale Value of such Petroleum Products shall be calculated as though such Petroleum Products qualify as Hedged Eligible Inventory and such Special Financing
Request constitutes a Financing Request-Initial, and (B) such Petroleum Products shall be deemed to be "Financed Hedged Eligible Inventory" hereunder. Any such Special Financing Request may be
evaluated by Lenders and shall be processed as set forth in Section 2.1(b) as though such Special Financing Request constituted a Financing Request-Initial. With respect to any such Special
Financing Request, if one or more Participating Lenders shall in 



1







 

their
sole and absolute discretion commit to finance such purchase of such Petroleum Products, on the specified funding date each Participating Lender shall, subject to the netting provisions set
forth in Section 2.1(d), make its Loan pursuant to Section 2.2, as though such Special Financing Request constitutes a Financing Request-Final;  provided, notwithstanding Section 2.8(c)
hereof, such Loans shall constitute Term Loans due and payable on the repayment date specified in such
Special Financing Request. Borrower hereby agrees that in the event any Loan made pursuant to a Special Financing Request shall not be repaid on the next following Settlement Date, Borrower shall
furnish to Lenders a monthly updated Special Financing Request with respect to such original Special Financing Request, updating the information described therein. The Collateral specified in any such
Special Financing Request (and any related updated Special Financing Request) shall primarily secure such Loans made with respect to such Collateral, and secondarily secure all other Obligations. 




        §
2.2. Link Asset Financings. Borrower desires to submit to Lenders monthly financing requests of up to
$60,000,000 per month with respect to in transit Hedged Eligible Inventory relating to Borrower's recent acquisition of certain assets of Link Energy LLC, to be delivered to Borrower commencing
May 2004 through and including August 2004, (a "Link Asset Financing Request") substantially in the form of a Financing Request-Initial, except that such Link Asset Financing Request
shall not include a schedule specifying the Approved Locations through which such Hedged Eligible Inventory will be in transit, but shall include a schedule listing sales contracts constituting
Eligible Receivables with an aggregate face amount not less than $67,000,000 and shall provide for the granting of a lien on and security interest therein. Any such Link Asset Financing Request shall
be evaluated by Lenders and shall be processed as set forth in Section 2.1(b), (c) and (d) as though such Link Asset Financing Request constitutes a Financing Request-Initial. The
Collateral specified in any such Link Asset Financing Request shall primarily secure such Letters of Credit issued with respect thereto and Borrower's reimbursement obligations with respect thereto,
as well as Loans made with respect to such Collateral, and secondarily secure all other Obligations. 


ARTICLE
III.—Conditions of Effectiveness


        §
3.1. Effective Date. This Amendment shall become effective as of the date first written above, when and only
when 



        (i)    Administrative
Agent shall have received, at Administrative Agent's office a counterpart of this Amendment executed and delivered by Borrower and Lenders; 


        (ii)   Administrative
Agent shall have additionally received all of the following documents, each document (unless otherwise indicated) being dated the date of receipt thereof
by Administrative Agent, duly authorized, executed and delivered, and in form and substance satisfactory to Administrative Agent: 



        Supporting Documents. Such supporting documents as Administrative Agent may reasonably request. 



ARTICLE
IV.—Representations and Warranties


        §
4.1. Representations and Warranties of Borrower. In order to induce Administrative Agent and Lenders to enter
into this Amendment, Borrower represents and warrants to Administrative Agent and each Lender that: 



        (a)   The
representations and warranties contained in Article V of the Original Agreement are true and correct at and as of the time of the effectiveness hereof, except
to the extent that such representation and warranty was made as of a specific date. 


        (b)   Borrower
is duly authorized to execute and deliver this Amendment, to the extent a party thereto, and Borrower is and will continue to be duly authorized to borrow and
perform its 



2







 




obligations
under the Credit Agreement. Borrower has duly taken all action necessary to authorize the execution and delivery of this Amendment and to authorize the performance of its obligations
hereunder. 


        (c)   The
execution and delivery by Borrower of this Amendment, the performance by it of its obligations hereunder, and the consummation of the transactions contemplated
hereby, do not and will not conflict with any provision of any Law or of the organizational documents of Borrower, or of any material
agreement, judgment, license, order or permit applicable to or binding upon Borrower, or result in the creation of any Lien upon any assets or properties of Borrower, except in favor of Administrative
Agent and other Permitted Liens. Except for those which have been duly obtained, no consent, approval, authorization or order of any Tribunal or third party is required in connection with the
execution and delivery by Borrower of this Amendment or to consummate the transactions contemplated hereby. 


        (d)   When
duly executed and delivered, this Amendment and each of the Loan Documents, as amended hereby, will be a legal and binding instrument and agreement of Borrower,
enforceable in accordance with its terms, (subject, as to enforcement of remedies, to applicable bankruptcy, insolvency and similar laws applicable to creditors' rights generally). 



ARTICLE
V.—Miscellaneous


        §
5.1. Ratification of Agreements. The Original Agreement, as hereby amended, is hereby ratified and confirmed in
all respects. The Loan Documents, as they may be amended or affected by this Amendment, are hereby ratified and confirmed in all respects by Borrower. Any reference to the Credit Agreement in any Loan
Document shall be deemed to refer to this Amendment also. The execution, delivery and effectiveness of this Amendment shall not, except as expressly provided herein, operate as a waiver of any right,
power or remedy of Administrative Agent or any Lender under the Credit Agreement or any other Loan Document nor constitute a waiver of any provision of the Credit Agreement or any other Loan Document. 



        §
5.2. Ratification of Security Documents. Borrower, Administrative Agent, and Lenders each acknowledge and agree
that any and all indebtedness, liabilities or obligations, arising under or in connection with the LC Obligations or the Notes, are Obligations and are secured indebtedness under, are guarantied by,
and are secured by, each and every Security Document. Borrower hereby re-pledges, re-grants and re-assigns a security interest in and lien on every asset of
Borrower described as Collateral in any Security Document. 


        §
5.3. Survival of Agreements. All representations, warranties, covenants and agreements of Borrower shall
survive the execution and delivery of this Amendment and the performance hereof, including without limitation the making or granting of each Loan, and shall further survive until all of the
Obligations under the Credit Agreement are paid in full. All statements and agreements contained in any certificate or instrument delivered by Borrower hereunder or under the Credit Agreement to
Administrative Agent or any Lender shall be deemed to constitute representations and warranties by, or agreements and covenants of, Borrower under this Amendment and under the Credit Agreement. 


        §
5.4. Loan Documents. This Amendment is a Loan Document, and all provisions in the Credit Agreement pertaining
to Loan Documents apply hereto. 


        § 5.5. GOVERNING LAW. THIS AMENDMENT SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF NEW YORK
AND ANY APPLICABLE LAWS OF THE UNITED STATES OF AMERICA IN ALL RESPECTS, INCLUDING CONSTRUCTION, VALIDITY AND PERFORMANCE.


        §
5.6. Counterparts. This Amendment may be separately executed in counterparts and by the different parties hereto in separate
counterparts, each of which when so executed shall be deemed to constitute one and the same Amendment. Delivery of an executed signature page by facsimile transmission shall be effective as delivery
of a manual executed counterpart. 


3







 

        IN
WITNESS WHEREOF, this Amendment is executed as of the date first above written. 



	BORROWER:	 	PLAINS MARKETING, L.P.
	

 	
 	

By: Plains Marketing GP Inc., General Partner
	

 	
 	

By:	

/s/  AL SWANSON      
 Al Swanson, Vice President and Treasurer
	
LENDER PARTIES:	
 	

FLEET NATIONAL BANK,

Administrative Agent, LC Issuer and Lender
	

 	
 	

By:	

/s/  TERRENCE RONAN      
 Terrence Ronan, Managing Director
	

 	
 	

BNP PARIBAS, Lender
	

 	
 	

By:	

/s/  JORDAN N      
 Name: Jordan N

Title: Vice President
	

 	
 	

By:	

/s/  A-C MATHIOT      
 Name: A-C Mathiot

Title: Managing Director
	

 	
 	

FORTIS CAPITAL CORP., Lender
	

 	
 	

By:	

/s/  CHAD CLARK      
 Name: Chad Clark

Title: Vice President
	

 	
 	

By:	

/s/  LEONARD RUSSO      
 Name: Leonard Russo

Title: Director
	

 	
 	

SOCIETE GENERALE, Lender
	

 	
 	

By:	

/s/  EMMANUEL CHESNEAU      
 Name: Emmanuel Chesneau

Title: Director
	

 	
 	

By:	

/s/  BARBARA PAULSEN      
 Name: Barbara Paulsen

Title: Director




4











QuickLinks



EXHIBIT 10.4


SECOND AMENDMENT TO CREDIT AGREEMENT