(Reuters) - Chesapeake Energy Corp CHK.N on Tuesday agreed to buy Texas oil producer WildHorse Resource Development Corp WRD.N in a nearly $4 billion cash-and-stock deal that knocked down the natural gas producer's shares by more than 12 percent.

FILE PHOTO - Chesapeake Energy Corporation's 50 acre campus is seen in Oklahoma City, Oklahoma, on April 17, 2012. REUTERS/Steve Sisney

Investors have punished shares of oil and gas producers that have struck deals this year for higher production instead of focusing on improved returns. Denbury Resources DNR.N, Concho Resources CXO.N and Diamondback Energy FANG.O each fell after disclosing acquisitions this year.

WildHorse shareholders will get either 5.989 shares of Chesapeake common stock, or a combination of 5.336 shares of Chesapeake stock and $3 in cash, for each share held, under terms of the agreement.

The offer implies a 21 percent premium to WildHorse’s closing price on Monday, while the stock-and-cash option represents a 24 percent premium.

The deal, which includes assumption of WildHorse’s debt of $930 million, will increase Chesapeake’s shares outstanding by up to 90 percent, diluting existing holders’ stakes.

WildHorse’s shares were up 4.7 percent at $19.26 while Chesapeake’s fell 46 cents to $3.26 in midday trading amid a volatile market.

“Investors first response any time they see a company focus on growth is to sell off the stock, believing it pushes the free cash flow horizon further out,” said Andrew Dittmar, a mergers and acquisition analyst at DrillingInfo.

The acquisition is expected to give Chesapeake about 420,000 net acres in the Eagle Ford shale and Austin Chalk formations in Texas, and help save between $200 million and $280 million in annual costs over the first five years, the companies said.

The Austin Chalk, which lies atop the Eagle Ford, is undergoing a renaissance as oil producers deploy technology developed in the shale boom to boost output.

“The complementary WildHorse assets build upon our existing Eagle Ford position and with our Powder River Basin position gives us two powerful oil growth engines in our portfolio,” Chesapeake Chief Executive Doug Lawler said on a call with analysts.

Chesapeake has been directing its capital toward oil production against a backdrop of rising crude prices and declining natural gas prices. The combination would reduce the company’s gas-to-oil split to 68 percent gas, from 72 percent, said analysts at Sanford C. Bernstein.

Lawler said the acquisition would allow Chesapeake to generate free cash flow “much sooner” than without the deal. The company aims to generate free cash flow equal to costs in 2020, he said Tuesday.

The Oklahoma City-based company said its shareholders will own about 55 percent of the combined company, while WildHorse shareholders, including private-equity firm NGP, will own the rest.

Chesapeake said it plans to finance the cash portion of the deal, expected to be between $275 million and $400 million, through its revolving credit facility.

Oklahoma-based Chesapeake posted a net profit of $60 million for the third quarter, following a loss of $41 million a year earlier.

Excluding one-time items, the company earned 19 cents a share, topping estimates for 15 cents, according to Refinitiv data.

Revenue rose to $2.42 billion from $1.94 billion.