Tehraninfo-icon: The office of Iranian President Hassan Rouhani early Tuesday confirmed the resignation of Foreign Minister Mohammad Javad Zarif but said that the president would not accept it.

Zarif had carried out his work courageously and would continue to do so, the president's office said on its Instagraminfo-icon page. "Zarif will not be alone and we [the government] will all support him," the post added.

Zarif unexpectedly announced that he would be stepping down from the post via an Instagram post late Monday.

Local observers expressed surprise at the timing of the announcement, shortly before midnight, and predicted that Rouhani would reject it.

The reasons for his resignation were hotly disputed on social mediainfo-icon, with some claiming he had had enough of constant criticism from hardliners of the 2015 nuclear deal he negotiated and the government's policy of rapprochement with the West.

Others said that he had been angered by his exclusion from a meeting with Syrian President Bashar al-Assad on Monday.

Zarif offered an apology for his "shortcomings" in the unexpected message on Instagram on Monday, with prominent members of parliament immediately calling for Rouhani not to accept the resignation.

Zarif, 59, has served as Rouhani's foreign minister since August 2013 and has been under constant pressure from hardliners who opposed his policy of detente with the West.

"I apologise for my inability to continue serving and for all the shortcomings during my term in office," Zarif said in the message posted on his verified Instagram account.

He thanked Iranians and "respected officials" for their support "in the last 67 months".

The resignation was confirmed by an informed source, however in a tweet, Rouhani's chief of staff strongly denied reports it had been accepted by the president.

Zarif gave no explanation for his resignation.

But it came hours after a surprise visit to Tehran by Syrian President Bashar al-Assad, who has been a major recipient of Iranian aid during his country's nearly eight-year civil warinfo-icon, and Iraninfo-icon's Entekhab news agency reported the two appeared to be linked.

According to the semi-official ISNA news agency, Zarif was not present at any of Assad's meetings with Iran's supreme leader Ayatollah Sayed Ali Khamenei and Rouhani.

Entekhab said it tried to reach Zarif and received the following message: "After the photos of today's meetings, Javad Zarif no longer has any credibility in the worldinfo-icon as the foreign minister!"

In an interviewinfo-icon with the conservative Jomhoori Eslami daily published on Tuesday, Zarif said "everything will be lost, when there is no trust in the manager of foreign policyinfo-icon."

Mostafa Kavakebian, a reformist MP, was among those urging Rouhani not to accept Zarif's resignation. "Undoubtedly the Iranian people, government and state will not benefit from this resignation," he said.

"A great majority of MPs demand that the president never accept this resignation," he said in a tweet.

ISNA reported that a petition in support of Zarif had been signed by a majority of MPs.

Top USinfo-icon diplomat Mike Pompeo dismissed his counterpart's announcement, tweeting : "We note @JZarif's resignation. We'll see if it sticks.

The head of parliament's influential national security and foreign policy committee told ISNA how a planned trip to Geneva with Zarif on Monday afternoon had been cancelled at the last minute without explanation.

"I suddenly got a text message saying the trip has been cancelled," Heshmatollah Falahatpisheh told ISNA, adding that this was not the first time Zarif had resigned.

"That he has done so publicly this time means that he wants the president to accept it this time," he added.

Zarif's standing within Iran's political establishment took a hit when US President Donald Trumpinfo-icon abandoned the nuclear accord last year and reimposed crippling unilateral sanctions.

The face-off between the minister and his critics only intensified as time passed, with Zarif saying his main concerns throughout the nuclear talks had been about pressure from inside Iran.

"We were more worried by the daggers that were struck from behind than the negotiations," he told the Jomhoori Eslami newspaper in a February 2 interview. "The other side never managed to wear me down during the negotiations... but internal pressure wore me down both during and after the talks."

The latest point of contention between Zarif and hardliners has been the implementation of the Financial Action Task Force's requirements regarding money laundering in Iran.

The rift on the issue, which has been on of the obstacles to Zarif's efforts to maintain European trade and investment despite the renewed US sanctions on Iran, has pitched the government against parliament and the Expediency Council, a key arbitration body.

In his interview with Jomhoori Eslami, Zarif said partisan disputes over foreign policy were "a deadly poison."

On Sunday, ISNA reported that Zarif had warned the Expediency Council, it should "understand the consequences of its decision."

His comments were swiftly seized on byultra-conservative MPs who had made an aborted attempt to impeach him last year.

They accused him of threatening the council.