Tehran, Iran - Iran's President Hassan Rouhani staked his legacy on efforts to end decades of tension with the West. With the landmark nuclear deal unravelling, what hope is there for his political future?
Regardless of whether US President Donald Trump tears up the 2015 nuclear deal that was the centrepiece of Rouhani's diplomatic efforts, it is clear that the traditional animosity between the US and Iran has returned for the foreseeable future.
"Rouhani bet big on the nuclear deal and invested all his political capital in it," said Mojtaba Mousavi, a political analyst in Tehran.
"Now the deal is gasping its last breaths, and so Rouhani is losing everything -- all his economic and political plans -- that he built on the back of the nuclear deal," Mousavi told AFP.
- A boon for conservatives -
From the start, Rouhani's conservative opponents were deeply suspicious of his negotiations with Washington, and their fears were borne out when it became clear that US pressure would continue to hobble Iran's trade ties even after the 2015 deal.
With his constant threats to tear up the accord, Trump has ensured the world stays wary of doing business with Iran.
"The uncertainty around the JCPOA (nuclear deal) is a victory for the conservatives who feed off the hostility of US foreign policy to reinforce internal repression and limit the reach of the Islamic republic's elected institutions," said Clement Therme, an Iran expert with Britain's International Institute for Strategic Studies.
Behind-the-scenes conservative forces have made their presence felt in recent months, with sweeping arrests of dual nationals and NGO workers on espionage charges, the blocking of Iran's most popular social media app Telegram, and pressure on high-profile reformers that forced the resignation of Tehran's mayor and a top environmental official.
Rouhani has overseen a moderate easing of social restrictions, but in Iran the presidency is only one of many power centres.
He faces powerful conservative forces embedded in the clergy, the judiciary and a Guardian Council with veto power over laws and election candidates, not to mention the over-riding authority of the supreme leader, Ayatollah Ali Khamenei.
"Rouhani has totally flunked on all his promises, but he has doubled down on the reform rhetoric recently, trying to maintain his popular base and finger-pointing at the conservatives," said Ardavan Amir-Aslani, an author and international lawyer with an office in Tehran.
"But opening a few new cafes and letting women push their headscarves back a few inches are not the fundamental reforms that Iran needs," he added.
- Need for unity -
What may save Rouhani from being completely sidelined is the establishment's fear of a greater unravelling.
Protests in December and January showed that anger over the economy and civil liberties was much wider spread than in the past, affecting dozens of second-tier towns and cities.
"I think the leader (Khamenei) is still trying to help Rouhani. Protecting the prosperity and unity of the country is his top priority, especially in this tough situation," said Mousavi.
Rouhani won a second term as president a year ago, with the backing of reformists who saw him as the best option from the small selection allowed to stand by the Guardian Council.
There were never any illusions that he was a radical reformer -- he has been a regime insider from the earliest days of the Islamic revolution -- but many were still disappointed when his promises of reform fell flat.
"Some of the criticism is unfair. Rouhani has done great things. There is more openness, less morality police, journalists are somewhat freer," said a reformist journalist, who asked to remain anonymous.
"But he is ultimately a man of the system and wants to remain one. His identity is tied up with being part of the system -- if he denies it, he denies himself."
For now, Rouhani has stuck to his guns, strongly criticising the censorship of social media and slamming officials for failing to respond effectively to popular anger.
But he faces a difficult challenge, having to respond to Trump without derailing his wider diplomatic efforts.
"The smart move would be to wait out the end of Trump's mandate, stay in the nuclear deal and build up something with the Europeans, however limited. Wait until this blows over," said Amir-Aslani.
"That's what they should do -- but we'll see."