Oil and gas producer Linn Energy LLC said it would buy Berry Petroleum Co in an all-stock deal valued at $4.3 billion including debt, giving it more exposure to lucrative liquids that will help it raise production by 30 percent.

Berry shareholders will receive the equivalent of about $46.24 per share, a 19.8 percent premium to the stock's closing price of $38.59 on Wednesday on the New York Stock Exchange.

(Reporting by Swetha Gopinath in Bangalore; Editing by Roshni Menon)