Iranian Foreign Minister Mohammad Javad Zarif resigned without warning late Monday, offering an "apology" to the nation as the nuclear deal he negotiated with world powers is on the verge of collapse after the U.S. withdrawal from the accord.

Zarif's resignation, if accepted by Iran's relatively moderate President Hassan Rouhani, would leave the cleric without one of his main allies in pushing the Islamic Republic toward further negotiations with the West. There was no immediate reaction from the U.S.

It remains unclear why Zarif chose to leave his post now and what effect it will have on the atomic accord, which Iran has been complying with. He likely briefed Supreme Leader Ayatollah Ali Khamenei before offering his resignation. Khamenei, who has final say on all state matters, previously backed the American-educated envoy through the nuclear negotiations.

Get Breaking News Delivered to Your Inbox

The veteran diplomat first hinted at his resignation with a vague Instagram post in which he offered an "apology" for his "inability to continue to his service." The post included a drawing honoring Fatima, the daughter of the Prophet Muhammad, as Iranians commemorate her birth Tuesday.

A Foreign Ministry spokesman, Abbas Mousavi, confirmed to the state-run IRNA news agency minutes later that Zarif had resigned but gave no reason for his departure.

Earlier Monday, Zarif met with members of the activist group Code Pink in Tehran, smiling as he posed for a photograph with them. However, he was not seen in images later in the day showing Syrian President Bashar Assad meeting with Khamenei and Rouhani. Iran has been one of Assad's main supporters during the years-long war in Syria.

On Sunday, Zarif criticized Iranian hard-liners in a speech in Tehran, saying: "We cannot hide behind imperialism's plot and blame them for our own incapability."

"Independence does not mean isolation from the world," he said.

Analysts say Rouhani faces growing political pressure from hard-liners within the government as the nuclear deal unravels. Iranian presidents typically see their popularity erode during their second four-year term, but analysts say Rouhani is particularly vulnerable because of the economic crisis assailing the country's rial currency, which has hurt ordinary Iranians and emboldened critics to openly call for his ouster.

Reaction to Zarif's resignation was swift. A prominent reformist lawmaker, Mostafa Kavakebian, wrote on Twitter that Rouhani should reject Zarif's resignation as his departure would only "make enemies of Iran's dignity happy."

Hassan Mohammadi, a Tehran-based political analyst close to Rouhani, said he understood it was Zarif's third time submitting his resignation in the last year.

"It is part of plan for changing the track in foreign policy in Iran. A negotiation-seeking foreign minister is not a favored person anymore," Mohammadi told The Associated Press. "Iran needs a tough foreign minister from now on. Someone who does not offer smile towards the West."

The son of a wealthy family, Zarif overcame hardline objections and Western suspicions to strike the accord with world powers that saw Iran promise to limit its enrichment of uranium in exchange for the lifting of crippling economic sanctions.

But the deal was later challenged by the Trump administration, which pulled America out of the accord. In doing so, President Trump also fueled doubts of Iranians still wary of U.S. interests decades after Iran's 1979 Islamic Revolution. Zarif himself faced withering criticism at home after he shook hands with President Barack Obama.

Meanwhile, officials in the Trump administration have also been pressuring Iran through social media, with one State Department official tweeting an unflattering GIF of Zarif saying: "How do you know @JZarif is lying? His lips are moving."

Zarif, 59, served as Iran's ambassador to the United Nations from 2002 to 2007, first under reformist President Mohammad Khatami and then under hardline President Mahmoud Ahmadinejad.