Iran's President Hassan Rouhani warned the US against tearing up the nuclear deal as he was inaugurated for a second term Saturday, but he also faces challenges closer to home amid accusations he is rolling over to conservatives.
Rouhani met with EU foreign policy chief Federica Mogherini before the ceremony and called for greater efforts to safeguard the 2015 nuclear deal between Tehran and world powers in the face of new US sanctions.
"Iran will not be the first to violate the nuclear deal... but nor will it stay silent when the United States fails to respect its commitments," he told the packed parliament hall.
"Iran has proved that it will respond to respect with respect, and to sanctions and threats with an appropriate response and with resistance," he added.
Some of Iran's older friends, including Zimbabwean President Robert Mugabe, also attended the ceremony which came two days after Rouhani was officially sworn in by supreme leader Ayatollah Ali Khamenei.
The emir of Qatar, which has fallen out with its Gulf allies in part over ties to Iran, was notably absent, despite attending Rouhani's last inauguration in 2013.
Reformist criticism
But among Iranians, the real attention was on who would be named to Rouhani's new cabinet.
He has already been barraged with criticism over indications that women would again be entirely absent and that his reformist allies would barely be represented.
Rouhani's last government had three women among a large cohort of vice-presidents, but they lacked ministerial roles that would require approval by parliament.
"It was the reformists that allowed him to win the elections in 2013 and 2017... he must listen to those who supported him," Rassoul Montajabnia of the reformist National Confidence party told the Arman newspaper.
Rouhani won a convincing victory over hardline cleric Ebrahim Raisi in the May presidential election, vowing to continue rebuilding ties with the West and easing social restrictions at home.
That helped win over the reformists - whose candidates dropped out of the last two elections to ensure his victory.
"Rouhani created a lot of expectation and now there is a sense that he is retreating from his promises," said Ali Shakourirad, head of the reformist People's Unity Party.
The absence of women was down to pressure from religious conservatives behind the scenes, Shakourirad said.
"Rouhani didn't want to make his task any more complicated than it already is," he told AFP.
The final line-up is due to be announced in coming days, and must then be approved by parliament.
Backroom bargaining
Despite the furore, the reshuffle is not expected to touch big names such as Foreign Minister Mohammad Javad Zarif and Oil Minister Bijan Namadar Zanganeh.
"The main ministers are very likely to stay in place," said Henry Smith, Iran analyst with consultancy Control Risks.
"Rouhani will have a fairly smooth time getting parliament to approve his appointees. He's been doing back and forth consultations with the necessary power centres - the parliament speaker, supreme leader, the Revolutionary Guards - and I don't think you'll see a significant change in economic or indeed social policy," he added.
Despite his efforts to build backroom consensus, hardliners have given Rouhani a rough ride since his election, perhaps worried at the growing strength of the reformists.
The arrest of his brother on corruption charges was interpreted by some as a shot across the bow by the hardline judiciary.
Rouhani also triggered a war of words with the Revolutionary Guards after criticising their outsized role in the economy, although analysts say this is part of a cautious realignment of Iran's policies to balance its security priorities with the need to attract investment.
"Rouhani has no interest in pushing the Revolutionary Guards totally out of the economy. It's about creating enough space so Iran can get the foreign investment and technology it needs," said Smith.
Investment has belatedly started to arrive in the wake of the 2015 nuclear deal that eased sanctions in exchange for curbs on Iran's nuclear programme, notably through last month's billion-dollar gas deal with France's Total and China's CNPC.
Billions more are needed to jump-start the stagnant economy and tackle a jobless rate of 12.7 per cent.
But with Washington imposing yet more sanctions this week, Iran's re-engagement with the world remains largely stalled.
"The problem is Iran feels the need to react to these moves by the US, which just give the US fuel," said Smith.
Mogherini held a meeting ahead of the inauguration with Zarif, who criticised European governments for their support of US calls for UN action in response to an Iranian satellite launch on July 27.
"This is the wrong path," Zarif said.