Apache Corp said it will acquire smaller oil and natural gas explorer Mariner Energy Inc for $2.7 billion, in a bid to extend its operations into deepwater Gulf of Mexico.

Apache said the stock and cash deal valued Mariner's common stock at $26.22 per share, a 45 percent premium over its Wednesday closing price. Mariner shareholders would receive 0.17 of an Apache share and $7.80 for each Mariner share.

The company also said it would assume $1.2 billion in Mariner's debt as part of the deal, and that the transaction might be completed by the third quarter.

Apache has been on the prowl for well-priced oil and gas properties that fit neatly into its existing exploration program.

On April 12, it said it planned to buy Devon Energy Corp's shallow-water oil and gas assets on the U.S. Gulf of Mexico Shelf for $1.05 billion.

Shares of Apache closed at $108.06 Wednesday on the New York Stock Exchange. Shares of Mariner were trading 41 percent up at $25.5 in trading before the bell on Thursday.

(Reporting by Arup Roychoudhury in Bangalore; Editing by Jarshad Kakkrakandy)