MOSCOW – Turning the page on former disappointments, the world's energy giants are flocking to Russia, whose vast resource riches look even more tempting at a time of turbulence in the Middle East.

In just a matter of weeks, the country has put the finishing touches on a clutch of joint exploration and share-swap agreements whose negotiation seemed impossible just a few years ago.

But with natural gas production stagnant and new oil wealth resting in hard-to-reach reserves, Russia is swinging the door open to Western companies, their presence now seen as essential to the country's economic growth.

"Russia is today the go-to place for energy deals," said Chris Weafer, chief strategist at Moscow-based UralSib Bank.

"It has the resource base, is open for business with clear investment rules and it is a lot safer than other resource-rich countries."

The ball began rolling in January, when BP and Rosneft -- Russia's number one oil company, which is controlled by the state -- announced a massive deal that was blessed personally by Prime Minister Vladimir Putin.

The country's de facto leader has since voiced frustration at a BP boardroom dispute involving its Russian joint venture that is preventing the $16 billion share-swap and Arctic drilling project from going ahead.

But analysts doubt that Rosneft will turn on the British company, its interest in foreign players confirmed by a similar agreement for Black Sea exploration that was signed later that month with Exxon Mobil.

The head of France's Total said his firm's decision to pay $4 billion for a 12-percent stake in the private natural gas producer Novatek -- a surprise deal announced on March 2 -- was logical.

"The upheavals taking place in a number of the oil and gas producing countries now send a signal to investors to come to Russia, because it offers much safer environment for investment," said Total Chief Executive Christophe de Margerie.

Russia being considered as a safe place for investment seemed unlikely just a few years ago.

With energy prices on the rebound, former president Putin had orchestrated an unrelenting campaign to place foreign stakes in Russian resources back in the hands of Rosneft and Gazprom, the state's opaque natural gas holding.

Shell, the British-Dutch major, ceded its operation of the lucrative Sakhalin 2 field in the Pacific to Gazprom in 2007, with Japan's Mitsui and Mitsubishi also suffering in the deal.

And as recently as 2010, Exxon Mobil seemed in danger of losing control of the area's Sakhalin 1 project, which hopes to send gas by pipeline to customers in energy-hungry China.

But Exxon Mobil has thus far been able to keep its 30-percent share of the field -- a figure that analysts said corresponds to Russia's current foreign investment strategy.

"Western companies are now joining specific projects as minority shareholders, with Russian companies retaining control," said Nikolai Petrov, an analyst with the Carnegie Moscow Centre.

"This is the only way foreigners can play," he said. "But in return, they have confidence in clearly-defined rules and are certain about the safety of their investments."

The strategy has the benefit of not only helping Russia develop fields in hard to reach places, but also improving the profile of state corporations whose image puts an outsized risk premium on their stock.

These seemingly obvious rewards are getting increasing notice, with the anti-monopoly service suggesting an easing of rules that allows foreigners to hold up to 25 percent of a "strategic asset" without state approval.

The current barrier stands at 10 percent, meaning that any serious deal involves not only boardroom but also state-level negotiations.

"This proposal demonstrates the state's softer, more liberal approach," said Petrov. "At the same time, Putin's government still has control over all the big deals."

This reality makes any decision carry inherent political risks. But analysts said most foreigners are currently willing to put up with these, as long as the rules do not change.

"The attractiveness of Russia's resources overshadows country risk," Moscow's Alfa Bank observed in a research note.