Updated from 8:06 a.m. EDT

Kerr-McGee ( KMG ) and Westport Resources ( WRC ) Wednesday said they would merge in an all-stock deal valued at about $2.5 billion.

Under terms of the merger agreement, Westport shareholders will receive 0.71 shares of Kerr-McGee common stock for each of their shares. Based on Kerr-McGee's closing price of $51.51 Tuesday, the offer is worth $36.57 a share. Oklahoma City, Okla.-based Kerr-McGee will issue approximately 49.4 million new shares to Westport's shareholders.

Recently, Westport shares gained $1.45, or 4.4%, to $34.50, while Kerr's fell $2.21, or 4.3%, to $49.30.

The deal combines Kerr-McGee's offshore expertise with Denver-based Westport's land-based experience, creating one of the largest independent oil and natural gas companies in the U.S.

The companies expect the merger to produce cost savings of approximately $40 million a year, and it will be accretive to both earnings and cash flow per share beginning in 2005. The deal includes about $900 million in debt.

The transaction is expected to be completed during the third quarter of this year. The merged company will be called Kerr-McGee and be headquartered in Oklahoma City.

More from Stocks

Finding Stocks Right for You: Cramer's 'Mad Money' Recap (Friday 8/25/18)

Finding Stocks Right for You: Cramer's 'Mad Money' Recap (Friday 8/25/18)

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%

Replay: Jim Cramer on the Markets, 10-Year Yield, Oil Prices and Foot Locker

Replay: Jim Cramer on the Markets, 10-Year Yield, Oil Prices and Foot Locker