<?xml version="1.0"?>
<ownershipDocument>
    <schemaVersion>X0101</schemaVersion>

    <documentType>4</documentType><periodOfReport>2003-06-30</periodOfReport>
    <issuer>
        <issuerCik>0000778438</issuerCik>
        <issuerName>BERRY PETROLEUM CO</issuerName>
        <issuerTradingSymbol>BRY</issuerTradingSymbol></issuer><reportingOwner><reportingOwnerId>
            <rptOwnerCik>0001094528</rptOwnerCik>
            <rptOwnerName>HAGG JOHN A</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>  </rptOwnerStreet1>
            <rptOwnerStreet2>  </rptOwnerStreet2>
            <rptOwnerCity>  </rptOwnerCity>
            <rptOwnerState>  </rptOwnerState>
            <rptOwnerZipCode>  </rptOwnerZipCode>
        </reportingOwnerAddress>
            <reportingOwnerRelationship>
<isDirector>1</isDirector><isOfficer>0</isOfficer><isTenPercentOwner>0</isTenPercentOwner><isOther>0</isOther></reportingOwnerRelationship></reportingOwner><derivativeSecurity><securityTitle><value>Phantom Stock Units</value></securityTitle><conversionOrExercisePrice><value>0</value><footnoteId id="F1"/></conversionOrExercisePrice><transactionDate><value>2003-06-30</value></transactionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>A</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>563</value></transactionShares><transactionValue><value>17.95</value></transactionValue><transactionAcquiredDisposedCode><value>A</value></transactionAcquiredDisposedCode></transactionAmounts><exerciseDate><value>1988-08-08</value><footnoteId id="F2"/></exerciseDate><expirationDate><value>1988-08-08</value><footnoteId id="F3"/></expirationDate><underlyingSecurity><underlyingSecurityTitle><value>Class A Common Stock</value></underlyingSecurityTitle><underlyingSecurityShares><value>563</value></underlyingSecurityShares></underlyingSecurity><postTransactionAmounts><sharesOwnedFollowingTransaction><value>8806</value><footnoteId id="F4"/></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>D</value></directOrIndirectOwnership><natureOfOwnership><value></value></natureOfOwnership></ownershipNature></derivativeSecurity><footnotes><footnote id="F1">1 for 1</footnote><footnote id="F2">Phantom Stock Units acquired under the Company's Non-Employee Director Deferred Stock and Compensation Plan in a transaction exempt under Rule 16b-3(c).  Shares are exercisable under the terms of the Plan upon resignation from the Board.</footnote><footnote id="F3">Phantom Stock Units acquired under the Company's Non-Employee Director Deferred Stock and Compensation Plan in a transaction exempt under Rule 16b-3(c).  Shares expire under the terms of the Plan upon resignation from the Board.</footnote><footnote id="F4">Number of derivitive securities beneficially owned does not include 39,000 Non-Statutory Stock Options granted previously which have various exercise prices and expiration dates.</footnote></footnotes><ownerSignature><signatureName>Kenneth A. Olson under POA for John A. Hagg</signatureName><signatureDate>2003-07-01</signatureDate></ownerSignature></ownershipDocument>

