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 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.