Exhibit
        10.01


         


        
        SECOND AMENDMENT


        
        TO


        
        3-YEAR REVOLVING CREDIT
        AGREEMENT


        
        dated as of


        
        December 18, 2007


        
        among


         


        NUSTAR
        GP HOLDINGS, LLC,


        as
        Borrower,


         


        
        JPMORGAN CHASE BANK, N.A.,


        as
        Administrative Agent,


         


        
        and


        The
        Lenders Party Hereto


         


         

        
        


        

        

        
            	
                        
                         

                    	
                        
                        SECOND AMENDMENT TO 3-YEAR REVOLVING CREDIT
                        AGREEMENT

                    


        


         


        
        THIS SECOND AMENDMENT TO 3-YEAR REVOLVING CREDIT AGREEMENT
        (this “Second
        Amendment”) dated as of December 18, 2007, is among
        NUSTAR GP HOLDINGS, LLC, a
        Delaware limited liability company (the
        “Borrower”);
        JPMORGAN CHASE BANK, N.A., as administrative
        agent (in such capacity, together with its successors in such capacity, the
        “Administrative Agent”) for
        the lenders party to the Credit Agreement referred to below (collectively, the
        “Lenders”); and the
        undersigned Lenders.


        R
        E C I T A L S


        
        A.           
        The Borrower, the Administrative Agent and the Lenders are parties to that
        certain 3-Year Revolving Credit Agreement dated as of July 19, 2006 (as amended by the
        First Amendment to 3-Year Revolving Credit Agreement dated as of November 30, 2006, the
        “Credit Agreement”),
        pursuant to which the Lenders have made certain extensions of credit available to the
        Borrower.


        
        B.           
        The Borrower has requested and the Lenders have agreed to amend certain
        provisions of the Credit Agreement.


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


        
        Section 1.         
        Defined Terms. Each capitalized term used
        herein but not otherwise defined herein has the meaning given such term in the Credit
        Agreement. Unless otherwise indicated, all references to Sections and Schedules in this
        Second Amendment refer to Sections of, and Schedules to, the Credit Agreement.


        
            	
                         

                    	
                        
                        Section 2.

                    	
                        
                        Amendments to Credit
                        Agreement.

                    


        


        
            	
                         

                    	
                        
                        2.1

                    	
                        
                        Amendments to Section
                        1.01.

                    


        


        
        (a)          
        The definition of
        “Agreement” is hereby
        amended in its entirety to read as follows:


        
        “Agreement”
        means this 3-Year Revolving Credit Agreement, as amended by the First Amendment and the
        Second Amendment, as the same may be amended, modified, supplemented or restated from time
        to time in accordance herewith.


        
        (b)          
        The definition of
        “Borrower” is hereby amended
        in its entirety to read as follows:


        
        “Borrower”
        means NuStar GP Holdings, LLC, a Delaware limited liability company (formerly known as
        Valero GP Holdings, LLC).


        
         


        
        (c)          
        The definition of “Consolidated Debt Coverage
        Ratio” is hereby amended in its entirety to read as
        follows:


         

        
        


        

        

        
        “Consolidated Debt Coverage
        Ratio” means, for any day, the ratio of (a) all
        Indebtedness of the MLP and its subsidiaries (excluding the principal amount of Hybrid
        Equity Securities in an aggregate amount not to exceed 15% of Total Capitalization), on a
        consolidated basis, as of the last day of the then most recent Rolling Period over
        (b) Consolidated EBITDA of the MLP and its subsidiaries for such Rolling
        Period.


        
        (d)          
        The definition of “Consolidated
        EBITDA” is hereby amended in its entirety to read as
        follows:


        
        “Consolidated
        EBITDA” means, without duplication, as to the MLP and its
        subsidiaries, on a consolidated basis for each Rolling Period, the amount equal to
        Consolidated Operating Income for such period (a) plus the following to the extent deducted
        from Consolidated Operating Income in such period: (i) depreciation, amortization and other
        non-cash charges for such period (including any non-cash losses or negative adjustments
        under Statement of Financial Accounting Standards 133 (and any statements replacing,
        modifying or superseding such statement) as the result of changes in the fair market value
        of derivatives) and (ii) cash distributions received by the MLP and its subsidiaries from
        Skelly-Belvieu Pipeline Company, and similar joint ventures, during such period; (b) minus
        all non-cash income added to Consolidated Operating Income in such period (including any
        non-cash gains or positive adjustments under Statement of Financial Accounting Standards
        133 (and any statements replacing, modifying or superseding such statement) as the result
        of changes in the fair market value of derivatives); and (c) plus any Material Project
        EBITDA Adjustments for such period; provided
        that Consolidated EBITDA shall be adjusted from time to time as necessary to
        give pro forma effect to acquisitions or Investments (other than Joint Venture Interests)
        or sales of property by the MLP and its subsidiaries permitted by the NuStar Logistics
        Credit Agreement.


        
        (e)          
        The definition of “Consolidated Operating
        Income” is hereby amended in its entirety to read as
        follows:


        
        “Consolidated Operating
        Income” means, as to the MLP and its subsidiaries on a
        consolidated basis for each Rolling Period, the amount equal to gross margin (including any
        proceeds received from business interruption insurance provided that such proceeds are
        received during any Rolling Period with respect to an event or events that occurred during
        such Rolling Period) minus operating
        expenses, general and administrative expenses, depreciation and amortization, and taxes
        other than income taxes, in each case for such period.


        
        (f)           
        The definition of “Material
        Agreements” is hereby amended in its entirety to read as
        follows:


        
        “Material
        Agreements” means the Limited Liability Company Agreement
        (Borrower) and the Partnership Agreement (MLP), as each such agreement may be amended,
        supplemented or otherwise modified from time to time as permitted


        
         


        
        2


        
         

        
        


        

        

        
        hereby.


        
        (g)          
        The definition of
        “MLP” is hereby amended in
        its entirety to read as follows:


        
        “MLP” means
        NuStar Energy L.P., a Delaware limited partnership.


        
        (h)          
        The definition of “Permitted
        Holder” is hereby amended in its entirety to read as
        follows:


        
        “Permitted
        Holder” means any Investment Grade Person.


         


        
        (i)           
        The definition of
        “subsidiary” is hereby
        amended in its entirety to read as follows:


        
        “subsidiary”
        means, with respect to any Person (the
        “parent”) at any date, any
        corporation, limited liability company, partnership, association or other entity the
        accounts of which would be consolidated with those of the parent in the parent’s
        consolidated financial statements if such financial statements were prepared in accordance
        with GAAP as of such date, as well as any other corporation, limited liability company,
        partnership, association or other entity (a) of which securities or other ownership
        interests representing more than 50% of the equity or more than 50% of the ordinary voting
        power or, in the case of a partnership, more than 50% of the general partnership interests
        are, as of such date, owned, controlled or held, or (b) that is, as of such date,
        otherwise Controlled, by the parent or one or more subsidiaries of the parent or by the
        parent and one or more subsidiaries of the parent. Unless otherwise expressly indicated
        herein, as used herein, the words “the MLP and its subsidiaries” (or any
        correlative thereof) shall be deemed to mean the MLP and its “Restricted
        Subsidiaries” (as defined in the NuStar Logistics Credit Agreement) (or any
        correlative thereof).


        
        (j)           
        The defined term “Valero
        Logistics” is hereby amended to read
        “NuStar Logistics” and the
        definition thereof is amended in its entirety to read as follows:


        
        “NuStar
        Logistics” means NuStar Logistics, L.P., a Delaware limited
        partnership (formerly known as Valero Logistics Operations, L.P.)


        
        (k)          
        The defined term “Valero Logistics Credit
        Agreement” is hereby amended to read
        “NuStar Logistics Credit
        Agreement” and the definition thereof is amended in its
        entirety to read as follows:


        
        “NuStar Logistics Credit
        Agreement” means that certain 5-Year Revolving Credit
        Agreement dated as of December 10, 2007 among NuStar Logistics, the MLP, JPMorgan Chase
        Bank, N.A., as administrative agent, and the lenders and other agents party thereto, as the
        same may from time to time be amended, modified, supplemented or restated.


         


        
        3


         

        
        


        

        

        
        (l)           
        The following definitions are hereby added where alphabetically appropriate
        to read as follows:


        
        “Consolidated Net
        Worth” means, at any time, an amount equal to the
        consolidated partners’ equity of the MLP and its subsidiaries.


        
        “Second
        Amendment” means the Second Amendment to 3-Year Revolving
        Credit Agreement dated as of December 18, 2007 among the Borrower, the Administrative Agent
        and the Lenders party thereto.


        
        “Standard
        Ratio” has the meaning given such term in Section
        6.11(a).


        
        “Total
        Capitalization” means, at the date of any determination
        thereof, the sum of (a) all Indebtedness of the MLP and its subsidiaries, determined on a
        consolidated basis in accordance with GAAP plus
        (b) Consolidated Net Worth.


        
            	
                         

                    	
                        
                        (m)

                    	
                        
                        The following definitions are hereby deleted in their
                        entirety:

                    


        


        
        “Acquisition”


        
        “Acquisition
        Documents”


        
        “Hybrid Equity
        Credit”


        
            	
                        
                         

                    	
                        
                        “Valero
                        Energy”

                    


        


         


        
            	
                         

                    	
                        
                        2.2

                    	
                        
                        Amendments to Section
                        5.01.

                    


        


        
        (a)          
        Section 5.01(e) is hereby renumbered to be Section 5.01(f) and a new Section
        5.01(e) is hereby added to read as follows:


        
        “(e)        
        if, at any time, any of the consolidated subsidiaries of the MLP are
        “Unrestricted Subsidiaries” (as defined in the NuStar Logistics Credit
        Agreement), then concurrently with any delivery of financial statements under Section
        5.01(a) or Section 5.01(b), a certificate of a Financial Officer setting forth
        consolidating spreadsheets that show all consolidated “Unrestricted
        Subsidiaries” (as defined in the NuStar Logistics Credit Agreement) and the
        eliminating entries, in such form as would be presentable to the auditors of the MLP;
        and”         


        
        (b)          
        Section 5.01 is hereby amended by adding the following at the end
        thereof:


        
        “Documents required to be delivered pursuant to Section 5.01(a) or
        Section 5.01(b) (to the extent any such documents are included in materials otherwise filed
        with the Securities and Exchange Commission) may be delivered electronically and if so
        delivered, shall be deemed to have been delivered on the date (i) on which the Borrower or
        the MLP posts such documents, or provides a link thereto on the MLP’s website on the
        Internet at www.nustarenergy.com; or


        
         


        
        4


        
         

        
        


        

        

        
        (ii) on which such documents are posted on the Borrower’s or the
        MLP’s behalf on an Internet or intranet website, if any, to which each Lender and the
        Administrative Agent have access (whether a commercial, third-party website or whether
        sponsored by the Administrative Agent); provided
        that the Borrower shall notify the Administrative Agent and each Lender (by
        telecopier or electronic mail) of the posting of any such documents and provide to the
        Administrative Agent by electronic mail electronic versions (i.e., soft copies) of such
        documents. Notwithstanding anything contained herein, in every instance the Borrower shall
        be required to provide paper copies of the compliance certificate required by Section
        5.01(c) to the Administrative Agent and the Lenders. Except for such compliance
        certificates, the Administrative Agent shall have no obligation to request the delivery or
        to maintain copies of the documents referred to above, and in any event shall have no
        responsibility to monitor compliance by the Borrower with any such request for delivery,
        and each Lender shall be solely responsible for requesting delivery to it or maintaining
        its copies of such documents.”


        
        2.3          
        Amendment to Section 5.02(b). Section 5.02(b)
        is hereby amended by deleting the words “(other than Valero Energy)” in the
        third line thereof.


        
        2.4          
        Amendments to Section 6.11(a). Section 6.11(a)
        is hereby amended in its entirety to read as follows:


        
        “(a)        
        The Borrower will not permit at any time the Consolidated Debt Coverage
        Ratio to be in excess of 5.00 to 1.00 (the “Standard
        Ratio”) for any Rolling Period;
        provided that if at any time the MLP or any of
        its subsidiaries consummates an acquisition for which the MLP or any of its subsidiaries
        has paid aggregate net consideration of at least $100,000,000, then, for the two Rolling
        Periods the last day of which immediately follow the date on which such acquisition is
        consummated, the numerator of the maximum Consolidated Debt Coverage Ratio otherwise
        permitted above shall be increased by 0.5; thereafter, compliance shall be determined by
        reverting back to the Standard Ratio.


        
            	
                         

                    	
                        
                        2.5

                    	
                        
                        Amendments to Article VII.
                        Article VII is hereby amended as follows:

                    


        


        
        (a)          
        Clause (k) of Article VII is hereby amended in its entirety to read as
        follows:


        
        “(k)        
        an ERISA Event shall have occurred that, in the opinion of the Required
        Lenders, when taken together with all other ERISA Events that have occurred, could
        reasonably be expected to result in a Material Adverse Effect;”


        
        (b)          
        Clause (l) of Article VII is hereby amended in its entirety to read as
        follows:


        
        “(l)         
        the MLP or any Subsidiary shall incur an Environmental Liability or
        Environmental Liabilities that could reasonably be expected to have a Material Adverse
        Effect;”


         


        
        5


         

        
        


        

        

        
        2.6          
        Amendment to Section 10.01(a)(i). Section
        10.01(a)(i) is hereby amended in its entirety to read as follows:


        
        “(i)         
        if to the Borrower, to it at 2330 N. Loop West, San Antonio, Texas 78248,
        Attention of Senior Vice President, Chief Financial Officer and Treasurer (Telecopy No.
        (210) 918-5055);”


        
            	
                         

                    	
                        
                        2.7

                    	
                        
                        Global Changes.

                    


        


        
        (a)          
        References to “Valero GP, LLC” wherever they appear in the
        Credit Agreement are hereby amended to read “NuStar GP, LLC”.


        
        (b)          
        References to “Valero Logistics Credit Agreement” wherever they
        appear in the Credit Agreement are hereby amended to read “NuStar Logistics Credit
        Agreement”.


        
        2.8          
        Amendments to Schedules. Schedule 3.06 and
        Schedule 6.07 are hereby amended and restated in their entirety to read as set forth on the
        attached Schedule 3.06 and Schedule 6.07, respectively.


        
        Section
        3.           
        Conditions Precedent. This Second Amendment
        shall not become effective until the date on which each of the following conditions is
        satisfied (or waived in accordance with Section 10.02 of the Credit Agreement) (the
        “Effective
        Date”):


        
        3.1          
        The Administrative Agent and the Lenders shall have received all fees and
        other amounts due and payable, if any, in connection with this Second Amendment on or prior
        to the Effective Date.


        
        3.2          
        The Administrative Agent shall have received from the Required Lenders and
        the Borrower, counterparts (in such number as may be requested by the Administrative Agent)
        of this Second Amendment signed on behalf of such Persons.


        
        3.3          
        The Administrative Agent shall have received such other documents as the
        Administrative Agent or special counsel to the Administrative Agent may reasonably
        request.


        
        3.4          
        No Default shall have occurred and be continuing, after giving effect to the
        terms of this Second Amendment.


        
            	
                         

                    	
                        
                        Section 4.

                    	
                        
                        Miscellaneous.

                    


        


        
        4.1          
        Confirmation. The provisions of the Credit
        Agreement, as amended by this Second Amendment, shall remain in full force and effect
        following the effectiveness of this Second Amendment.


        
        4.2          
        Ratification and Affirmation; Representations and
        Warranties. The Borrower hereby (a) acknowledges the terms of
        this Second Amendment; (b) ratifies and affirms its obligations under, and acknowledges,
        renews and extends its continued liability under, each Loan Document to which it is a party
        and agrees that each Loan Document to which it is a party


         


        
        6


         

        
        


        

        

        remains
        in full force and effect, except as expressly amended hereby, notwithstanding the
        amendments contained herein; and (c) represents and warrants to the Lenders that as of the
        date hereof, after giving effect to the terms of this Second Amendment: (i) all of the
        representations and warranties contained in each Loan Document to which it is a party are
        true and correct, unless such representations and warranties are stated to relate to a
        specific earlier date, in which case, such representations and warranties shall continue to
        be true and correct as of such earlier date and (ii) no Default has occurred and is
        continuing.


        
        4.3          
        Loan Document. This Second Amendment is a
        “Loan Document” as defined and described in the Credit Agreement and all of the
        terms and provisions of the Credit Agreement relating to Loan Documents shall apply
        hereto.


        
        4.4          
        Counterparts. This Second Amendment may be
        executed by one or more of the parties hereto in any number of separate counterparts, and
        all of such counterparts taken together shall be deemed to constitute one and the same
        instrument. Delivery of this Second Amendment by facsimile transmission shall be effective
        as delivery of a manually executed counterpart hereof.


        
        4.5          
        NO ORAL AGREEMENT. THIS SECOND AMENDMENT, THE
        CREDIT AGREEMENT AND THE OTHER LOAN DOCUMENTS EXECUTED IN CONNECTION HEREWITH AND THEREWITH
        REPRESENT THE FINAL AGREEMENT AMONG THE PARTIES AND MAY NOT BE CONTRADICTED BY EVIDENCE OF
        PRIOR, CONTEMPORANEOUS, OR UNWRITTEN ORAL AGREEMENTS OF THE PARTIES. THERE ARE NO ORAL
        AGREEMENTS BETWEEN THE PARTIES.


        
        4.6          
        GOVERNING LAW. THIS SECOND AMENDMENT
        (INCLUDING, BUT NOT LIMITED TO, THE VALIDITY AND ENFORCEABILITY HEREOF) SHALL BE GOVERNED
        BY, AND CONSTRUED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK.


         


        
        [SIGNATURES BEGIN NEXT PAGE]


         


        
        7


         

        
        


        

        

        
        IN WITNESS WHEREOF, the parties hereto have caused this Second Amendment to
        be duly executed as of the date first written above.


         


         


        
            	
                        
                         

                    	
                        
                        NUSTAR GP HOLDINGS, LLC

                    
	
                        
                         

                    	
                        
                         

                    	
                        
                         

                    
	
                        
                         

                    	
                        
                         

                    	
                        
                         

                    
	
                        
                         

                    	
                        
                        By

                    	
                        
                        /s/ Steven A. Blank

                    
	
                        
                         

                    	
                        
                         

                    	
                        
                        Steven A. Blank

                    
	
                        
                         

                    	
                        
                         

                    	
                        
                        Senior Vice President, Chief Financial Officer

                    
	
                        
                         

                    	
                        
                         

                    	
                        
                        and Treasurer

                    
	
                        
                         

                    	
                        
                         

                    	
                        
                         

                    


        


         


        


        Second
        Amendment to


        3-Year
        Revolving Credit Agreement


         


        
        S-1


         

        
        


        

        

         


        
            	
                         

                    	
                        JPMORGAN CHASE BANK, N.A., individually

                    
	
                         

                    	
                        and as Administrative Agent

                    
	
                         

                    	
                         

                    	
                         

                    
	
                         

                    	
                         

                    	
                         

                    
	
                         

                    	
                        By

                    	
                        /s/ Robert Traband

                    
	
                         

                    	
                         

                    	
                        Robert Traband

                    
	
                         

                    	
                         

                    	
                        Executive Director

                    


        


         


        
         


        Second
        Amendment to


        3-Year
        Revolving Credit Agreement


         


        
        S-2


         

        
        


        

        

        


        
            	
                         

                    	
                        SUNTRUST BANK, individually and as

                    
	
                         

                    	
                        Syndication Agent

                    
	
                         

                    	
                         

                    	
                         

                    
	
                         

                    	
                         

                    	
                         

                    
	
                         

                    	
                        By

                    	
                        /s/ Carmin J. Malizia

                    
	
                         

                    	
                         

                    	
                        Carmin J. Malizia

                    
	
                         

                    	
                         

                    	
                        Vice President

                    


        


         


        
         


        Second
        Amendment to


        3-Year
        Revolving Credit Agreement


         


        
        S-3


         

        
        


        

        

         


        Schedule
        6.07