<SUBMISSION>
<ACCESSION-NUMBER>0001193125-18-191921
<TYPE>S-4/A
<PUBLIC-DOCUMENT-COUNT>5
<FILING-DATE>20180614
<DATE-OF-FILING-DATE-CHANGE>20180614
<FILER>
<COMPANY-DATA>
<CONFORMED-NAME>NuStar Energy L.P.
<CIK>0001110805
<ASSIGNED-SIC>4610
<IRS-NUMBER>742956831
<STATE-OF-INCORPORATION>DE
<FISCAL-YEAR-END>1231
</COMPANY-DATA>
<FILING-VALUES>
<FORM-TYPE>S-4/A
<ACT>33
<FILE-NUMBER>333-223671
<FILM-NUMBER>18898011
</FILING-VALUES>
<BUSINESS-ADDRESS>
<STREET1>19003 IH-10 WEST
<CITY>SAN ANTONIO
<STATE>TX
<ZIP>78257
<PHONE>(210) 918-2000
</BUSINESS-ADDRESS>
<MAIL-ADDRESS>
<STREET1>19003 IH-10 WEST
<CITY>SAN ANTONIO
<STATE>TX
<ZIP>78257
</MAIL-ADDRESS>
<FORMER-COMPANY>
<FORMER-CONFORMED-NAME>VALERO L P
<DATE-CHANGED>20020110
</FORMER-COMPANY>
<FORMER-COMPANY>
<FORMER-CONFORMED-NAME>SHAMROCK LOGISTICS LP
<DATE-CHANGED>20000331
</FORMER-COMPANY>
</FILER>
<DOCUMENT>
<TYPE>S-4/A
<SEQUENCE>1
<FILENAME>d543382ds4a.htm
<DESCRIPTION>S-4/A
<TEXT>
<HTML><HEAD>
<TITLE>S-4/A</TITLE>
</HEAD>
 <BODY BGCOLOR="WHITE">

<Center><DIV STYLE="width:8.5in" align="left">
  <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>As filed with the Securities and Exchange Commission on June&nbsp;14, 2018 </B></P>
 <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="right"><B>Registration No.&nbsp;333-223671 </B></P> <P STYLE="font-size:4pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P>
<P STYLE="line-height:1.0pt;margin-top:0pt;margin-bottom:0pt;border-bottom:1px solid #000000">&nbsp;</P> <P STYLE="line-height:3.0pt;margin-top:0pt;margin-bottom:2pt;border-bottom:1px solid #000000">&nbsp;</P>
<P STYLE="margin-top:4pt; margin-bottom:0pt; font-size:15pt; font-family:Times New Roman" ALIGN="center"><B>UNITED STATES </B></P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:15pt; font-family:Times New Roman" ALIGN="center"><B>SECURITIES
AND EXCHANGE COMMISSION </B></P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="center"><B>Washington, D.C. 20549 </B></P> <P STYLE="font-size:2pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P><center>
<P STYLE="line-height:6.0pt;margin-top:0pt;margin-bottom:2pt;border-bottom:1.00pt solid #000000;width:21%">&nbsp;</P></center>  <P STYLE="margin-top:2pt; margin-bottom:0pt; font-size:15pt; font-family:Times New Roman" ALIGN="center"><B>Amendment
No.&nbsp;4 </B></P>  <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:15pt; font-family:Times New Roman" ALIGN="center"><B>to </B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:15pt; font-family:Times New Roman" ALIGN="center"><B>Form <FONT STYLE="white-space:nowrap">S-4</FONT> </B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:15pt; font-family:Times New Roman" ALIGN="center"><B>REGISTRATION STATEMENT </B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="center"><B><I>UNDER </I></B></P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="center"><B><I>THE
SECURITIES ACT OF 1933 </I></B></P> <P STYLE="font-size:2pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P><center> <P STYLE="line-height:6.0pt;margin-top:0pt;margin-bottom:2pt;border-bottom:1.00pt solid #000000;width:21%">&nbsp;</P></center>
<P STYLE="margin-top:2pt; margin-bottom:0pt; font-size:21pt; font-family:Times New Roman" ALIGN="center"><B>NuStar Energy L.P. </B></P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman" ALIGN="center"><B>(Exact
name of registrant as specified in its charter) </B></P> <P STYLE="font-size:3pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P><center>
<P STYLE="line-height:6.0pt;margin-top:0pt;margin-bottom:2pt;border-bottom:1.00pt solid #000000;width:21%">&nbsp;</P></center> <P STYLE="font-size:3pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%" BORDER="0" STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:8pt" ALIGN="center">


<TR>
<TD WIDTH="34%"></TD>
<TD VALIGN="bottom"></TD>
<TD WIDTH="32%"></TD>
<TD VALIGN="bottom" WIDTH="1%"></TD>
<TD WIDTH="32%"></TD></TR>


<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:8.5pt">
<TD VALIGN="top" ALIGN="center"><B>Delaware</B></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"><B>4610</B></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"><B><FONT STYLE="white-space:nowrap">74-2956831</FONT></B></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt">
<TD VALIGN="top" ALIGN="center"> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman" ALIGN="center"><B>(State or other jurisdiction of</B></P>
<P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:8pt; font-family:Times New Roman" ALIGN="center"><B>incorporation or organization)</B></P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman" ALIGN="center"><B>(Primary Standard Industrial</B></P>
<P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:8pt; font-family:Times New Roman" ALIGN="center"><B>Classification Code Number)</B></P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman" ALIGN="center"><B>(I.R.S. Employer</B></P>
<P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:8pt; font-family:Times New Roman" ALIGN="center"><B>Identification Number)</B></P></TD></TR>
</TABLE> <P STYLE="margin-top:3pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>19003 <FONT STYLE="white-space:nowrap">IH-10</FONT> West </B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>San Antonio, Texas 78257 </B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>(210) <FONT STYLE="white-space:nowrap">918-2000</FONT> </B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman" ALIGN="center"><B>(Address, including zip code, and telephone number, including area code, of registrant&#146;s principal executive offices) </B></P>
<P STYLE="font-size:3pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P><center> <P STYLE="line-height:6.0pt;margin-top:0pt;margin-bottom:2pt;border-bottom:1.00pt solid #000000;width:21%">&nbsp;</P></center>
<P STYLE="margin-top:3pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>Amy L. Perry </B></P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>Senior
Vice President, General Counsel </B></P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>and Corporate Secretary </B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>NuStar GP, LLC </B></P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>19003 <FONT
STYLE="white-space:nowrap">IH-10</FONT> West </B></P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>San Antonio, Texas 78257 </B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>(210) <FONT STYLE="white-space:nowrap">918-2000</FONT> </B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman" ALIGN="center"><B>(Name, address, including zip code, and telephone number, including area code, of agent for service) </B></P>
<P STYLE="font-size:3pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P><center> <P STYLE="line-height:6.0pt;margin-top:0pt;margin-bottom:2pt;border-bottom:1.00pt solid #000000;width:21%">&nbsp;</P></center>
<P STYLE="margin-top:3pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B><I>Copies to: </I></B></P> <P STYLE="font-size:3pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%" BORDER="0" STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:8.5pt" ALIGN="center">


<TR>
<TD WIDTH="34%"></TD>
<TD VALIGN="bottom"></TD>
<TD WIDTH="32%"></TD>
<TD VALIGN="bottom" WIDTH="1%"></TD>
<TD WIDTH="32%"></TD></TR>


<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:8.5pt">
<TD VALIGN="top" ALIGN="center"> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>George J. Vlahakos</B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>Sidley Austin LLP</B></P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>1000
Louisiana St., Suite 6000</B></P> <P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>Houston, Texas 77002</B></P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>Mark V. Purpura</B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>Richards, Layton&nbsp;&amp; Finger, P.A.</B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>One Rodney Square</B></P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>920
North King Street</B></P> <P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>Wilmington, DE 19801</B></P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>Igor Kirman</B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>Wachtell, Lipton, Rosen&nbsp;&amp; Katz</B></P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>51 West 52nd Street</B></P> <P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:8.5pt; font-family:Times New Roman" ALIGN="center"><B>New
York, NY 10019</B></P></TD></TR>
</TABLE> <P STYLE="font-size:3pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P><center> <P STYLE="line-height:6.0pt;margin-top:0pt;margin-bottom:2pt;border-bottom:1.00pt solid #000000;width:21%">&nbsp;</P></center>
<P STYLE="margin-top:3pt; margin-bottom:0pt; text-indent:3%; font-size:8.5pt; font-family:Times New Roman"><B>Approximate date of commencement of proposed sale to the public: </B>As soon as practicable after this registration statement becomes
effective and upon consummation of the merger described in the enclosed proxy statement/prospectus. </P> <P STYLE="margin-top:3pt; margin-bottom:0pt; text-indent:3%; font-size:8.5pt; font-family:Times New Roman">If the securities being registered on
this Form are to be offered in connection with the formation of a holding company and there is compliance with General Instruction G, check the following box&nbsp;&nbsp;&#9744; </P>
<P STYLE="margin-top:3pt; margin-bottom:0pt; text-indent:3%; font-size:8.5pt; font-family:Times New Roman">If this Form is filed to register additional securities for an offering pursuant to Rule 462(b) under the Securities Act of 1933, check the
following box and list the Securities Act registration statement number of the earlier effective registration statement for the same offering.&nbsp;&nbsp;&#9744; </P>
<P STYLE="margin-top:3pt; margin-bottom:0pt; text-indent:3%; font-size:8.5pt; font-family:Times New Roman">If this Form is a post-effective amendment filed pursuant to Rule 462(d) under the Securities Act of 1933, check the following box and list
the Securities Act registration statement number of the earlier effective registration statement for the same offering.&nbsp;&nbsp;&#9744; </P>
<P STYLE="margin-top:3pt; margin-bottom:0pt; text-indent:3%; font-size:8.5pt; font-family:Times New Roman">Indicate by check mark whether the registrant is a large accelerated filer, an accelerated filer, a
<FONT STYLE="white-space:nowrap">non-accelerated</FONT> filer, a smaller reporting company, or emerging growth company. See the definitions of &#147;large accelerated filer,&#148; &#147;accelerated filer,&#148; &#147;smaller reporting company&#148;
and &#147;emerging growth company&#148; in Rule <FONT STYLE="white-space:nowrap">12b-2</FONT> of the Exchange Act. </P> <P STYLE="font-size:3pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%" BORDER="0" STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:8.5pt" ALIGN="center">


<TR>
<TD WIDTH="15%"></TD>
<TD VALIGN="bottom" WIDTH="1%"></TD>
<TD WIDTH="63%"></TD>
<TD VALIGN="bottom" WIDTH="1%"></TD>
<TD WIDTH="18%"></TD>
<TD VALIGN="bottom" WIDTH="1%"></TD>
<TD WIDTH="1%"></TD></TR>


<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:8.5pt">
<TD VALIGN="bottom">Large&nbsp;accelerated&nbsp;filer</TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="bottom">&#9746;</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="bottom">Accelerated&nbsp;filed</TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="bottom">&#9744;</TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:8.5pt">
<TD VALIGN="bottom">Non-accelerated filer</TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="bottom">&#9744;&nbsp;&nbsp;(Do not check if a smaller reporting company)</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="bottom">Smaller&nbsp;reporting&nbsp;company</TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="bottom">&#9744;</TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:8.5pt">
<TD VALIGN="bottom"></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="bottom"></TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="bottom">Emerging&nbsp;growth&nbsp;company</TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="bottom">&#9744;</TD></TR>
</TABLE> <P STYLE="margin-top:3pt; margin-bottom:0pt; text-indent:3%; font-size:8.5pt; font-family:Times New Roman">If an emerging growth company, indicate by check mark if the registrant has elected not to use the extended
transition period for complying with any new or revised financial accounting standards provided pursuant to Section&nbsp;7(a)(2)(B) of the Securities Act.&nbsp;&nbsp;&#9744; </P>
<P STYLE="margin-top:3pt; margin-bottom:0pt; text-indent:3%; font-size:8.5pt; font-family:Times New Roman">If applicable, place an X in the box to designate the appropriate rule provision relied upon in conducting this transaction: </P>
<P STYLE="margin-top:3pt; margin-bottom:0pt; text-indent:3%; font-size:8.5pt; font-family:Times New Roman">Exchange Act Rule <FONT STYLE="white-space:nowrap">13e-4(i)</FONT> (Cross-Border Issuer Tender Offer)&nbsp;&nbsp;&#9744; </P>
<P STYLE="margin-top:3pt; margin-bottom:0pt; text-indent:3%; font-size:8.5pt; font-family:Times New Roman">Exchange Act Rule <FONT STYLE="white-space:nowrap">14d-1(d)</FONT> (Cross-Border Third-Party Tender Offer)&nbsp;&nbsp;&#9744; </P>
<P STYLE="font-size:3pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P><center> <P STYLE="line-height:6.0pt;margin-top:0pt;margin-bottom:2pt;border-bottom:1.00pt solid #000000;width:21%">&nbsp;</P></center>
<P STYLE="margin-top:3pt; margin-bottom:0pt; text-indent:3%; font-size:8.5pt; font-family:Times New Roman"><B>The registrant hereby amends this registration statement on such date or dates as may be necessary to delay its effective date until the
registrant shall file a further amendment which specifically states that this registration statement shall thereafter become effective in accordance with Section&nbsp;8(a) of the Securities Act of 1933 or until this registration statement shall
become effective on such date as the Commission, acting pursuant to said Section&nbsp;8(a), may determine. </B></P> <P STYLE="font-size:5pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P>
<P STYLE="line-height:1.0pt;margin-top:0pt;margin-bottom:0pt;border-bottom:1px solid #000000">&nbsp;</P> <P STYLE="line-height:3.0pt;margin-top:0pt;margin-bottom:2pt;border-bottom:1px solid #000000">&nbsp;</P>
</DIV></Center>


<p Style='page-break-before:always'>
<HR  SIZE="3" style="COLOR:#999999" WIDTH="100%" ALIGN="CENTER">

<Center><DIV STYLE="width:8.5in" align="left">
  <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="center"><B>Explanatory Note </B></P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">NuStar Energy L.P. is filing this Amendment No.&nbsp;4 (this &#147;Amendment&#148;), to its Registration Statement on <FONT
STYLE="white-space:nowrap">Form&nbsp;S-4</FONT> (File No.&nbsp;333-223671) (the &#147;Registration Statement&#148;) as an exhibit-only filing to file Exhibit&nbsp;5.1, Exhibit&nbsp;8.1 and Exhibit&nbsp;8.2 to the Registration Statement. Accordingly,
this Amendment consists of only the cover page, this explanatory note, Part&nbsp;II of the Registration Statement, the signature page to the Registration Statement and Exhibit&nbsp;5.1, Exhibit&nbsp;8.1 and Exhibit&nbsp;8.2. The joint proxy
statement/prospectus contained in the Registration Statement is unchanged and has been omitted. </P>
</DIV></Center>


<p Style='page-break-before:always'>
<HR  SIZE="3" style="COLOR:#999999" WIDTH="100%" ALIGN="CENTER">

<Center><DIV STYLE="width:8.5in" align="left">
 <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="center"><B>PART II. </B></P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="center"><B>INFORMATION NOT REQUIRED IN PROSPECTUS </B></P> <P STYLE="font-size:12pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P>
<TABLE STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt" BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR style = "page-break-inside:avoid">
<TD WIDTH="9%" VALIGN="top" ALIGN="left"><B>Item&nbsp;20.</B></TD>
<TD ALIGN="left" VALIGN="top"><B></B><B><I>Indemnification of Directors and Officers</I></B><B> </B></TD></TR></TABLE> <P STYLE="margin-top:6pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman"><FONT
STYLE="white-space:nowrap">Section&nbsp;17-108</FONT> of the Delaware Revised Uniform Limited Partnership Act empowers a Delaware limited partnership to indemnify and hold harmless any partner or other person from and against all claims and demands
whatsoever. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">The Sixth Amended and Restated Agreement of Limited Partnership of NuStar Energy L.P. (the &#147;Partnership&#148;), dated as
of November&nbsp;30, 2017 provides that the Partnership will indemnify (1)&nbsp;Riverwalk Logistics, L.P., (2) any departing general partner, (3)&nbsp;any person who is or was an affiliate of Riverwalk Logistics, L.P. or any departing general
partner, (4)&nbsp;any person who is or was a member, partner, officer director, employee, agent or trustee of Riverwalk Logistics, L.P. or any departing general partner or any affiliate of Riverwalk Logistics, L.P. or any departing general partner
or (5)&nbsp;any person who is or was serving at the request of Riverwalk Logistics, L.P. or any departing general partner or any affiliate of any such person, any affiliate of Riverwalk Logistics, L.P., or any fiduciary or trustee of another person
(each, an &#147;Indemnitee&#148;), to the fullest extent permitted by law, from and against any and all losses, claims, damages, liabilities (joint or several), expenses (including, without limitation, legal fees and expenses), judgments, fines,
penalties, interest, settlements and other amounts arising from any and all claims, demands, actions, suits or proceedings, whether civil, criminal, administrative or investigative, in which any Indemnitee may be involved, or is threatened to be
involved, as a party or otherwise, by reason of its status as a Indemnitee; provided that in each case the Indemnitee acted in good faith and in a manner that such Indemnitee reasonably believed to be in or not opposed to the best interests of the
Partnership and, with respect to any criminal proceeding, had no reasonable cause to believe its conduct was unlawful. The termination of any action, suit or proceeding by judgment, order, settlement, conviction or upon a plea of <I>nolo contendere,
</I>or its equivalent, shall not create an assumption that the Indemnitee acted in a manner contrary to that specified above. Any indemnification under these provisions will be only out of the assets of Partnership, and Riverwalk Logistics, L.P.
shall not be personally liable for, or have any obligation to contribute or lend funds or assets to the Partnership to enable it to effectuate, such indemnification. The Partnership is authorized to purchase (or to reimburse Riverwalk Logistics,
L.P. or its affiliates for the cost of) insurance against liabilities asserted against and expenses incurred by such persons in connection with the Partnership&#146;s activities, regardless of whether the Partnership would have the power to
indemnify such person against such liabilities under the provisions described above. </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman"><FONT STYLE="white-space:nowrap">Section&nbsp;18-108</FONT> of the Delaware Limited Liability Company Act provides that, subject to such
standards and restrictions, if any, as are set forth in its limited liability company agreement, a Delaware limited liability company may, and shall have the power to, indemnify and hold harmless any member or manager or other person from and
against any and all claims and demands whatsoever. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">The First Amended and Restated Limited Liability Company Agreement of NuStar GP, LLC,
as amended, contains the following provisions relating to indemnification of, among others, its officers and directors: </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">&#147;15.
INDEMNIFICATION. (a)&nbsp;<U>Right to Indemnification</U>. Each person who was or is made a party or is threatened to be made a party to or is otherwise involved in any action, suit or proceeding, whether civil, criminal, administrative, or
investigative (hereinafter a &#147;proceeding&#148;), by reason of the fact that he or she is or was a director or an officer of the Company or is or was serving at the request of the Company as a director, officer, employee, or agent of another
company or of a partnership, joint venture, trust, or other enterprise, including service with respect to an employee benefit plan (&#147;Indemnitee&#148;), whether the basis of such proceeding is alleged action in an official capacity as a
director, officer, employee, or agent or in any other capacity while serving as a director, officer, employee, or agent, shall be indemnified and held harmless by the Company to the fullest extent permitted or required by the Act, as the same exists
or may hereafter be amended (but, in the case of any such amendment, only to the extent that such amendment permits the Company to provide broader indemnification rights than such law permitted the Company to provide prior to such amendment),
against all </P>
</DIV></Center>


<p Style='page-break-before:always'>
<HR  SIZE="3" style="COLOR:#999999" WIDTH="100%" ALIGN="CENTER">

<Center><DIV STYLE="width:8.5in" align="left">
 <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">
expense, liability and loss (including attorneys&#146; fees, judgments, fines, ERISA excise taxes or penalties and amounts paid in settlement) reasonably incurred or suffered by such Indemnitee
in connection therewith; provided, however, that, except as provided in Section&nbsp;15(c) with respect to proceedings to enforce rights to indemnification, that Company shall indemnify any such Indemnitee in connection with a proceeding (or part
thereof) initiated by such Indemnitee only if such proceeding (or part thereof) was authorized by the Board of Directors of the Company. </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">(b) <U>Right to Advancement of Expenses</U>. The right to indemnification conferred in this Section&nbsp;15(b) shall include the right to be
advanced by the Company the expenses (including, without limitation, attorneys&#146; fees and expenses) incurred in defending any such proceeding in advance of its final disposition (hereinafter an &#147;advancement of expenses&#148;); provided,
however, that, if the Act so requires, an advancement of expenses incurred by an Indemnitee in his or her capacity as a director or officer (and not in any other capacity in which service was or is rendered by such Indemnitee, including, without
limitation, service to an employee benefit plan) shall be made only upon delivery to the Company of an undertaking (an &#147;Undertaking&#148;), by or on behalf of such Indemnitee, to repay all amounts so advanced if it shall ultimately be
determined by final judicial decision from which there is no further right to appeal (a &#147;Final Adjudication&#148;) that such Indemnitee is not entitled to be indemnified for such expenses under this Section&nbsp;15(b) or otherwise. The rights
to indemnification and to the advancement of expenses conferred in Sections 15(a) and 15(b) shall be contract rights and such rights shall continue as to an Indemnitee who has ceased to be a director, officer, employee, or agent and shall inure to
the benefit of the Indemnitee&#146;s heirs, executors and administrators. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">(c) <U>Right of Indemnitee to Bring Suit</U>. If a claim under
Section&nbsp;15(a) or 15(b) is not paid in full by the Company within 60 calendar days after a written claim has been received by the Company, except in the case of a claim for an advancement of expenses, in which case the applicable period shall be
20 calendar days, the Indemnitee may at any time thereafter bring suit against the Company to recover the unpaid amount of the claim. If successful in whole or in part in any such suit, or in a suit brought by the Company to recover an advancement
of expenses pursuant to the terms of an Undertaking, the Indemnitee shall be entitled to be paid also the expense of prosecuting or defending such suit. In any suit brought by the Indemnitee to enforce a right to indemnification hereunder (but not
in a suit brought by the Indemnitee to enforce a right to an advancement of expenses) it shall be a defense that the Indemnitee has not met any applicable standard for indemnification set forth in the Act. Neither the failure of the Company
(including its Board of Directors, independent legal counsel, or its Member) to have made a determination prior to the commencement of such suit that indemnification of the Indemnitee is proper in the circumstances because the Indemnitee has met the
applicable standard of conduct set forth in the Act, nor an actual determination by the Company (including its Board of Directors, independent legal counsel, or its Member) that the Indemnitee has not met such applicable standard of conduct shall
create a presumption that the Indemnitee has not met the applicable standard of conduct or, in the case of such a suit brought by the Indemnitee, be a defense to such suit. If any suit brought by the Indemnitee to enforce a right to indemnification
or to an advancement of expenses hereunder, or brought by the Company to recover an advancement of expenses pursuant to the terms of an Undertaking, the burden of proving that the Indemnitee is not entitled to be indemnified, or to such advancement
of expenses, under this Section&nbsp;15 or otherwise, shall be on the Company. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">(d)
<U><FONT STYLE="white-space:nowrap">Non-Exclusivity</FONT> of Rights</U>. The rights to indemnification and to the advancement of expenses conferred in this Section&nbsp;15 shall not be exclusive of any other right which any person may have or
hereafter acquire under any statute, this Agreement, vote of members, or disinterested directors or otherwise.&#148; </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">We have obtained
directors&#146; and officers&#146; insurance to protect the Partnership and the officers and directors of its general partner against losses arising from certain claims, including claims under the Securities Act of 1933. </P>
</DIV></Center>


<p Style='page-break-before:always'>
<HR  SIZE="3" style="COLOR:#999999" WIDTH="100%" ALIGN="CENTER">

<Center><DIV STYLE="width:8.5in" align="left">

<TABLE STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt" BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR style = "page-break-inside:avoid">
<TD WIDTH="9%" VALIGN="top" ALIGN="left"><B>Item&nbsp;21.</B></TD>
<TD ALIGN="left" VALIGN="top"><B></B><B><I>Exhibits and Financial Statement Schedules</I></B><B> </B></TD></TR></TABLE> <P STYLE="margin-top:6pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">The following Exhibits
are filed as a part of, or are incorporated by reference in, this Registration Statement: </P> <P STYLE="font-size:12pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%" BORDER="0" STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt" ALIGN="center">


<TR>
<TD></TD>
<TD VALIGN="bottom" WIDTH="8%"></TD>
<TD WIDTH="88%"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt">
<TD VALIGN="bottom" NOWRAP ALIGN="center"> <P STYLE=" margin-top:0pt ; margin-bottom:0pt; border-bottom:1.00pt solid #000000; width:37.30pt; display:inline; font-size:8pt; font-family:Times New Roman; " ALIGN="center">Exhibit&nbsp;No.</P></TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="bottom" NOWRAP> <P STYLE=" margin-top:0pt ; margin-bottom:0pt; border-bottom:1.00pt solid #000000; width:33.30pt; display:inline; font-size:8pt; font-family:Times New Roman; ">Document</P></TD></TR>


<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>&nbsp;&nbsp;2.1</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top">Agreement and Plan of Merger, dated as of February&nbsp;7, 2018, by and among NuStar Energy L.P., Riverwalk Logistics, L.P., NuStar GP, LLC, Marshall Merger Sub LLC, Riverwalk Holdings, LLC and NuStar GP Holdings, LLC (included as
Annex A to the proxy statement/prospectus in Part I of this Registration Statement).</TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>&nbsp;&nbsp;3.1</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top">Form of Seventh Amended and Restated Agreement of Limited Partnership of NuStar Energy L.P. (included as Annex B to the proxy statement/prospectus in Part I of this Registration Statement).</TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>&nbsp;&nbsp;3.2</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top">Form of Second Amended and Restated Limited Liability Company Agreement of NuStar GP, LLC (included as Annex C to the proxy statement/prospectus in Part I of this Registration Statement).</TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>&nbsp;&nbsp;5.1+</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top"><A HREF="d543382dex51.htm">Opinion of Sidley Austin LLP as to the legality of the securities being registered. </A></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>&nbsp;&nbsp;8.1+</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top"><A HREF="d543382dex81.htm">Opinion of Sidley Austin LLP as to certain tax matters. </A></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>&nbsp;&nbsp;8.2+</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top"><A HREF="d543382dex82.htm">Opinion of Wachtell, Lipton, Rosen&nbsp;&amp; Katz as to certain tax matters. </A></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>10.1</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top">Support Agreement, dated as of February&nbsp;7, 2018, by and among NuStar Energy L.P., Marshall Merger Sub LLC, WGL Holdings, LLC, William E. Greehey and NuStar GP Holdings, LLC (included as Annex D to the proxy statement/prospectus
in Part I of this Registration Statement).</TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>23.1+</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top"><A HREF="d543382dex51.htm">Consent of Sidley Austin LLP (contained in Exhibit 5.1 hereto). </A></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>23.2+</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top"><A HREF="d543382dex81.htm">Consent of Sidley Austin LLP (contained in Exhibit 8.1 hereto). </A></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>23.3+</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top"><A HREF="d543382dex82.htm">Consent of Wachtell, Lipton, Rosen&nbsp;&amp; Katz (contained in Exhibit 8.2 hereto). </A></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>23.4*</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top"><A HREF="http://www.sec.gov/Archives/edgar/data/1110805/000119312518185655/d543382dex234.htm">Consent of KPMG LLP, independent registered public accounting firm. </A></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>23.5*</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top"><A HREF="http://www.sec.gov/Archives/edgar/data/1110805/000119312518185655/d543382dex235.htm">Consent of KPMG LLP, independent registered public accounting firm. </A></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>24.1*</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top"><A HREF="http://www.sec.gov/Archives/edgar/data/1110805/000119312518082766/d543382ds4.htm">Power of Attorney (included on signature page to the registration statement). </A></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>99.1*</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top"><A HREF="http://www.sec.gov/Archives/edgar/data/1110805/000119312518082766/d543382dex991.htm">Consent of Robert W. Baird&nbsp;&amp; Co. Incorporated. </A></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>99.2*</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top"><A HREF="http://www.sec.gov/Archives/edgar/data/1110805/000119312518082766/d543382dex992.htm">Consent of William B. Burnett. </A></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>99.3*</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top"><A HREF="http://www.sec.gov/Archives/edgar/data/1110805/000119312518082766/d543382dex993.htm">Consent of James F. Clingman, Jr. </A></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" NOWRAP>99.4*</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="top"><A HREF="http://www.sec.gov/Archives/edgar/data/1110805/000119312518082766/d543382dex994.htm">Consent of Jelynne LeBlanc-Burley. </A></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="8"></TD>
<TD HEIGHT="8" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="bottom">99.5*</TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="bottom"> <P STYLE=" margin-top:0pt ; margin-bottom:0pt; margin-left:1.00em; text-indent:-1.00em; font-size:10pt; font-family:Times New Roman"><A HREF="http://www.sec.gov/Archives/edgar/data/1110805/000119312518185655/d543382dex995.htm">Form
 of Proxy Card for NuStar GP Holdings, LLC. </A></P></TD></TR></TABLE>  <P STYLE="line-height:8.0pt;margin-top:0pt;margin-bottom:2pt;border-bottom:1px solid #000000;width:10%">&nbsp;</P>
<TABLE STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt" BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR style = "page-break-inside:avoid">
<TD WIDTH="4%" VALIGN="top" ALIGN="left">*</TD>
<TD ALIGN="left" VALIGN="top">Indicates exhibits previously filed </TD></TR></TABLE>
<TABLE STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt" BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR style = "page-break-inside:avoid">
<TD WIDTH="4%" VALIGN="top" ALIGN="left">+</TD>
<TD ALIGN="left" VALIGN="top">Indicates exhibits filed herewith </TD></TR></TABLE> <P STYLE="font-size:18pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P>
<TABLE STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt" BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR style = "page-break-inside:avoid">
<TD WIDTH="9%" VALIGN="top" ALIGN="left"><B><I></I></B><B>Item&nbsp;22</B><B><I>.</I></B></TD>
<TD ALIGN="left" VALIGN="top"><B><I>Undertakings </I></B></TD></TR></TABLE> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">(a) The undersigned registrants hereby undertake: </P>
<P STYLE="margin-top:6pt; margin-bottom:0pt; margin-left:4%; text-indent:4%; font-size:10pt; font-family:Times New Roman">(1) To file, during any period in which offers or sales are being made, a post-effective amendment to this registration
statement: </P> <P STYLE="margin-top:6pt; margin-bottom:0pt; margin-left:8%; text-indent:4%; font-size:10pt; font-family:Times New Roman">(i) To include any prospectus required by section 10(a)(3) of the Securities Act of 1933; </P>
<P STYLE="margin-top:6pt; margin-bottom:0pt; margin-left:8%; text-indent:4%; font-size:10pt; font-family:Times New Roman">(ii) To reflect in the prospectus any facts or events arising after the effective date of the registration statement (or the
most recent post-effective amendment thereof) which, individually or in the aggregate, represent a fundamental change in the information set forth in the registration statement. </P>
</DIV></Center>


<p Style='page-break-before:always'>
<HR  SIZE="3" style="COLOR:#999999" WIDTH="100%" ALIGN="CENTER">

<Center><DIV STYLE="width:8.5in" align="left">
 <P STYLE="margin-top:0pt; margin-bottom:0pt; margin-left:8%; font-size:10pt; font-family:Times New Roman">
Notwithstanding the foregoing, any increase or decrease in volume of securities offered (if the total dollar value of securities offered would not exceed that which was registered) and any
deviation from the low or high end of the estimated maximum offering range may be reflected in the form of prospectus filed with the Commission pursuant to Rule 424(b) if, in the aggregate, the changes in volume and price represent no more than a
20% change in the maximum aggregate offering price set forth in the &#147;Calculation of Registration Fee&#148; table in the effective registration statement; and </P>
<P STYLE="margin-top:6pt; margin-bottom:0pt; margin-left:8%; text-indent:4%; font-size:10pt; font-family:Times New Roman">(iii) To include any material information with respect to the plan of distribution not previously disclosed in the registration
statement or any material change to such information in the registration statement; </P> <P STYLE="margin-top:6pt; margin-bottom:0pt; margin-left:4%; text-indent:4%; font-size:10pt; font-family:Times New Roman">(2) That, for the purpose of
determining any liability under the Securities Act of 1933, each such post-effective amendment shall be deemed to be a new registration statement relating to the securities offered therein, and the offering of such securities at that time shall be
deemed to be the initial bona fide offering thereof. </P> <P STYLE="margin-top:6pt; margin-bottom:0pt; margin-left:4%; text-indent:4%; font-size:10pt; font-family:Times New Roman">(3) To remove from registration by means of a post-effective
amendment any of the securities being registered which remain unsold at the termination of the offering. </P> <P STYLE="margin-top:6pt; margin-bottom:0pt; margin-left:4%; text-indent:4%; font-size:10pt; font-family:Times New Roman">(4) That, for the
purpose of determining liability under the Securities Act of 1933 to any purchaser: if the registrant is subject to Rule 430C, each prospectus filed pursuant to Rule 424(b) as part of a registration statement relating to an offering, other than
registration statements relying on Rule 430B or other than prospectuses filed in reliance on Rule 430A, shall be deemed to be part of and included in the registration statement as of the date it is first used after effectiveness. <I>Provided</I>,
<I>however</I>, that no statement made in a registration statement or prospectus that is part of the registration statement or made in a document incorporated or deemed incorporated by reference into the registration statement or prospectus that is
part of the registration statement will, as to a purchaser with a time of contract of sale prior to such first use, supersede or modify any statement that was made in the registration statement or prospectus that was part of the registration
statement or made in any such document immediately prior to such date of first use. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">(b) The undersigned registrants hereby undertake
that, for purposes of determining any liability under the Securities Act of 1933, each filing of the registrant&#146;s annual report pursuant to section 13(a) or section 15(d) of the Securities Exchange Act of 1934 (and, where applicable, each
filing of an employee benefit plan&#146;s annual report pursuant to section 15(d) of the Securities Exchange Act of 1934) that is incorporated by reference in the registration statement shall be deemed to be a new registration statement relating to
the securities offered therein, and the offering of such securities at that time shall be deemed to be the initial bona fide offering thereof. </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">(c) The undersigned registrants hereby undertake that prior to any public reoffering of the securities registered hereunder through use of a
prospectus which is a part of this registration statement, by any person or party who is deemed to be an underwriter within the meaning of Rule 145(c), the issuer undertakes that such reoffering prospectus will contain the information called for by
the applicable registration form with respect to reofferings by persons who may be deemed underwriters, in addition to the information called for by the other items of the applicable form. </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">(d) That every prospectus (1)&nbsp;that is filed pursuant to paragraph (e)&nbsp;immediately preceding, or (2)&nbsp;that purports to meet the
requirements of Section&nbsp;10(a)(3) of the Securities Act of 1933 and is used in connection with an offering of securities subject to Rule 415, will be filed as a part of an amendment to the registration statement and will not be used until such
amendment is effective, and that, for purposes of determining any liability under the Securities Act of 1933, each such post-effective amendment shall be deemed to be a new registration statement relating to the securities offered therein, and the
offering of such securities at that time shall be deemed to be the initial bona fide offering thereof. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">(e) The undersigned registrant
hereby undertakes to respond to requests for information that is incorporated by reference into this prospectus pursuant to Items 4, 10(b), 11, or 13 of this form, within one business day of receipt of such request, and to send the incorporated
documents by first class mail or other equally prompt means. This includes information contained in documents filed subsequent to the effective date of this registration statement through the date of responding to the request. </P>
</DIV></Center>


<p Style='page-break-before:always'>
<HR  SIZE="3" style="COLOR:#999999" WIDTH="100%" ALIGN="CENTER">

<Center><DIV STYLE="width:8.5in" align="left">
 <P STYLE="margin-top:0pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">(f) The undersigned registrant hereby undertakes to supply by means of a post-effective
amendment all information concerning a transaction, and the company being acquired involved therein, that was not the subject of and included in this registration statement when it became effective. </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">Insofar as indemnification for liabilities arising under the Securities Act of 1933 may be permitted to directors, officers and controlling
persons of the registrant pursuant to the foregoing provisions, or otherwise, the registrant has been advised that in the opinion of the Securities and Exchange Commission such indemnification is against public policy as expressed in the Act and is,
therefore, unenforceable. In the event that a claim for indemnification against such liabilities (other than the payment by the registrant of expenses incurred or paid by a director, officer or controlling person of the registrant in the successful
defense of any action, suit or proceeding) is asserted by such director, officer or controlling person in connection with the securities being registered, the registrant will, unless in the opinion of its counsel the matter has been settled by
controlling precedent, submit to a court of appropriate jurisdiction the question whether such indemnification by it is against public policy as expressed in the Act and will be governed by the final adjudication of such issue. </P>
</DIV></Center>


<p Style='page-break-before:always'>
<HR  SIZE="3" style="COLOR:#999999" WIDTH="100%" ALIGN="CENTER">

<Center><DIV STYLE="width:8.5in" align="left">
 <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="center"><B><A NAME="ii543382_power"></A>SIGNATURES </B></P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">Pursuant to the requirements of the Securities Act of 1933, the Registrant has duly caused this Registration Statement to be signed on its
behalf by the undersigned, thereunto duly authorized, in the City of San Antonio, State of Texas on June&nbsp;14, 2018. </P>  <P STYLE="font-size:12pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P><DIV ALIGN="right">
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="40%" BORDER="0" STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt">


<TR>
<TD WIDTH="11%"></TD>
<TD VALIGN="bottom" WIDTH="1%"></TD>
<TD WIDTH="88%"></TD></TR>


<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top" COLSPAN="3"><B>NUSTAR ENERGY L.P.</B></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="16"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top">By:&nbsp;&nbsp;&nbsp;&nbsp;</TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="bottom"> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">RIVERWALK LOGISTICS, L.P.,</P> <P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:10pt; font-family:Times New Roman">its general
partner</P></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="16"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top">By:&nbsp;&nbsp;&nbsp;&nbsp;</TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="bottom"> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">NUSTAR GP, LLC,</P> <P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:10pt; font-family:Times New Roman">its general
partner</P></TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="16"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top">By:&nbsp;&nbsp;&nbsp;&nbsp;</TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="bottom"> <P STYLE="margin-top:0pt; margin-bottom:0pt; border-bottom:1px solid #000000; font-size:10pt; font-family:Times New Roman">/s/ Bradley C. Barron</P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">Name: Bradley C. Barron</P> <P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:10pt; font-family:Times New Roman">Title: <I>President and Chief Executive
Officer</I></P></TD></TR>
</TABLE></DIV> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">Pursuant to the requirements of the Securities Act of 1933, as amended, this Registration Statement has
been signed below by the following persons in the capacities and on the dates indicated below. </P> <P STYLE="font-size:12pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%" BORDER="0" STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt">


<TR>
<TD WIDTH="31%"></TD>
<TD VALIGN="bottom"></TD>
<TD WIDTH="49%"></TD>
<TD VALIGN="bottom" WIDTH="1%"></TD>
<TD WIDTH="18%"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt">
<TD VALIGN="bottom" ALIGN="center"><B>Signature</B></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="bottom" ALIGN="center"><B>Title</B></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="bottom" ALIGN="center"><B>Date</B></TD></TR>


<TR STYLE="font-size:1pt">
<TD HEIGHT="16"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top"> <P STYLE="margin-top:0pt; margin-bottom:0pt; border-bottom:1px solid #000000; font-size:10pt; font-family:Times New Roman" ALIGN="center">*</P>
<P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:10pt; font-family:Times New Roman" ALIGN="center">William E. Greehey</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"> <P STYLE=" margin-top:0pt ; margin-bottom:0pt; margin-left:1.00em; text-indent:-1.00em; font-size:10pt; font-family:Times New Roman" ALIGN="center">Chairman of the Board</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" NOWRAP ALIGN="center">June&nbsp;14,&nbsp;2018</TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="16"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top"> <P STYLE="margin-top:0pt; margin-bottom:0pt; border-bottom:1px solid #000000; font-size:10pt; font-family:Times New Roman" ALIGN="center">/s/ Bradley C. Barron</P>
<P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:10pt; font-family:Times New Roman" ALIGN="center">Bradley C. Barron</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"> <P STYLE=" margin-top:0pt ; margin-bottom:0pt; margin-left:1.00em; text-indent:-1.00em; font-size:10pt; font-family:Times New Roman" ALIGN="center">President, Chief Executive Officer and Director<BR>(Principal
Executive Officer)</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" NOWRAP ALIGN="center">June 14, 2018</TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="16"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top"> <P STYLE="margin-top:0pt; margin-bottom:0pt; border-bottom:1px solid #000000; font-size:10pt; font-family:Times New Roman" ALIGN="center">*</P>
<P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:10pt; font-family:Times New Roman" ALIGN="center">Thomas R. Shoaf</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"> <P STYLE=" margin-top:0pt ; margin-bottom:0pt; margin-left:1.00em; text-indent:-1.00em; font-size:10pt; font-family:Times New Roman" ALIGN="center">Executive Vice President and Chief Financial Officer<BR>(Principal
Financial Officer)</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" NOWRAP ALIGN="center">June 14, 2018</TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="16"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top"> <P STYLE="margin-top:0pt; margin-bottom:0pt; border-bottom:1px solid #000000; font-size:10pt; font-family:Times New Roman" ALIGN="center">*</P>
<P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:10pt; font-family:Times New Roman" ALIGN="center">Jorge A. del Alamo</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"> <P STYLE="margin-top:0pt; margin-bottom:0pt; margin-left:1.00em; text-indent:-1.00em; font-size:10pt; font-family:Times New Roman" ALIGN="center">Senior Vice President and Controller</P>
<P STYLE="margin-top:0pt; margin-bottom:1pt; margin-left:1.00em; text-indent:-1.00em; font-size:10pt; font-family:Times New Roman" ALIGN="center">(Principal Accounting Officer)</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" NOWRAP ALIGN="center">June 14, 2018</TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="16"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top"> <P STYLE="margin-top:0pt; margin-bottom:0pt; border-bottom:1px solid #000000; font-size:10pt; font-family:Times New Roman" ALIGN="center">*</P>
<P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:10pt; font-family:Times New Roman" ALIGN="center">J. Dan Bates</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"> <P STYLE=" margin-top:0pt ; margin-bottom:0pt; margin-left:1.00em; text-indent:-1.00em; font-size:10pt; font-family:Times New Roman" ALIGN="center">Director</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" NOWRAP ALIGN="center">June 14, 2018</TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="16"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top"> <P STYLE="margin-top:0pt; margin-bottom:0pt; border-bottom:1px solid #000000; font-size:10pt; font-family:Times New Roman" ALIGN="center">*</P>
<P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:10pt; font-family:Times New Roman" ALIGN="center">Dan J. Hill</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"> <P STYLE=" margin-top:0pt ; margin-bottom:0pt; margin-left:1.00em; text-indent:-1.00em; font-size:10pt; font-family:Times New Roman" ALIGN="center">Director</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" NOWRAP ALIGN="center">June 14, 2018</TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="16"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top"> <P STYLE="margin-top:0pt; margin-bottom:0pt; border-bottom:1px solid #000000; font-size:10pt; font-family:Times New Roman" ALIGN="center">*</P>
<P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:10pt; font-family:Times New Roman" ALIGN="center">Robert J. Munch</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"> <P STYLE=" margin-top:0pt ; margin-bottom:0pt; margin-left:1.00em; text-indent:-1.00em; font-size:10pt; font-family:Times New Roman" ALIGN="center">Director</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" NOWRAP ALIGN="center">June 14, 2018</TD></TR>
<TR STYLE="font-size:1pt">
<TD HEIGHT="16"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="top"> <P STYLE="margin-top:0pt; margin-bottom:0pt; border-bottom:1px solid #000000; font-size:10pt; font-family:Times New Roman" ALIGN="center">*</P>
<P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:10pt; font-family:Times New Roman" ALIGN="center">W. Grady Rosier</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" ALIGN="center"> <P STYLE=" margin-top:0pt ; margin-bottom:0pt; margin-left:1.00em; text-indent:-1.00em; font-size:10pt; font-family:Times New Roman" ALIGN="center">Director</P></TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="top" NOWRAP ALIGN="center">June 14, 2018</TD></TR>
</TABLE>  <P STYLE="font-size:12pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="40%" BORDER="0" STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt">


<TR>
<TD WIDTH="13%"></TD>
<TD VALIGN="bottom" WIDTH="1%"></TD>
<TD WIDTH="86%"></TD></TR>


<TR STYLE="font-size:1pt">
<TD HEIGHT="16"></TD>
<TD HEIGHT="16" COLSPAN="2"></TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="bottom">*By:</TD>
<TD VALIGN="bottom" STYLE=" BORDER-BOTTOM:1px solid #000000">&nbsp;</TD>
<TD VALIGN="top" STYLE="BORDER-BOTTOM:1px solid #000000">/s/ Bradley C. Barron</TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="bottom">Name:</TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="bottom">Bradley C. Barron</TD></TR>
<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt">
<TD VALIGN="bottom">Title:</TD>
<TD VALIGN="bottom">&nbsp;</TD>
<TD VALIGN="bottom"><I>Attorney-in-Fact</I></TD></TR>
</TABLE>
</DIV></Center>

</BODY></HTML>
</TEXT>
</DOCUMENT>
<DOCUMENT>
<TYPE>EX-5.1
<SEQUENCE>2
<FILENAME>d543382dex51.htm
<DESCRIPTION>EX-5.1
<TEXT>
<HTML><HEAD>
<TITLE>EX-5.1</TITLE>
</HEAD>
 <BODY BGCOLOR="WHITE">

<Center><DIV STYLE="width:8.5in" align="left">
 <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="right"><B>EXHIBIT 5.1 </B></P> <P STYLE="font-size:12pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%" BORDER="0" STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:8pt" ALIGN="center">


<TR>
<TD WIDTH="26%"></TD>
<TD VALIGN="bottom" WIDTH="2%"></TD>
<TD WIDTH="72%"></TD></TR>


<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt">
<TD VALIGN="top"> <P STYLE="font-size:12pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P> <P STYLE="margin-top:0pt;margin-bottom:1pt; margin-left:1.00em; text-indent:-1.00em">


<IMG SRC="g543382g92h28.jpg" ALT="LOGO">
</P></TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="bottom"> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman">SIDLEY AUSTIN LLP</P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman">1000 LOUISIANA STREET</P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman">SUITE 6000</P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman">HOUSTON, TX 77002</P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman">+1 713 495 4500</P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman">+1 713 495 7799 FAX</P>
<P STYLE="font-size:12pt; margin-top:0pt; margin-bottom:0pt">&nbsp;</P> <P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:8pt; font-family:Times New Roman">AMERICA &#149; ASIA PACIFIC &#149; EUROPE</P></TD></TR>
</TABLE> <P STYLE="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="center">June&nbsp;14, 2018 </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">NuStar Energy L.P. </P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">19003
<FONT STYLE="white-space:nowrap">IH-10</FONT> West </P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">San Antonio, Texas 78257 </P> <P STYLE="font-size:12pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P>
<TABLE STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt" BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR style = "page-break-inside:avoid">
<TD WIDTH="5%">&nbsp;</TD>
<TD WIDTH="5%" VALIGN="top" ALIGN="left">Re:</TD>
<TD ALIGN="left" VALIGN="top">Registration Statement on Form <FONT STYLE="white-space:nowrap">S-4</FONT> </TD></TR></TABLE> <P STYLE="margin-top:18pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">Ladies and Gentlemen: </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:8%; font-size:10pt; font-family:Times New Roman">We refer to the Registration Statement on Form <FONT STYLE="white-space:nowrap">S-4</FONT> (the &#147;<U>Registration Statement</U>&#148;)
being filed by NuStar Energy L.P., a Delaware limited partnership (the &#147;<U>Partnership</U>&#148;), with the Securities and Exchange Commission under the Securities Act of 1933, as amended (the &#147;<U>Securities Act</U>&#148;), relating to the
registration of common units representing limited partner interests in the Partnership (the &#147;<U>Common Units</U>&#148;). The Common Units are to be issued pursuant to the terms of the Agreement and Plan of Merger, dated as of February&nbsp;7,
2018 (the &#147;<U>Merger Agreement</U>&#148;), by and among the Partnership, Riverwalk Logistics, L.P., a Delaware limited partnership and the general partner of the Partnership (the &#147;<U>General Partner</U>&#148;), NuStar GP, LLC, a Delaware
limited liability company and the general partner of the General Partner (&#147;<U>NuStar GP</U>&#148;), Marshall Merger Sub LLC, a Delaware limited liability company and a wholly owned subsidiary of the Partnership (&#147;<U>Merger Sub</U>&#148;),
NuStar GP Holdings, LLC, a Delaware limited liability company (&#147;<U>NSH</U>&#148;), and Riverwalk Holdings, LLC, a Delaware limited liability company and a wholly owned subsidiary of NSH, which provides, among other things, that Merger Sub will
merge with and into NSH, with NSH surviving the merger and becoming a wholly owned subsidiary of the Partnership (the &#147;<U>Merger</U>&#148;). The Merger is subject to satisfaction or waiver of a number of conditions. </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:8%; font-size:10pt; font-family:Times New Roman">This opinion letter is being delivered in accordance with the requirements of Item 601(b)(5) of Regulation
<FONT STYLE="white-space:nowrap">S-K</FONT> under the Securities Act. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:8%; font-size:10pt; font-family:Times New Roman">We have examined the: (i)&nbsp;Registration Statement;
(ii)&nbsp;the Merger Agreement; (iii)&nbsp;the Certificate of Limited Partnership of the Partnership, as amended to date; (iv)&nbsp;the Sixth Amended and Restated Agreement of Limited Partnership of the Partnership, dated November&nbsp;30, 2017, as
amended to date; (v)&nbsp;the form of the Seventh Amended and Restated Agreement of Limited Partnership of the Partnership (the &#147;<U>Seventh Partnership Agreement</U>&#148;), which will become effective as of the Effective Time (as defined in
the Merger Agreement); (vi) the Certificate of Limited Partnership of the General Partner, as amended to date; (vii)&nbsp;the First Amended and Restated Limited Partnership Agreement of the General Partner, dated April&nbsp;16, 2001, as amended to
date; (viii)&nbsp;the Certificate of Formation of NuStar GP, as amended to date; </P>
 <p STYLE="margin-top:0pt;margin-bottom:0pt ; font-size:8pt">&nbsp;</P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman" ALIGN="center">Sidley Austin LLP is a
limited liability partnership practicing in affiliation with other Sidley Austin partnerships. </P>

</DIV></Center>


<p Style='page-break-before:always'>
<HR  SIZE="3" style="COLOR:#999999" WIDTH="100%" ALIGN="CENTER">

<Center><DIV STYLE="width:8.5in" align="left">

 <P STYLE="margin-top:0pt;margin-bottom:0pt">


<IMG SRC="g543382g92h28.jpg" ALT="LOGO">
 </P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">NuStar Energy L.P. </P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">June&nbsp;14, 2018 </P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"> Page
 2
 </P> <p STYLE="margin-top:0pt;margin-bottom:0pt ; font-size:8pt">&nbsp;</P>
 <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">
(ix) the First Amended and Restated Limited Liability Company Agreement of NuStar GP, dated June&nbsp;5, 2000, as amended to date; (x)&nbsp;the form of the Second Amended and Restated Limited
Liability Company Agreement of NuStar GP (the &#147;<U>NuStar GP LLC Agreement</U>&#148;), which will become effective as of the Effective Time; and (xi)&nbsp;the resolutions adopted by the Board of Directors of NuStar GP relating to the
Registration Statement, the Merger Agreement and the issuance of the Common Units by the Partnership. We have also examined originals, or copies of originals certified to our satisfaction, of such agreements, documents, certificates and statements
of the Partnership, the General Partner and NuStar GP and other corporate documents and instruments, and have examined such questions of law, as we have considered relevant and necessary as a basis for this opinion letter. We have assumed the
authenticity of all documents submitted to us as originals, the genuineness of all signatures, the legal capacity of all persons, the conformity with the original documents of any copies thereof submitted to us for examination and that each of the
Seventh Partnership Agreement and the NuStar GP LLC Agreement, when they become effective at the Effective Time, will be substantially identical to the forms of each such agreement provided to us for examination. As to facts relevant to the opinions
expressed herein, we have relied without independent investigation or verification upon, and assumed the accuracy and completeness of, certificates, letters and oral and written statements and representations of public officials and officers and
other representatives of NuStar GP. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:8%; font-size:10pt; font-family:Times New Roman">Based on the foregoing, we are of the opinion that when (i)&nbsp;the Registration Statement, as
finally amended, shall have become effective under the Securities Act, (ii)&nbsp;the Merger shall have become effective under the Delaware Limited Liability Company Act (the &#147;<U>DLLCA</U>&#148;) and (iii)&nbsp;a certificate representing each
Common Unit shall have been duly executed, countersigned, registered and delivered to the person entitled thereto or, if the Common Unit is to be issued in uncertificated form, the Partnership&#146;s books shall reflect the issuance of such Common
Unit to the person entitled thereto, in each case in accordance with the terms of the Merger Agreement, (a)&nbsp;each Common Unit has been duly authorized, (b)&nbsp;each Common Unit will be validly issued and (c)&nbsp;the person entitled to such
Common Unit will have no obligation, solely by reason of their ownership of such Common Unit, to make any contributions to the Partnership or any further payments for their purchase of such Common Unit, and such persons will have no personal
liability, solely by reason of their ownership of such Common Unit, to creditors of the Partnership for any of its debts, liabilities or other obligations. </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:8%; font-size:10pt; font-family:Times New Roman">This opinion letter is limited to the Delaware Revised Uniform Limited Partnership Act and the DLLCA. We express no opinion as to the laws,
rules or regulations of any other jurisdiction, including, without limitation, the federal laws of the United States of America or any state securities or blue sky laws. </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:8%; font-size:10pt; font-family:Times New Roman">We hereby consent to the filing of this opinion letter as an Exhibit to the Registration Statement and to all references to our Firm included
in or made a part of the </P>
</DIV></Center>


<p Style='page-break-before:always'>
<HR  SIZE="3" style="COLOR:#999999" WIDTH="100%" ALIGN="CENTER">

<Center><DIV STYLE="width:8.5in" align="left">

 <P STYLE="margin-top:0pt;margin-bottom:0pt">


<IMG SRC="g543382g92h28.jpg" ALT="LOGO">
 </P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">NuStar Energy L.P. </P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">June&nbsp;14, 2018 </P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"> Page
 3
 </P> <p STYLE="margin-top:0pt;margin-bottom:0pt ; font-size:8pt">&nbsp;</P>
 <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">
Registration Statement. In giving such consent, we do not thereby admit that we are in the category of persons whose consent is required under Section&nbsp;7 of the Securities Act. </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; margin-left:54%; text-indent:-2%; font-size:10pt; font-family:Times New Roman">Very truly yours, </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; margin-left:54%; text-indent:-2%; font-size:10pt; font-family:Times New Roman">/s/ Sidley Austin LLP </P>
</DIV></Center>

</BODY></HTML>
</TEXT>
</DOCUMENT>
<DOCUMENT>
<TYPE>EX-8.1
<SEQUENCE>3
<FILENAME>d543382dex81.htm
<DESCRIPTION>EX-8.1
<TEXT>
<HTML><HEAD>
<TITLE>EX-8.1</TITLE>
</HEAD>
 <BODY BGCOLOR="WHITE">

<Center><DIV STYLE="width:8.5in" align="left">
 <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="right"><B>EXHIBIT 8.1 </B></P> <P STYLE="font-size:12pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%" BORDER="0" STYLE="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:8pt" ALIGN="center">


<TR>
<TD WIDTH="26%"></TD>
<TD VALIGN="bottom" WIDTH="2%"></TD>
<TD WIDTH="72%"></TD></TR>


<TR STYLE="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt">
<TD VALIGN="top"> <P STYLE="font-size:12pt;margin-top:0pt;margin-bottom:0pt">&nbsp;</P> <P STYLE="margin-top:0pt;margin-bottom:1pt; margin-left:1.00em; text-indent:-1.00em">


<IMG SRC="g543382g92h28.jpg" ALT="LOGO">
</P></TD>
<TD VALIGN="bottom">&nbsp;&nbsp;</TD>
<TD VALIGN="bottom"> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman">SIDLEY AUSTIN LLP</P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman">1000 LOUISIANA STREET</P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman">SUITE 6000</P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman">HOUSTON, TX 77002</P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman">+1 713 495 4500</P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman">+1 713 495 7799 FAX</P>
<P STYLE="font-size:12pt; margin-top:0pt; margin-bottom:0pt">&nbsp;</P> <P STYLE="margin-top:0pt; margin-bottom:1pt; font-size:8pt; font-family:Times New Roman">AMERICA &#149; ASIA PACIFIC &#149; EUROPE</P></TD></TR>
</TABLE> <P STYLE="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="center">June&nbsp;14, 2018 </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">NuStar Energy L.P. </P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">19003
<FONT STYLE="white-space:nowrap">IH-10</FONT> West </P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">San Antonio, Texas 78257 </P>
<P STYLE="margin-top:18pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">Ladies and Gentlemen: </P> <P STYLE="margin-top:6pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">We have acted as special
tax counsel to NuStar Energy L.P., a Delaware limited partnership (the &#147;<I><U>Partnership</U></I>&#148;), in connection with (i)&nbsp;the proposed merger (the &#147;<I><U>Merger</U></I>&#148;) of Marshall Merger Sub LLC (&#147;<I><U>Merger
Sub</U></I>&#148;), a Delaware limited liability company and a wholly owned subsidiary of the Partnership, with and into NuStar GP Holdings, LLC, a Delaware limited liability company (&#147;<I><U>NSH</U></I>&#148;), with NSH as the surviving entity,
as contemplated by the Agreement and Plan of Merger (the &#147;<I><U>Merger Agreement</U></I>&#148;), dated as of February&nbsp;7, 2018, by and among the Partnership, Riverwalk Logistics, L.P, a Delaware limited partnership and the general partner
of the Partnership (the &#147;<I><U>General Partner</U></I>&#148;), NuStar GP, LLC, a Delaware limited liability company and the general partner of the General Partner, Merger Sub, NSH and Riverwalk Holdings, LLC, a Delaware limited liability
company and a wholly owned subsidiary of NSH, and (ii)&nbsp;the Registration Statement on Form <FONT STYLE="white-space:nowrap">S-4</FONT> (as amended or supplemented through the date hereof, the &#147;<I><U>Registration Statement</U></I>&#148;)
including the joint proxy statement/prospectus forming a part thereof, relating to the Merger and initially filed with the Securities and Exchange Commission on March&nbsp;14, 2018. In connection therewith, we have participated in the preparation of
the discussion (the &#147;<I><U>Discussion</U></I>&#148;) set forth under the caption &#147;Material U.S. Federal Income Tax Consequences of Common Unit Ownership&#148; included in the Registration Statement. </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">In providing our opinion, we have examined and, with your consent, are expressly relying upon (without any independent investigation or review
thereof), the truth and accuracy of the factual statements, representations, covenants and warranties contained in (i)&nbsp;the Merger Agreement (including any exhibits and schedules thereto), (ii) the Registration Statement and the joint proxy
statement/prospectus, (iii)&nbsp;the officer&#146;s certificate of the Partnership, delivered to us for purposes of this opinion (the &#147;<I><U>Officer&#146;s Certificate</U></I>&#148;), and (iv)&nbsp;such other documents, records and papers as we
have deemed necessary or appropriate in order to give the opinion set forth herein. In addition, we have assumed, with your consent, that: (i)&nbsp;the Merger and related transactions will be consummated in accordance with the provisions of the
Merger Agreement and as described in the Registration Statement (and no covenants or conditions described therein and affecting this opinion will be waived or modified), (ii) all factual statements, descriptions and representations contained in any
of the documents referred to herein or otherwise made to us are true, complete and correct and will remain true, complete and correct at all times up to and including the effective time of the Merger, and no actions have been taken or will be taken
which are inconsistent with such factual statements, descriptions or representations or which make any such factual statements, descriptions or representations untrue, incomplete or incorrect at the effective time of the Merger, (iii)&nbsp;any
statements made in any of the documents referred to herein qualified by knowledge, belief or materiality or comparable qualification are and will be true, complete and correct as if made without such qualification, (iv)&nbsp;all documents submitted
to us as originals are authentic, all documents submitted to us as copies conform to the originals, all relevant documents have been or will be duly executed in the form presented to us and all natural persons who have executed such documents are of
legal capacity and (v)&nbsp;all applicable reporting requirements have been or will be satisfied. If any of the above described assumptions is untrue for any reason, or if the Merger is consummated in a manner that is different from the manner
described in the Merger Agreement and the Registration Statement, our opinion as expressed below may be adversely affected. </P> <P STYLE="font-size:12pt; margin-top:0pt; margin-bottom:0pt">&nbsp;</P>
 <p STYLE="margin-top:0pt;margin-bottom:0pt ; font-size:8pt">&nbsp;</P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:8pt; font-family:Times New Roman" ALIGN="center">Sidley Austin LLP is a
limited liability partnership practicing in affiliation with other Sidley Austin partnerships. </P>

</DIV></Center>


<p Style='page-break-before:always'>
<HR  SIZE="3" style="COLOR:#999999" WIDTH="100%" ALIGN="CENTER">

<Center><DIV STYLE="width:8.5in" align="left">

 <P STYLE="margin-top:0pt;margin-bottom:0pt">


<IMG SRC="g543382g92h28.jpg" ALT="LOGO">
 </P> <p STYLE="margin-top:0pt;margin-bottom:0pt ; font-size:8pt">&nbsp;</P>
 <P STYLE="margin-top:0pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">Based upon and subject to the foregoing, and subject to the qualifications, exceptions,
assumptions and limitations stated in the Merger Agreement, the Registration Statement, the joint proxy statement/prospectus constituting part of the Registration Statement and the Officer&#146;s Certificate, all statements of legal conclusion in
the Registration Statement under the caption &#147;Material U.S. Federal Income Tax Consequences of Common Unit Ownership&#148; constitute the opinion of Sidley Austin LLP as to the material United States federal income tax consequences of the
matters described therein, as of the effective date of the Registration Statement. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">This opinion is rendered to you as of the date hereof,
and we undertake no obligation to update this opinion subsequent to the date hereof. This opinion is based on various statutory provisions, regulations promulgated thereunder and interpretations thereof by the Internal Revenue Service and the courts
having jurisdiction over such matters, all of which are subject to change either prospectively or retroactively. Also, any variation or difference in the facts from those set forth in the representations described above, including in the Merger
Agreement, the Registration Statement and the Officer&#146;s Certificate, may affect the conclusions stated herein. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">This opinion is
furnished to you, and is for your use in connection with the transactions set forth in the Registration Statement. This opinion may not be relied upon by you for any other purpose or furnished to, assigned to, quoted to or relied upon by any other
person, firm or other entity, for any purpose, without our prior written consent, except that this opinion may be relied upon by persons entitled to rely on it pursuant to applicable provisions of federal securities law. </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:4%; font-size:10pt; font-family:Times New Roman">We hereby consent to the filing of this opinion as an exhibit to the Registration Statement and to the references to our firm therein under
the caption &#147;Material U.S. Federal Income Tax Consequences of Common Unit Ownership.&#148; In giving such consent, we do not thereby admit that we are within the category of persons whose consent is required under Section&nbsp;7 of the
Securities Act of 1933, as amended, or the rules or regulations of the Securities and Exchange Commission promulgated thereunder. </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; margin-left:54%; text-indent:-2%; font-size:10pt; font-family:Times New Roman">Very truly yours, </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; margin-left:54%; text-indent:-2%; font-size:10pt; font-family:Times New Roman">/s/ Sidley Austin LLP </P>
</DIV></Center>

</BODY></HTML>
</TEXT>
</DOCUMENT>
<DOCUMENT>
<TYPE>EX-8.2
<SEQUENCE>4
<FILENAME>d543382dex82.htm
<DESCRIPTION>EX-8.2
<TEXT>
<HTML><HEAD>
<TITLE>EX-8.2</TITLE>
</HEAD>
 <BODY BGCOLOR="WHITE">

<Center><DIV STYLE="width:8.5in" align="left">
 <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="right"><B>Exhibit 8.2 </B></P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="center">[Wachtell, Lipton, Rosen&nbsp;&amp; Katz Letterhead] </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman" ALIGN="center">June&nbsp;14, 2018 </P> <P STYLE="margin-top:18pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">NuStar GP Holdings, LLC </P>
<P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">19003 <FONT STYLE="white-space:nowrap">IH-10</FONT> West </P> <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">San
Antonio, Texas 78257 </P> <P STYLE="margin-top:18pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">Ladies and Gentlemen: </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:8%; font-size:10pt; font-family:Times New Roman">We have acted as special counsel to NuStar GP Holdings, LLC, a Delaware limited liability company (&#147;<U>NSH</U>&#148;) in connection with
the proposed merger (the &#147;<U>Merger</U>&#148;) of Marshall Merger Sub LLC (&#147;<U>Merger Sub</U>&#148;), a Delaware limited liability company and a wholly owned subsidiary of NuStar Energy L.P., a Delaware limited partnership (the
&#147;<U>Partnership</U>&#148;), with and into NSH, with NSH as the surviving entity, as contemplated by the Agreement and Plan of Merger (the &#147;<U>Merger Agreement</U>&#148;), dated as of February&nbsp;7, 2018, by and among the Partnership,
Riverwalk Logistics, L.P, a Delaware limited partnership and the general partner of the Partnership (the &#147;<U>General Partner</U>&#148;), NuStar GP, LLC, a Delaware limited liability company and the general partner of the General Partner, Merger
Sub, NSH and Riverwalk Holdings, LLC, a Delaware limited liability company and a wholly owned subsidiary of NSH. In connection with the effectiveness of the Registration Statement on <FONT STYLE="white-space:nowrap">Form&nbsp;S-4</FONT> (as amended
or supplemented through the date hereof, the &#147;<U>Registration Statement</U>&#148;) including the joint proxy statement/prospectus forming a part thereof, relating to the Merger and initially filed with the Securities and Exchange Commission on
March&nbsp;14, 2018, you have requested our opinion as to certain U.S. federal income tax matters relating to NSH and its unitholders. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:8%; font-size:10pt; font-family:Times New Roman">In
providing our opinion, we have examined the Merger Agreement, the Registration Statement and such other documents, records and papers as we have deemed necessary or appropriate in order to give the opinion set forth herein. In addition, we have
assumed that: (i)&nbsp;the Merger and related transactions will be consummated pursuant to and in accordance with the provisions of the Merger Agreement and as described in the Registration Statement (and no covenants or conditions described therein
and affecting this opinion will be waived or modified), (ii) the statements concerning the Merger and the parties thereto set forth in the Merger Agreement and the Registration Statement are true, complete and correct and the Registration Statement
is true, complete and correct and will remain true, complete and correct at </P>
</DIV></Center>


<p Style='page-break-before:always'>
<HR  SIZE="3" style="COLOR:#999999" WIDTH="100%" ALIGN="CENTER">

<Center><DIV STYLE="width:8.5in" align="left">
 <P STYLE="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman">
all times up to and including the effective time of the Merger, (iii)&nbsp;all such statements qualified by knowledge, intention, belief or materiality or comparable qualification are and will be
true, complete and correct as if made without such qualification, (iv)&nbsp;the parties to the Merger Agreement have complied with, and if applicable, will continue to comply with, their respective covenants and agreements contained in the Merger
Agreement, (v)&nbsp;NSH, the Partnership, and their respective subsidiaries will treat the Merger for U.S. federal income tax purposes in a manner consistent with the opinion set forth below, (vi)&nbsp;all documents submitted to us as originals are
authentic, all documents submitted to us as copies conform to the originals, all relevant documents have been or will be duly executed in the form presented to us and all natural persons who have executed such documents are of legal capacity and
(vii)&nbsp;all applicable reporting requirements have been or will be satisfied. If any of the above described assumptions is untrue for any reason, or if the Merger is consummated in a manner that is different from the manner described in the
Merger Agreement and the Registration Statement, our opinion as expressed below may be adversely affected. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:8%; font-size:10pt; font-family:Times New Roman">Based upon and subject to the
foregoing, we hereby confirm that, subject to the assumptions, exceptions, limitations and qualifications set forth herein and described in the Registration Statement, the discussion set forth in the Registration Statement under the caption
&#147;Material U.S. Federal Income Tax Consequences of the Merger&#151;Tax Consequences of the Merger to U.S. Holders,&#148; sets forth our opinion as to the material U.S. federal income tax consequences of the Merger to NSH unitholders as of the
effective date of the Registration Statement. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:8%; font-size:10pt; font-family:Times New Roman">We express no opinion on any issue or matter relating to the tax consequences of the
transactions contemplated by the Merger Agreement or the Registration Statement other than the opinion set forth above. Our opinion is based on current provisions of the Internal Revenue Code of 1986, as amended, Treasury Regulations promulgated
thereunder, published pronouncements of the Internal Revenue Service and case law, any of which may be changed at any time with retroactive effect. Any change in applicable laws or the facts and circumstances surrounding the Merger and related
transactions, or any inaccuracy in the statements, facts, or assumptions upon which we have relied, may affect the continuing validity of our opinion as set forth herein. We assume no responsibility to inform NSH of any such change or inaccuracy
that may occur or come to our attention. </P> <P STYLE="margin-top:12pt; margin-bottom:0pt; text-indent:8%; font-size:10pt; font-family:Times New Roman">We are furnishing this opinion solely in connection with the filing of the Registration
Statement and this opinion is not to be relied upon for any other purpose without our prior written consent. We hereby consent to the filing of this opinion with the Securities and Exchange Commission as an exhibit to the Registration Statement, and
to the references therein to us. In giving such consent, we do not thereby admit that we are in the category of persons whose consent is required under Section&nbsp;7 of the Securities Act of 1933, as amended. </P>
<P STYLE="margin-top:18pt; margin-bottom:0pt; margin-left:54%; text-indent:-2%; font-size:10pt; font-family:Times New Roman">Very truly yours, </P>
<P STYLE="margin-top:12pt; margin-bottom:0pt; margin-left:54%; text-indent:-2%; font-size:10pt; font-family:Times New Roman">/s/ Wachtell, Lipton, Rosen &amp; Katz </P>
</DIV></Center>

</BODY></HTML>
</TEXT>
</DOCUMENT>
<DOCUMENT>
<TYPE>GRAPHIC
<SEQUENCE>5
<FILENAME>g543382g92h28.jpg
<DESCRIPTION>GRAPHIC
<TEXT>
begin 644 g543382g92h28.jpg
M_]C_X  02D9)1@ ! 0$ > !X  #_X0,Z17AI9@  24DJ  @    #  !1!  !
M          )1 0   P  ,@    -1 0 !                   ! 0$" @(#
M P,$! 0%!04&!@8'!P<(" @)"0D*"@H+"PL,# P-#0T.#@X/#P\0$! 1$1$2
M$A(3$Q,4%!05%146%A87%Q<8&!@9&1D:&AH;&QL<'!P='1T>'AX?'Q\@(" A
M(2$B(B(C(R,D)"0E)24F)B8G)R<H*"@I*2DJ*BHK*RLL+"PM+2TN+BXO+R\P
M,# Q,3$R,C(S,S,T-#0U-34V-C8W-S<X.#@Y.3DZ.CH[.SL\/#P]/3T^/CX_
M/S] 0$!!04%"0D)#0T-$1$1%145&1D9'1T=(2$A)24E*2DI+2TM,3$Q-34U.
M3DY/3T]04%!145%24E)34U-45%1555565E975U=86%A965E:6EI;6UM<7%Q=
M75U>7EY?7U]@8&!A86%B8F)C8V-D9&1E965F9F9G9V=H:&AI:6EJ:FIK:VML
M;&QM;6UN;FYO;V]P<'!Q<7%R<G)S<W-T='1U=75V=G9W=W=X>'AY>7EZ>GI[
M>WM\?'Q]?7U^?GY_?W^ @("!@8&"@H*#@X.$A(2%A86&AH:'AX>(B(B)B8F*
MBHJ+BXN,C(R-C8V.CHZ/CX^0D)"1D9&2DI*3DY.4E)25E966EI:7EY>8F)B9
MF9F:FIJ;FYN<G)R=G9V>GIZ?GY^@H*"AH:&BHJ*CHZ.DI*2EI:6FIJ:GIZ>H
MJ*BIJ:FJJJJKJZNLK*RMK:VNKJZOKZ^PL+"QL;&RLK*SL[.TM+2UM;6VMK:W
MM[>XN+BYN;FZNKJ[N[N\O+R]O;V^OKZ_O[_ P,#!P<'"PL+#P\/$Q,3%Q<7&
MQL;'Q\?(R,C)R<G*RLK+R\O,S,S-S<W.SL[/S\_0T-#1T='2TM+3T]/4U-35
MU=76UM;7U]?8V-C9V=G:VMK;V]O<W-S=W=W>WM[?W]_@X.#AX>'BXN+CX^/D
MY.3EY>7FYN;GY^?HZ.CIZ>GJZNKKZ^OL[.SM[>WN[N[O[^_P\/#Q\?'R\O+S
M\_/T]/3U]?7V]O;W]_?X^/CY^?GZ^OK[^_O\_/S]_?W^_O[_____VP!#  8$
M!08%! 8&!08'!P8("A *"@D)"A0.#PP0%Q08&!<4%A8:'24?&ALC'!86("P@
M(R8G*2HI&1\M,"TH,"4H*2C_VP!# 0<'!PH("A,*"A,H&A8:*"@H*"@H*"@H
M*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"C_P  1
M"  = &X# 2(  A$! Q$!_\0 'P   04! 0$! 0$           $" P0%!@<(
M"0H+_\0 M1   @$# P($ P4%! 0   %] 0(#  01!1(A,4$&$U%A!R)Q%#*!
MD:$((T*QP152T? D,V)R@@D*%A<8&1HE)B<H*2HT-38W.#DZ0T1%1D=(24I3
M5%565UA96F-D969G:&EJ<W1U=G=X>7J#A(6&AXB)BI*3E)66EYB9FJ*CI*6F
MIZBIJK*SM+6VM[BYNL+#Q,7&Q\C)RM+3U-76U]C9VN'BX^3EYN?HZ>KQ\O/T
M]?;W^/GZ_\0 'P$  P$! 0$! 0$! 0        $" P0%!@<("0H+_\0 M1$
M @$"! 0#! <%! 0  0)W  $" Q$$!2$Q!A)!40=A<1,B,H$(%$*1H;'!"2,S
M4O 58G+1"A8D-.$E\1<8&1HF)R@I*C4V-S@Y.D-$149'2$E*4U155E=865IC
M9&5F9VAI:G-T=79W>'EZ@H.$A8:'B(F*DI.4E9:7F)F:HJ.DI::GJ*FJLK.T
MM;:WN+FZPL/$Q<;'R,G*TM/4U=;7V-G:XN/DY>;GZ.GJ\O/T]?;W^/GZ_]H
M# ,!  (1 Q$ /P#<^+7Q<\577Q$_X0'X96\?]IJPBFNF16;?MW,%W?*JJ.K'
MT/3'.7);?M"^%;JTNFO(-=BFE6-X%V3*I8_QC:K*/5E.!ZUG_%OP;XS\!?%Z
M;XA>#;)]1M)W-PXCC,IB++MD21!SM/)!'KV(KK/ O[3FB:I>Q6'BS39M$NF;
M89PWF0AO]K@,OY'% %G]I/XB>+/ >B^%YM'N;:ROKSS!>*D2S)N54.%+CH"3
M63^T!\4?%WA"'P;_ ,(]?Q0/J=CYUQNMXWWO\G(W X^\>E9_[;SK)I?A)T8,
MC23D,#D$;4Y%<W^U7T^&W_8.'_M.@#J'O_VD+:(7!M;2X0#=Y:QVI)'T!!K2
M^'7[0EVWB5/#7Q+TD:/J+.(1<JC1JKGH)$;E0>/F!Q^'-?1%M_Q[1?[@_E7S
M/^VUHEG_ &)H&NK$B:@MRUHT@&"\94L ?7!7CZF@#J/VH_B%XC\ V7A^3PQ>
M1VS7<DRS%X$DW!0N/O XZFO9= N);S0M-N;A@TTUM'(Y QEBH)X^IKX^_:"U
M*?5_@Y\++Z\8O<2VS[V/5B$09/UQFOKSPI_R*^C_ /7G#_Z * .%_:*\6:QX
M+^'$FK^'KA+>^6ZBB#M$L@VMG(PP([5XYX9\2_M!>)M#M-8T9K6?3[I2T4AB
MM5W ,5/!Y'(->B_M?_\ )')O^OZ#^9KRKX7?';4_"G@+2-$MO!5YJ,5HC*MT
MDK!9,NS9 $9]<=>U 'JWPHD^,DOBO9\05@31#;R?-&MN&$G&W[G/K[5R!^*O
MC+P%\9D\._$*^BN] G?9%<BV2+]VY_=S94#H>&';GTKT#X/?%J_^(&N7MA>^
M%KG1DM[?SQ-*[,'.X#;RB^N?PJ;]H;X;)\0?!KFRC7^W=/#36;8Y?^]$3Z-C
MCW ]Z .U\<^*;#P?X3U#7M2<?9[6+<J@\RN>%1?<G KR']G[Q)\0OB)'J6MZ
M[JRV>A!C%:1PVD0+R9R<$KDJH^7GJ3[&O#]&U3Q9\9)/"OP]N&>.VTK=]JG.
M=VQ3C?(#W1?E [D^]?;OA[1[+P_HEEI.E0B&QLXA%$@[ =SZD]2>Y- 'G\'Q
MS\#/XQO_  _/J@M9+4[/M<XVP22 D,@?L0>YP#SBO$_VMM=\$ZW!I2^'9["^
M\1>>3+/8X?\ =;3\KLO!)8C Y/!KWGQS\&_!7C2]>]U;2O+OWY>ZM',3N?5L
M<,?<@FJ?@WX%^!?"FI1ZA9:;)=WL1W12WLIE\L^H7A<^^* /!?VD;*]T[X4?
M"^SU3<+V&U9)0_52(X^#[CI^%._:M8(GPW9CA1IN2?\ OW7T[X\^'_ASQW'9
MQ^)[%KM;0LT($SQ[2V,_=(ST%4_&'PN\)^,$TY-?TUKE=/B\BVQ.Z;$XX^4C
M/0=: ,>3XY?#FTL@[>)[:0H@^2**1F/'8!:^?/B5XLU/]H#QKI?AWP=83II%
MHY822KCEN&FDQPJ@#@9SU[G%>]P_L^_#:*57_P"$?+X_A>[F(/X;J]!\.^'=
M'\-V/V/0--M-/MNI2WC";CZD]2?<T ?,/[7ND0>'_!O@+2+//V>Q62W0GJ0J
M1C)^N,UZWX>^-/P\M?#^F03^)[1)HK6)'4QR<,$ (^[77>._ 'ASQW%9Q^)[
M%KM;0LT($SQ[2V,_=(ST%<A_PSS\-O\ H!2?^!DW_P 50!RG[2OB71_%?P(F
MU+P]?1WUE_:,,7FH& W#.1R >XI?@9\5_ _A_P"%/A_2]9\0VUK?V\3K+"Z2
M$H3*Y'12.A%>DCX4>$!X,/A0:8W]AFX^U&#[1)GS/7=G/X9K _X9Y^&W_0"D
M_P# R;_XJ@#H_#OQ4\$^(]7@TO1/$%M=W\^?+A1'!; )/50.@-=M7GGA7X-^
M"/"NNVVL:)I+V^H6^[RY#<R/C*E3P6(Z$UZ'0!\D?LL?\ES\9_\ 7&Y_]*5K
GZWKC_"?PV\+^$]>O=9T+3VM]1O%99I#,[[@S!CP20.0.E=A0!__9

end
</TEXT>
</DOCUMENT>
</SUBMISSION>
