Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Iranian Foreign Minister Mohammad Javad Zarif has submitted his resignation, two sources familiar with the matter told NBC News.

Zarif announced his resignation on Instagram Monday. Iran's state-run IRNA news agency reported that it was accepted by Iranian President Hasson Rouhani.

But Mahmoud Vaezi, Rouhani's chief of staff, later tweeted that the news report was false and that Rouhani has not accepted Zarif's resignation. Alireza Miryousefi, a spokesman for the Iranian mission to the United Nations, also said Rouhani has yet to accept the resignation.

Zarif, who played a key role in the 2015 Iran nuclear deal negotiations, was appointed foreign minister in August 2013.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"I am very grateful and thankful towards the nation and officials of this brave nation," Zarif wrote on his Instagram page. "I apologize for the incapability to continue my services and the shortcomings in my tenure as foreign minister."

In an interview with NBC News earlier this month, Zarif warned the United States and its allies that going to war with Iran would be "suicidal." He accused Washington of having a "pathological obsession" with his country.

"I'm not saying President Trump's administration, I'm saying people in President Trump’s administration are trying to create the same eventuality and I believe they will fail," Zarif said.

The comments came after Israeli Prime Minister Benjamin Netanyahu made a statement that was translated by his office as urging "war with Iran."

In the NBC News interview, Zarif also appeared to dismiss the idea of renegotiating the landmark 2015 Iran nuclear deal that aimed to curb the country's weapons program in exchange for sanctions relief. President Donald Trump announced last May that he was withdrawing from the deal.

Zarif has strong ties to the U.S. Born in 1960, he moved to California at 17. He went on to earn degrees in international relations from San Francisco State University and the University of Denver.

Adept at social media, Zarif regularly took to Twitter to respond to attacks by Trump. After Trump posted an all-caps tweet threatening Iran's president last July, Zarif offered a typically blunt retort.

"COLOR US UNIMPRESSED," Zarif wrote. "...We've been around for millennia & seen fall of empires, incl our own, which lasted more than the life of some countries. BE CAUTIOUS!"