Iranian Foreign Minister Mohammad Javad Zarif reportedly announced his resignation via Instagram on Monday.

“I am apologizing to you for all the shortcomings … in the past years during my time as foreign minister … I thank the Iranian nation and officials,” he declared, according to a translation of his announcement by Reuters.

Zarif was one of the chief architects behind the controversial nuclear deal between U.S.-led world powers and Iran in 2015. U.S. President Donald Trump withdrew America’s participation from the nuclear pact last year, reimposing sanctions suspended under the agreement as part of a wave of restrictions implemented against Tehran, a move that angered the Islamic Republic.

Other signatories — Russia, China, Germany, France, and the United Kingdom — have been scrambling to prevent the collapse of the deal. Iran, which the United States considers the world’s chief sponsor of terrorism, has threatened action against the United States for pulling out of the agreement.

Zarif’s resignation came after he warned the Trump administration that Iran’s response to the wave of sanctions imposed on the country by the Trump administration would come as a “surprise” to the American president, Arutz Sheva noted.

The U.S. has intensified its criticism of Iran under Trump, at times triggering disputes between the American commander-in-chief and Zarif on Twitter.