EX-5.1 2 a2139217zex-5_1.htm EXHIBIT 5.1
QuickLinks -- Click here to rapidly navigate through this document


Exhibit 5.1


OPINION OF COUNSEL

                                  VINSON & ELKINS L.L.P.
                                  THE TERRACE 7
                                  2801 VIA FORTUNA, SUITE 100
                                  AUSTIN, TEXAS 78746
                                  TELEPHONE (512) 542-8400
                                  FAX (512) 542-8612
                                  www.velaw.com

June 24, 2004

Clayton Williams Energy, Inc.
6 Desta Drive, Suite 6500
Midland, Texas 79705

Ladies and Gentlemen:

        We acted as counsel to Clayton Williams Energy, Inc., Inc., a Delaware corporation (the "Company"), in connection with the preparation of the Company's Registration Statement on Form S-3 as filed by the Company with the Securities and Exchange Commission pursuant to the Securities Act of 1933, as amended (the "Registration Statement"), which Registration Statement relates to the proposed offer, sale and delivery by the persons named as Selling Stockholders in the Registration Statement (the "Selling Stockholders") of an aggregate of up to 1,380,869 shares of the Company's common stock, $0.10 par value (the "Shares").

        Before rendering this opinion, we have examined such certificates, instruments and documents, reviewed such questions of law and made such other investigations as we considered necessary or appropriate for the purposes of this opinion.

        Based upon the foregoing examination and review, we are of the opinion that the Shares have been duly authorized and validly issued and are fully paid and nonassessable.

        This opinion is limited in all respects to the General Corporation Law of the State of Delaware.

        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 or the rules and regulations of the Securities and Exchange Commission issued thereunder.

                        Very truly yours,
                        /s/                       
                        Vinson & Elkins L.L.P.




QuickLinks

OPINION OF COUNSEL