CALGARY -- Canadian Natural Resources has struck a blockbuster $12.74-billion deal to buy Alberta oilsands assets from Royal Dutch Shell and Marathon Oil, boosting its exposure to the higher-cost sector even as soft crude prices prompt some large foreign players to exit.

The deal announced Thursday would see Canadian Natural (TSX:CNQ) buy Shell's 60 per cent stake in the Athabasca Oil Sands Project, which includes a mine north of Fort McMurray, Alta., and the Shell-operated Scotford bitumen upgrader and Quest carbon capture project northeast of Edmonton.

Separately, Houston-based Marathon Oil (NYSE:MRO) would sell its 20 per cent stake in Athabasca to Shell and Canadian Natural, who would pay US$1.25 billion each.

Canadian Natural investors welcomed the deal, bidding the stock up nearly 10 per cent higher to close at $43.31 on the S&P/TSX composite index. Financial analysts noted it would boost Canadian Natural's earnings and cash flow and strengthen its stable of long-life producing assets.

"We like the deal as CNRL is buying an upgraded oilsands mining project at metrics lower than it costs to build," said analyst Arthur Grayfer of CIBC Capital Markets.

Alberta's oilsands, the third-largest proven oil reserves in the world, are also among the most costly and carbon-intensive to produce from and many companies have reconsidered their exposure. Earlier this year, Norway's Statoil closed its deal to sell all of its Canadian oilsands assets for $832 million.

Canadian Natural CEO Steve Laut made clear on a conference call that he thought he was getting a good price.

"This deal is highly accretive on all per share metrics and we'll be able to acquire a world-class mine that is up and running for a 40 per cent discount to what it would cost to build," he declared.

The transaction would boost Canadian Natural's overall output of bitumen and conventional oil and gas to more than one million barrels per day if it closes as expected by mid-2017.

Canadian Natural would pay Shell a total of $11.1 billion, comprised of about US$5.4 billion in cash plus 98 million shares.

Shell is also selling its Peace River thermal oilsands assets, including its shelved Carmon Creek project, and undeveloped oilsands leases to Canadian Natural.

Shell CEO Ben van Beurden said in a statement the deal allows the company to focus on assets such as deepwater oil and gas that offer higher returns on capital.

"Our people have built a really strong, competitive and environmentally responsible oilsands business over the last several decades, but oilsands mining and in situ operations are no longer a strategic fit for Shell," said Shell Canada president Michael Crothers on a conference call.

Marathon announced the oilsands sale in a news release that also revealed it would spend US$1.1 billion to buy U.S. shale assets.

Upon completion of the deal, Canadian Natural will take over from Shell as operator of the Athabasca mining assets, located east across the Muskeg River from its Horizon oilsands mine.

Shell would continue to operate the upgrader and Quest. It would retain 100 per cent ownership of the neighbouring Scotford refinery and chemicals plants.

Canadian Natural says as part of the agreements, it will welcome about 3,100 employees from Shell and Marathon Oil. About 2,760 of them work at the mines, 110 are at the Peace River in situ operations and 230 are based in Calgary.

Federal Natural Resources Minister Jim Carr, in Texas attending a major energy conference, said he didn't see the sale as a lack of confidence by foreign investors in Canada's energy sector.

"We believe that in the long run, investors will see the Canadian oil and gas industry as a good place to invest," Carr told reporters Thursday.

"There will be other investors who see Canada, known for its innovation and its entrepreneurship as a place where an investment makes a lot of sense.