Exhibit 5.1



October 19, 2016

W&T Offshore, Inc.

Nine Greenway Plaza, Suite 300

Houston, Texas 77046

Ladies and Gentlemen:

We have acted as counsel for W&T Offshore, Inc., a Texas corporation (the “Company”) with respect to the preparation of the Registration Statement on Form S-3 (the “Registration Statement”) filed on or about the date hereof with the Securities and Exchange Commission (the “Commission”) in connection with the registration by the Company under the Securities Act of 1933 (the “Securities Act”) of the offer and sale by the selling shareholders named in the Registration Statement of up to 42,967,585 shares of common stock, par value $0.00001 per share, of the Company (the “Common Shares”).

We have also participated in the preparation of the Prospectus (the “Prospectus”) contained in the Registration Statement to which this opinion is an exhibit.

In connection with the opinions expressed herein, we have examined, among other things, the (i) the Amended and Restated Articles of Incorporation, as amended, and the Amended and Restated Bylaws of the Company, (ii) the Registration Statement, (iii) the Prospectus and (iv) the records of corporate proceedings that have occurred prior to the date hereof with respect to the Registration Statement. We have also reviewed such questions of law as we have deemed necessary or appropriate. As to matters of fact relevant to the opinions expressed herein, and as to factual matters arising in connection with our examination of corporate documents, records and other documents and writings, we relied upon certificates and other communications of corporate officers of the Company, without further investigation as to the facts set forth therein.

In connection with rendering the opinions set forth below, we have assumed that (i) all information contained in all documents reviewed by us is true and correct; (ii) all signatures on all documents examined by us are genuine; (iii) all documents submitted to us as originals are authentic and all documents submitted to us as copies conform to the originals of those documents; (iv) the Registration Statement and any subsequent amendments (including additional post-effective amendments), will have become effective and comply with all applicable laws; and (v) the Common Shares will be sold in the manner set forth in the Registration Statement.


Vinson & Elkins LLP Attorneys at Law

Austin Beijing Dallas Dubai Hong Kong Houston London Moscow New York

Palo Alto Richmond Riyadh San Francisco Taipei Tokyo Washington


1001 Fannin Street, Suite 2500

Houston, TX 77002-6760

Tel +1.713.758.2222 Fax +1.713.758.2346 www.velaw.com

LOGO    October 19, 2016         Page 2


Based on the foregoing, and subject to the assumptions, qualifications, limitations, and exceptions set forth herein, we are of the opinion that the Common Shares proposed to be sold by the selling shareholders are legally issued, fully paid and nonassessable.

The foregoing opinions are limited to the laws of the State of Texas and the federal laws of the United States of America, and we are expressing no opinion as to the effect of the laws of any other jurisdiction, domestic or foreign.

We hereby consent to the filing of this opinion as an exhibit to the Registration Statement and to the use of our name in the Prospectus forming a part of the Registration Statement under the caption “Legal Matters.” In giving this consent, we do not admit that we are within the category of persons whose consent is required under Section 7 of the Securities Act and the rules and regulations thereunder.

Very truly yours,

/s/ Vinson & Elkins L.L.P.