Today, to many observers, it is Iran that looks like the responsible actor.

was tainted by a vicious crackdown on protests in 2009.

The US had a widely respected president in Barack Obama, while Iran had the rabble-rousing Mahmoud Ahmadinejad, who riled Western audiences with stunts such as Holocaust-denial conferences and

During the last sanctions period between 2010 and 2015, most of the world lined up behind Washington to help enforce embargoes aimed at curbing Iran's nuclear programme.

As it braces for the return of a US-enforced oil embargo on Monday, Iran can take comfort in how much stronger its diplomatic position looks compared to the past.

European and Asian governments were aghast that President Donald Trump abandoned their hard-won 2015 nuclear agreement with which Iran was complying.

Moscow and Tehran are now tightly intertwined as military allies in Syria, while China sees Iran as a test-case for how it can fend off its own US sanctions.

Meanwhile, the only powers that support the US position -- Saudi Arabia and Israel -- have faced mounting criticism over their own behaviour, particularly after the shocking murder of Saudi journalist Jamal Khashoggi.

"During the last round of sanctions, there was a very binary vision of Iran as the malign actor in the region, and all the others were in line with what European and other players wanted," said Ellie Geranmayeh, Iran analyst for the European Council on Foreign Relations.

"But now there's a much more complex and public debate about the other regional players and a realisation that everyone is playing a very dirty game in the Middle East. No one thinks Iran is a saint, but there's a more nuanced view," she added.

'Diplomatic suicide'

The problem for Iran is whether this diplomatic goodwill can translate into tangible benefits.

Sanctions have already thrust the country into recession, according to the International Monetary Fund, and analysts expect it to lose at least half its critical oil exports after November 5.

s economic benefits dry up (photo by: HO/KHAMENEI.IR/AFP/File)

Europe is working on special mechanisms to keep trade flowing, but its private companies have no interest in making an enemy of the US Treasury.

"Even if the Europeans are showing goodwill and inventing these bureaucratic mechanisms, the private sector is not interested in using them," said Clement Therme, Iran research fellow for the International Institute for Strategic Studies

.

Iran nonetheless hopes it can leverage the support of European and Asian governments to at least blunt the worst effects of sanctions.

But supreme leader Ayatollah Ali Khamenei has made clear Iran will not wait indefinitely if the nuclear deal's economic benefits dry up.

"It's a choice of bad and worst. The option of withdrawing from the JCPOA would be diplomatic suicide," said Therme, using the technical name for the nuclear agreement.

"Even if the political support from Europe, Russia and China is not perfect, it is better than nothing.

"But Iran's sense of dignity makes it very difficult to stay in the deal if all the major buyers stop buying oil or reduce their purchases."

Mohammad Marandi, a political analyst at the University of Tehran, said the question was still open in Iran's corridors of power.

"It's definitely not the end of the story. If the Europeans fail to stand up to US bullying and Iranians have serious problems exporting oil, I think Iran will move towards exiting the JCPOA," he said.

European plots

A spanner in the works has been accusations of terrorist and assassination plots against Iranian dissidents on European soil.

at President Donald Trump abandoned their hard-won 2015 nuclear agreement with which Iran was complying (photo by: NICHOLAS KAMM/AFP/File)

Denmark this week accused Tehran of plotting a foiled attack on members of an Arab-Iranian separatist group based in the country, and France says Iran's intelligence ministry planned to bomb a gathering of dissidents in Paris in June.

Iran denies the allegations and says they are spread by enemies to derail the nuclear deal.

Tehran remains confident it can weather the sanctions, with analysts pointing to its deep experience in using informal networks and smuggling to keep money flowing.

What worries them is the lack of a clearly defined end-game.

US Secretary of State Mike Pompeo has outlined 12 demands aimed at curtailing Iran's influence across the Middle East, but analysts say

these amount to an impossible demand for regime change.

"Under Obama, sanctions had a clear and achievable goal of bringing Iran to the negotiating table on the specific nuclear issue," said Geranmayeh.

"Pompeo's 12-point plan essentially demands the capitulation of the regime, which has left people scratching their heads about how sanctions could ever end."