Iran's foreign minister abruptly announced his resignation via an Instagram post earlier this week - sparking rumors of a top-level fallout - but the president refused to accept it.
Javad Zarif said he was stepping down and apologized for "shortcomings" with his work in a surprise Instagram post on Monday.
In a post showing a painting of a hooded white figure, overlaid with yellow Persian script, Zarif said: "I would like to sincerely apologize for not being able to continue my service and for all my shortcomings during my service."
"I extend my gratitude for the generosity that dear and brave people of Iran and its respected authorities have had during past 67 months," he added.
But Iranian President Hassan Rouhani rejected the move on Wednesday, insisting in a statement that Zarif was key to resisting pressures that the US is putting on the country.
"I consider accepting your resignation against our country's interests, and I reject it," Rouhani said.
In the statement Rouhani also called Zarif "honest, brave, courageous, and pious," and said Zarif was "at the forefront of resisting the intense pressures of the United States."
"Stay on your path with strength, tact, and courage, and God will be alongside its righteous servants," he said.
Zarif has appeared to accept Rouhani's statement, saying in an Instagram post on Wednesday that his only concern was the "glory of foreign policy and the credibility of the foreign ministry."
Mahmoud Vaezi, Rouhani's chief of staff, on Tuesday also tweeted an image of Rouhani and Zarif working on a Microsoft Surface book while on a plane together, in a show of the two men's good will.
Ø³Ø®Ù†Ø§Ù† Ø§Ù…Ø±ÙˆØ² Ø±Ø¦ÛŒØ³ Ø¬Ù…Ù‡ÙˆØ± Ø¯Ø± ØªØ¬Ù„ÛŒÙ„ Ø§Ø² ÙˆØ²ÛŒØ± Ø§Ù…ÙˆØ± Ø®Ø§Ø±Ø¬Ù‡â€Œâ€ŒØ§Ø´ Ú¯ÙˆØ§Ù‡ÛŒ Ø±ÙˆØ´Ù† Ø¨Ø± Ø±Ø¶Ø§ÛŒØª Ú©Ø§Ù…Ù„ Ù†Ù…Ø§ÛŒÙ†Ø¯Ù‡ Ù…Ù„Øª Ø§ÛŒØ±Ø§Ù† Ø§Ø² Ù…ÙˆØ§Ø¶Ø¹ Ùˆ Ø¹Ù…Ù„Ú©Ø±Ø¯ Ù‡ÙˆØ´Ù…Ù†Ø¯Ø§Ù†Ù‡ Ùˆ Ù…ÙˆØ«Ø± Ø¯Ú©ØªØ± Ø¸Ø±ÛŒÙ Ùˆ Ù¾Ø§Ø³Ø®ÛŒ Ù…ØÚ©Ù… Ø¨Ù‡ Ø¨Ø±Ø®ÛŒ ØªØÙ„ÛŒÙ„ Ù‡Ø§ÛŒ Ù†Ø§Ø¯Ø±Ø³Øª ÙˆÙ…ØºØ±Ø¶Ø§Ù†Ù‡ Ø§Ø³Øª. Ø§Ø² Ù†Ø¸Ø± Ø¯Ú©ØªØ± Ø±ÙˆØØ§Ù†ÛŒ Ø¬Ù…Ù‡ÙˆØ±ÛŒ Ø§Ø³Ù„Ø§Ù…ÛŒ Ø§ÛŒØ±Ø§Ù† ØªÙ†Ù‡Ø§ ÛŒÚ© Ø³ÛŒØ§Ø³Øª Ø®Ø§Ø±Ø¬ÛŒ Ùˆ ÛŒÚ© ÙˆØ²ÛŒØ± Ø§Ù…ÙˆØ±Ø®Ø§Ø±Ø¬Ù‡ Ø¯Ø§Ø±Ø¯. pic.twitter.com/dQUVxGsksk— Mahmoud Vaezi (@Dr_Vaezi) February 26, 2019
Reports of Zarif's waning favor with Iran's President had been circulating in the run-up to Monday's rejected resignation.
Zarif was excluded from a top-level meeting between Syrian President Bashar al-Assad, Iran's supreme leader Ayatollah Ali Khamenei, and President Rouhani on Monday, BBC Persian reported.
Zarif reportedly told a centrist newspaper this left him with "no credibility in the world as Iran's foreign minister."
Zarif also cited political infighting in the foreign ministry as a reason for his departure, in a Tuesday interview with newspaper Jomhuri Eslami.
"The deadly poison for foreign policy is for foreign policy to become an issue of party and factional fighting," he said.
Zarif's Instagram resignation took much of the world by surprise, Business Insider's Alex Lockie reported on Monday.
Under Zarif, Iran made massive inroads outsized for the country's economy and population. Zarif also spoke at conferences hosted by Washington, DC think tanks and made trips to Latin America while promoting Iran's anti-US, revolutionary ideology.
But he also faced criticism by various anti-Western factions in Iran last year, when the US pulled out of the 2015 US-Iran Joint Comprehensive Plan of Action (JCPOA) and reinstated sanctions on the country.
Also from Business Insider South Africa: