Iran’s high-profile foreign minister rescinded his resignation less than 36 hours after he announced his departure from his position in an Instagram post.

Mohammad Javad Zarif, Iran’s top diplomat and a pillar of the 2015 nuclear deal between Tehran and world powers, was back at work Wednesday standing alongside president Hassan Rouhani to welcome Armenian prime minister Nikol Pashinyan to the Iranian capital on a state visit broadcast live on television.

Hours earlier Mr Rouhani formally rejected Mr Zarif’s resignation.

“It is the belief of myself and the supreme leader you are a trusted, brave and devout individual standing on the front line against America’s multilateral pressures,” Mr Rouhani wrote in a letter published Wednesday on the official presidential website. “I think your resignation is against the country’s interests and I do not accept it.”

The show of support could bolster Mr Zarif’s position within the Iranian political establishment – but it could also paint Mr Zarif as a somewhat thin-skinned and petty political player after he allegedly resigned after being excluded from meetings with the Syrian president.

Revolution in Iran: In pictures Show all 11 1 /11 Revolution in Iran: In pictures Revolution in Iran: In pictures A demonstration against the Shah in 1979 Getty Revolution in Iran: In pictures Armed women on guard in one of the main squares in Tehran at the beginning of the Iranian Revolution Getty Revolution in Iran: In pictures Demonstrators hold a poster of Ayatollah Ruhollah Khomeini, in January 1979, in Tehran, during a demonstration against the Shah AFP/Getty Revolution in Iran: In pictures Iranian rebels pose with a U.S. flag they bayonetted upside down on trees at Sultanabad Garrison northeast of Tehran on February 12 2019 AP Revolution in Iran: In pictures A gun battle in Khorramshahr during the revolution, 1979 Getty Revolution in Iran: In pictures Ayatollah Khomeini's supporters demonstrate in the streets of Tehran against the Shah among tear gas. The "black friday" caused the death of 200 people according to the Iranian government, 2000 according to the opposition, September 8 1978 AFP/Getty Revolution in Iran: In pictures Women wearing the traditional Chador demonstrate in the streets of Tehran against the Shah on September 7 1978 AFP/Getty Revolution in Iran: In pictures Demonstrators in Tehran calling for the replacement of the Shah of Iran during the Iranian Revolution, 1979. They carry placards depicting Ayatollah Mahmoud Talaghani, one of the leading revolutionaries Getty Revolution in Iran: In pictures Ayatollah Khomeini's supporters demonstrate in the streets of Tehran against the Shah. The "black friday" caused the death of 200 people according to the Iranian government, 2000 according to the opposition, September 8 1978 AFP/Getty Revolution in Iran: In pictures Thousands of the Ayatollah Khomeini's supporters on the streets of Tehran calling for the religious leader's return in January 1979 Getty Revolution in Iran: In pictures The Iranian Islamic Republic Army demonstrates in solidarity with people in the street during the Iranian revolution. They are carrying posters of the Ayatollah Khomeini, the Iranian religious and political leader Getty

Mr Zarif’s continued service will come as a relief to western diplomats seeking to uphold the Joint Comprehensive Plan of Action (JPCOA), the 2015 nuclear deal, after the US pulled out of the historic accord last year. Many had feared Mr Zarif’s departure could weaken attempts to keep Iran’s nuclear programme in check.

“People are policy, and having made the deal, he would be one of its most fervent advocates inside the system,” a former senior western official who was closely involved in the years-long negotiations preceding the deal told The Independent.

Mr Zarif announced his resignation hours after photos appeared online showing him being excluded from meetings during a state visit by Syria’s ruler, Bashar al-Assad.

But Mr Rouhani and scores of Iranian lawmakers and diplomats demanded he stay on.

Iranian news outlets across the political spectrum asked him to also remain in his position. Even conservative voices such as Vatan-e Emrooz, which described his resignation as “childish”, opined that he should stay. The hardline Kayhan, declared: “It is no time to resign. Resolve quarrels in the cabinet.”

Key support also came from Qassem Soleimani, commander of the Revolutionary Guard’s foreign expeditionary force. Photos of Mr Soleimani with Mr Rouhani and Mr Assad had apparently rankled Mr Zarif, who claimed his absence from a key state visit weakened his position internationally. But Mr Soleimani said Mr Zarif’s absence was the result of a slip-up.

“Mr Zarif is definitely responsible for the Islamic Republic’s foreign policy and during his tenure at the Foreign Ministry he has constantly had the support of the establishment’s highest authorities, including the supreme leader,” he said, referring to Ayatollah Ali Khamenei, the country’s highest authority, in a statement carried by news outlets.

In an Instagram post published Wednesday morning, around the same time Mr Rouhani formally rejected his resignation, Mr Zarif vowed to continue in his job.