West's hunt for alternative oil and gas helps Tehran with one official saying 'Now Russia is the bad guy. Time is on our side'

The Ukraine crisis has strengthened Iran's hand in its nuclear talks and other dealings with the west by reminding European countries and the Obama administration of its potential as a major alternative energy supplier if Russia cannot be relied upon, officials and analysts in Tehran say.

But even as it attempts to play the Russia card, the government of President Hassan Rouhani is simultaneously stressing closer bilateral ties with Vladimir Putin's Kremlin as a means of mitigating the impact of US, EU and UN economic sanctions, imposed in the still-unresolved row over Iran's nuclear programme.

"The western countries are imposing sanctions on Russia [after its annexation of Crimea]. Now Russia is the bad guy," said Amir Mohebbian, a government adviser. "This has made the situation better for Iran's nuclear negotiators. Time is on our side. If we sit here long enough, it will all come to Iran."

It was not for Iran to say who was right or wrong in Ukraine, said Mohammad Marandi, an international relations expert at Tehran University. "But of course if Iran is no longer under sanctions, the Europeans would have many more choices regarding energy. At the same time, if the sanctions continue, Rouhani may move closer to Russia and China."

Majid Takht Ravanchi, deputy foreign minister and a member of Iran's nuclear negotiating team, said Iran would focus solely on details of a deal to lift sanctions when nuclear talks resumed in Vienna this week. But he did not deny Ukraine had placed matters in a new light.

"Naturally Iran and Europe could have much better cooperation on the economy, trade, energy. We believe there is much room for improvement," Ravanchi said.

The extent to which Iran could become Europe's alternative energy supplier is borne out by statistics, and by growing western commercial interest in its energy sector.

Iran is the third largest Opec oil producer after Venezuela and Saudi Arabia. It controls an estimated about 13% of the world's recoverable crude oil reserves and the world's second largest natural gas reserves.

Despite sanctions that severely limit cash sales of Iranian energy, an international oil, gas, refining and petrochemicals exhibition in Tehran last week attracted 1,800 companies, among them 600 foreign companies from 32 countries including the US and Britain.

China is one of Iran's biggest customers, owing an estimated $22bn (£13bn) for oil and gas supplies, which cannot be paid due to banking sanctions. Details emerged last week of plans for China to invest an equivalent sum in electricity and water projects as a way of circumventing the restrictions.

Similar barter deals are now in the pipeline with Russia. Last month the Mehr news agency reported a planned $8bn-$10bn energy deal in which Russia would supply electricity, generating plants and a transmission network. The US says an earlier proposal for Iran to supply 500,000 barrels of oil a day in return for Russian products would violate sanctions.

Speaking last month as the Ukraine crisis intensified, Rouhani went out of his way to praise Russia. "Strong political ties in bilateral, regional and international domains, along with vast economic relations between the two countries, set the stage for the promotion of peace and stability," he said.

Rouhani's message to the west was plain: if there is no deal to end sanctions, Iran has strategic alternatives that the US, Britain and others may find unpalatable.

Western analysts worry the Iran-Russia relationship may expand into the security sphere. Concern centres on the sale of Russian advanced S-300 advanced anti-missile defence systems, which would provide Iran with state-of-the-art protection in the event of a hypothetical Israeli or American attack.

The sale, agreed in 2007, was blocked after Putin came under international pressure. But if Moscow's relations with the west deteriorate further, it is possible Russia's president could give it the green light.

Iran insists, meanwhile, that its missile capabilities, both offensive and defensive, cannot be part of talks with the west.

Despite the election victory of the more centrist Rouhani administration, Iran remains deeply at odds with the US on a range of other fronts extending beyond Russia and the nuclear talks.

The supreme leader, Ayatollah Ali Khamenei, and other hardline clerics persist in casting the US in the role of "Great Satan" or "global arrogance". They continue to castigate Israel at every opportunity, although former president Mahmoud Ahmadinejad's notorious threat to wipe it off the map is no longer repeated.

Iran is also embroiled in a regional power struggle with the key US ally, Saudi Arabia, and other Sunni Muslim Gulf states. This so-called proxy war has found its sharpest expression in Syria, where the Sunni-Shia divide is most evident, but it also extends to Bahrain, Yemen and even Afghanistan, Pakistan and Iraq.

A Tehran official said Iran was intent on curtailing the spread of extremist Wahhabi ideology and jihadism that flowed from Saudi Arabia's "wealthy mosques, teachers and banks". But there was also unanimous agreement on another, overriding objective: fulfilling Iran's destiny as the leading power of the Middle East, the official said.

The US should not try to thwart this ambition, said Mohebbian. "We need a new dynamic. The US and Iran should agree not to be friends and not to be enemies. The US [and Europe] should accept Iran as it is. It will be better for them not to have Iran as an enemy. It would be expensive for them in the long run, more than they can imagine."