Us oil producer devon energy has agreed to buy rival wpx in a deal valued at $12bn, the biggest in the shale industry since the collapse of crude prices earlier this year.

The transaction unites the two companies in a bet on the permian, the worlds most prolific oilfield, which stretches between texas and new mexico and is the heart of the us shale industry.

Devon said that under the terms of the agreement announced on monday, wpx investors will receive 0.5165 devon shares for each wpx share they own. the $12bn value of the transaction includesthe debts of both companies. devon shareholders will own approximately 57 per cent of the new company, to be called devon energy.

This merger is a transformational event for devon and wpx as we unite our complementary assets, operating capabilities and proven management teams to maximise our business in todays environment, said dave hager, devon chief executive, who will become chairman of the new company.

Rick muncrief, head of wpx, will become chief executive of the merged company. the new operator would be one of the largest unconventional energy producers in the us, he said.

In april, us crude prices briefly traded below zero, prompting widespread misery in the countrys oil sector.

Amid rising job losses and dozens of bankruptcies, and a near-25 per cent drop in us oil output, analysts had expected a wave of consolidation in the sector. but aside from chevrons agreement to buy noble energy, which holds international and us shale assets, dealmaking has been relatively thin so far.

The shale patch has grown notorious among investors for its failure to generate profits or return capital.

But devonsaid the deals synergies would yield $575m in annual cash flow improvements by 2021. it would be immediately accretive in earnings, free cash flow, and invested capital, it said. the new company would pay a fixed plus variable dividend.

Andrew gillick, energy sector strategist at enverus, a consultancy, said the deal bolsters devons basin-leading position in the permian and allows wpx shareholders to be part of a platform that delivers the cash flow and return of capital investors are looking for.

Devon was an early us shale pioneer, buying mitchell energy one of the patchs original developers in 2002, years before us oil and gas output began to soar. the companys market capitalisation hit more than $60bn in 2008 but was just $3.4bn before the deal was announced. wpxs was just $2.5bn.

Devon said both boards and some key institutional shareholders had approved the deal. both companies share prices, down by about two-thirds since the start of the year, were up by more than 12 per cent in pre-market trading on monday.