EX-5. 2 a2194121zex-5_.htm EX-5.1
QuickLinks -- Click here to rapidly navigate through this document


Exhibit 5.1

MUSICK, PEELER & GARRETT LLP
ATTORNEYS AT LAW

LAURA K. MCAVOY
L.MCAVOY@MPGLAW.COM
(805) 418-3115

 

2801 TOWNSGATE ROAD, SUITE 200
WESTLAKE VILLAGE, CALIFORNIA 91361

TELEPHONE: (805) 418-3100
FACSIMILE: (805) 418-3101
WWW.MPGWEB.COM

 

LOS ANGELES
ORANGE COUNTY
SAN DIEGO
SAN FRANCISCO
SANTA BARBARA
WESTLAKE VILLAGE
FILE NO. 09599.001

 

 

August 11, 2009

 

 

Berry Petroleum Company
1999 Broadway, Suite 3700
Denver, CO 80202

    Re:
    Registration Statement on Form S-3

Gentlemen:

        We have acted as counsel for Berry Petroleum Company, a Delaware corporation (the "Company"), in connection with the various legal matters relating to the automatic shelf registration statement on Form S-3 (the "Registration Statement") to be filed by the Company with the Securities and Exchange Commission, that is automatically effective under the Securities Act of 1933 (the "Act") pursuant to Rule 462(e) promulgated thereunder. The prospectus (the "Prospectus"), which is a part of the Registration Statement, as supplemented by various Prospectus Supplements will provide for the registration by the Company of an indeterminate amount of: (i) secured or unsecured debts securities, in one or more series, which may be either senior or subordinated debt securities (the "Debt Securities"), (ii) one or more classes or series of preferred stock (the "Preferred Stock"), (iii) one or more series of common stock (the "Common Stock"), (iv) warrants to purchase Debt Securities, Preferred Stock, or Common Stock (the "Warrants") or (v) any combination of the foregoing. The Debt Securities, Preferred Stock, Common Stock and Warrants are collectively referred to herein as the "Securities." Any Debt Securities may be exchangeable and/or convertible into shares of Common Stock, Preferred Stock or other Debt Securities. The Preferred Stock may also be exchangeable for and/or convertible into shares of Common Stock. Capitalized terms not otherwise defined in this opinion have the meanings set forth in the Registration Statement.

        We have examined such corporate records, certificates, and such questions of law as we have considered necessary or appropriate for the purposes of this opinion and have assumed the genuineness of all signatures, the legal capacity of all natural persons, the accuracy and completeness of all original documents, and the conformity to authentic original documents of all documents submitted to us as copies (including telecopies).

        This opinion is based as to matters of law solely on the Act and Delaware General Corporation Law, as amended. We express no opinion as to any other laws, statutes, ordinances, rules or regulations. As used herein, the term "Delaware General Corporation Law, as amended" includes the statutory provisions contained therein, all applicable provisions of the Delaware Constitution and reported judicial decisions interpreting these laws.

        Based upon, subject to and limited by the foregoing, we advise you that in our opinion:

            (1)   The Common Stock and Preferred Stock will each be validly issued, fully paid and nonassessable when (a) issued in accordance with the Registration Statement, any Prospectus Supplement, and resolutions of the Board of Directors of the Company approving the issuance of and the terms of the offering of the Common Stock or Preferred Stock, as appropriate, and related


    matters; and (b) certificates representing the Common Stock and Preferred Stock, as appropriate, have been duly executed, countersigned, registered and delivered in accordance with the terms of the applicable definitive purchase, underwriting or similar agreement approved by the Board of Directors of the Company.

            (2)   Each series of Debt Securities will be legally issued and binding obligations of the Company (except to the extent enforceability may be limited by applicable bankruptcy, insolvency, reorganization, moratorium or other similar laws affecting the enforcement of creditors' rights generally and by the effect of general principles of equity, regardless of whether enforceability is considered in a proceeding in equity or at law) assuming that: (i) the Registration Statement and any amendments thereto (including post-effective amendments) will have become effective under the Act and comply with all applicable laws; (ii) the Registration Statement will be effective and will comply with all applicable laws at the time the Debt Securities are offered or issued as contemplated by the Registration Statement; (iii) a Prospectus Supplement and term sheet with respect to such series of Debt Securities will have been filed with the SEC and will comply with all applicable laws; (iv) all Debt Securities will be issued and sold in compliance with applicable federal and state securities laws and in the manner stated in the Registration Statement and the appropriate Prospectus Supplement; (v) a definitive underwriting agreement with respect to any Debt Securities offered or issued will have been duly authorized and validly executed and delivered by the Company and the other parties thereto; (vi) the Board of Directors of the Company shall have duly adopted final resolutions authorizing the execution and delivery of the one or more indentures (the "Indenture") between the Company and a trustee (the "Trustee"), substantially in the form filed as an exhibit to the Registration Statement; (vii) the Indenture (including any necessary supplemental indenture) shall have been executed and delivered by the Company and the Trustee; (viii) such series of Debt Securities shall have been duly executed and authenticated as may be provided in the Indenture and such resolutions and shall have been duly delivered to the purchasers thereof against payment of the agreed consideration therefor; and (ix) the Company shall have taken all necessary corporate action authorizing the issuance and terms of such series of Debt Securities, the terms of the offering thereof, and related matters.

            (3)   Each issue of Warrants will constitute legally issued and binding obligations of the Company (subject to applicable bankruptcy, insolvency, reorganization, moratorium, fraudulent transfer or other similar laws affecting the enforcement of creditors' rights generally and by the effect of general principles of equity, regardless of whether considered in a proceeding in equity or at law) when (i) a warrant agreement (the "Warrant Agreement") relating to such issue of Warrants shall have been duly authorized, executed and delivered by the Company and duly executed and delivered by the warrant agent and shall constitute a valid, binding and enforceable agreement of the Company and the warrant agent; (ii) the Board of Directors of the Company shall have duly adopted final resolutions authorizing the execution and delivery of the Warrant Agreement and the issuance and sale of such issue of Warrants as contemplated by such Warrant Agreement; and (iii) such Warrants shall have been duly executed and countersigned in accordance with such Warrant Agreement and such resolutions and shall have been delivered to the purchasers thereof against payment of the agreed consideration therefor."

        This opinion is furnished to you at your request to enable you to fulfill the requirements of Item 601(b)(5) of Regulation S-K, 17 C.F.R. § 229.601(b)(5), in connection with the Registration Statement. This opinion is limited to the matters expressly stated herein and no opinion or other statement may be inferred or implied beyond the matters expressly stated herein. We assume no obligation to advise you of any changes in the foregoing subsequent to the effective time of the Registration Statement.

        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 federal

2



securities laws. We consent to your filing this opinion as an exhibit to the Registration Statement and to the reference to our firm in the Prospectus under the heading "Validity of Offered 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.

  Very truly yours,

 

/s/ MUSICK, PEELER & GARRETT LLP

3




QuickLinks