Iran’s Foreign Minister Mohammad Javad Zarif has said he is stepping down, in a surprise announcement posted to his Instagram account.
He apologised for “shortcomings” during his time in government.
Mr Zarif played a prominent role in negotiating the landmark 2015 nuclear agreement between Iran and major international powers.
But the future of the deal has been put into doubt after US President Donald Trump ended US involvement.
Mr Zarif’s resignation was confirmed by Iran’s state-run news agency, IRNA, which cited a spokesman for the foreign ministry.
The 59-year-old was educated in the US and holds a PhD in international law from the University of Denver.
He has served as Iran’s ambassador to the UN and became foreign minister in 2013 after President Hassan Rouhani was elected promising a more moderate, outward-looking Iran.
Why has he quit?
It is far from clear. His post on Instagram thanked the Iranian people and authorities but gave no reason for the resignation.
“I apologise for not being able to continue in the post and for all the shortcomings and flaws in the period,” he wrote.
Unlike other major social media networks, Instagram is not blocked in Iran.
It is not clear if his resignation will be accepted by President Hassan Rouhani, although the president’s chief-of-staff tweeted to deny reports it had been accepted.
Mr Zarif has been under pressure at home from hardliners since the US withdrew from the Iranian nuclear pact, which binds Iran to limit its nuclear activities.
On Monday Syrian President Bashar al-Assad met Iran’s supreme leader Ayatollah Ali Khamenei in the capital, Tehran, but analysts noticed that Mr Zarif did not attend discussions.
Iran has been one of the Syrian government’s main backers during its civil war. Apart from Russia, this trip to Tehran is thought to be Mr Assad’s first foreign visit since the start of the war in 2011.
Where does this leave the nuclear deal?
The 2015 pact was was agreed by Iran, the US, the UK, France, China, Russia and Germany, and saw Iran limit its nuclear activities in exchange for sanctions relief.
But President Trump called the deal “horrible” and argued it did not to enough to rein in Iranian nuclear activity or curb its actions abroad, such as in Syria.
Last year he announced the US was pulling out of the deal and reimposed sanctions.
The other signatories in the agreement have vowed to continue and Mr Zarif had been spearheading efforts to keep it alive.
Iran insists its nuclear programme is entirely peaceful. Its compliance with the deal has been verified by the International Atomic Energy Agency (IAEA), which has said Iran is honouring its commitments.
Iran is one of the world’s largest oil producers, with exports worth billions of dollars each year. Its economy has been under strain and the country has seen large-scale protests over rising prices and a decline in the value of its currency, the rial.