Exhibit 5.1

 

  300 Colorado Street, Suite 2400
  Austin, TX 78701
  Tel: +1.737.910.7300 Fax: +1.737.910.7301
  www.lw.com
  FIRM / AFFILIATE OFFICES
LOGO   Austin    Milan
  Beijing    Munich
  Boston    New York
  Brussels    Orange County
  Chicago    Paris
  Dubai    Riyadh
August 6, 2025   Düsseldorf    San Diego
  Frankfurt    San Francisco
  Hamburg    Seoul
  Hong Kong    Silicon Valley
  Houston    Singapore
ONEOK, Inc.   London    Tel Aviv
100 West Fifth Street   Los Angeles    Tokyo
Tulsa, Oklahoma 74103   Madrid    Washington, D.C.

Re: ONEOK, Inc. Amendment No. 2 to Registration Statement on Form S-3

To the addressee set forth above:

We have acted as special counsel to ONEOK, Inc., an Oklahoma corporation (the “Issuer”), and the entities listed on Schedule I hereto (collectively, the “Guarantors”), in connection with the filing on the date hereof with the Securities and Exchange Commission (the “Commission”) of Post-Effective Amendment No. 2 (the “Amendment”) to the registration statement on Form S-3 (File No. 333- 272782) (the “Registration Statement”) under the Securities Act of 1933, as amended (the “Act”). You have provided us with a draft of the Amendment in the form in which it will be filed.

The Registration Statement registers the offering and sale of, among other things, (i) one or more series of the Issuer’s debt securities (the “Debt Securities”) to be issued pursuant to an indenture entered into among the Issuer, the guarantors party thereto and the U.S. Bank Trust Company, National Association (successor in interest to U.S. Bank National Association), as trustee, a copy of which is included as Exhibit 4.1 to the Issuer’s Current Report on Form 8-K filed with the Commission on January 26, 2012, and one or more supplemental indentures thereto (collectively, the “Indenture”); and (ii) guarantees of the Debt Securities (the “Guarantees”) by the Guarantors. The Debt Securities and the Guarantees are collectively referred to as the “Securities.”

This opinion is being furnished in connection with the requirements of Item 601(b)(5) of Regulation S-K under the Act, and no opinion is expressed herein as to any matter pertaining to the contents of the Amendment, the Registration Statement or the related prospectus, other than as expressly stated herein with respect to the issue of the Securities.

As such counsel, we have examined such matters of fact and questions of law as we have considered appropriate for purposes of this letter. With your consent, we have relied upon certificates and other assurances of officers of the Issuer, the Guarantors and others as to factual matters without having independently verified such factual matters. We are opining herein as to the internal laws of the State of New York, and we express no opinion with respect to the applicability thereto, or the effect thereon, of the laws of any other jurisdiction, or as to any matters of municipal law or the laws of any local agencies within any state.


August 6, 2025

Page 2

 

LOGO

 

Subject to the foregoing and the other matters set forth herein, it is our opinion that, as of the date hereof, when the Indenture has been duly authorized by all necessary corporate, limited liability company or limited partnership action, as applicable, of the Issuer and the Guarantors and duly executed and delivered, and when the specific terms of a particular series of Debt Securities and Guarantee have been duly established in accordance with the terms of the Indenture and authorized by all necessary corporate, limited liability company or limited partnership action, as applicable, of the Issuer and the Guarantors, and such Debt Securities and such Guarantee have been duly executed, authenticated, issued and delivered against payment therefor in accordance with the terms of the Indenture and in the manner contemplated by the Registration Statement and/or the applicable prospectus and by such corporate, limited liability company or limited partnership action, as applicable (i) such Debt Securities will be the legally valid and binding obligations of the Issuer, enforceable against the Issuer in accordance with its terms; and (ii) such Guarantees will be a legally valid and binding obligation of such Guarantor, enforceable against such Guarantor in accordance with its terms.

Our opinion is subject to: (i) the effect of bankruptcy, insolvency, reorganization, preference, fraudulent transfer, moratorium or other similar laws relating to or affecting the rights and remedies of creditors; (ii) the effect of general principles of equity, whether considered in a proceeding in equity or at law (including the possible unavailability of specific performance or injunctive relief), concepts of materiality, reasonableness, good faith and fair dealing, and the discretion of the court before which a proceeding is brought; and (iii) the invalidity under certain circumstances under law or court decisions of provisions providing for the indemnification of or contribution to a party with respect to a liability where such indemnification or contribution is contrary to public policy. We express no opinion as to (a) any provision for liquidated damages, default interest, late charges, monetary penalties, make-whole premiums or other economic remedies to the extent such provisions are deemed to constitute a penalty, (b) consents to, or restrictions upon, governing law, jurisdiction, venue, arbitration, remedies or judicial relief, (c) waivers of rights or defenses, (d) any provision requiring the payment of attorneys’ fees, where such payment is contrary to law or public policy, (e) any provision permitting, upon acceleration of any series of Securities, collection of that portion of the stated principal amount thereof which might be determined to constitute unearned interest thereon, (f) the creation, validity, attachment, perfection, or priority of any lien or security interest, (g) advance waivers of claims, defenses, rights granted by law, or notice, opportunity for hearing, evidentiary requirements, statutes of limitation, trial by jury or at law, or other procedural rights, (h) waivers of broadly or vaguely stated rights, (i) provisions for exclusivity, election or cumulation of rights or remedies, (j) provisions authorizing or validating conclusive or discretionary determinations, (k) grants of setoff rights, (l) proxies, powers and trusts, (m) provisions prohibiting, restricting, or requiring consent to assignment or transfer of any right or property, (n) provisions purporting to make a guarantor primarily liable rather than as a surety, (o) provisions purporting to waive modifications of any guaranteed obligation to the extent such modification constitutes a novation, (p) any provision to the extent it requires that a claim with respect to a security denominated in other than U.S. dollars (or a judgment in respect of such a claim) be converted into U.S. dollars at a rate of exchange at a particular date, to the extent applicable law otherwise provides, and (q) the severability, if invalid, of provisions to the foregoing effect.


August 6, 2025

Page 3

 

LOGO

 

With your consent, we have assumed (i) that the Indenture, the Debt Securities and the Guarantees (collectively, the “Documents”) will be governed by the internal laws of the State of New York, (ii) that each of the Documents will be duly authorized, executed and delivered by the parties thereto, (iii) that each of the Documents will constitute legally valid and binding obligations of the parties thereto other than the Issuer and the Guarantors, enforceable against each of them in accordance with their respective terms, and (iv) that the status of each of the Documents as legally valid and binding obligations of the parties will not be affected by any (a) breaches of, or defaults under, agreements or instruments, (b) violations of statutes, rules, regulations or court or governmental orders, or (c) failures to obtain required consents, approvals or authorizations from, or to make required registrations, declarations or filings with, governmental authorities.

This opinion is for your benefit in connection with the Registration Statement and may be relied upon by you and by persons entitled to rely upon it pursuant to the applicable provisions of the Act. We consent to your filing this opinion as an exhibit to the Registration Statement and to the reference to our firm in the base prospectus included in the Registration Statement under the heading “Validity of the Securities.” In giving such consent, we do not thereby admit that we are in the category of persons whose consent is required under Section 7 of the Act or the rules and regulations of the Commission thereunder.

 

Sincerely,
/s/ Latham & Watkins LLP


August 6, 2025

Page 4

 

LOGO

 

Schedule I

Guarantors

ONEOK Partners, L.P.

ONEOK Partners Intermediate Limited Partnership

Magellan Midstream Partners, L.P.

Elk Merger Sub II, L.L.C.

EnLink Midstream Partners, LP