DUBAI (Reuters) - Iran’s Foreign Minister Mohammad Javad Zarif, who used his charm and knowledge of the West to help strike the landmark 2015 nuclear deal with world powers, announced his resignation unexpectedly on Monday on Instagram.

FILE PHOTO: Iranian Foreign Minister Mohammad Javad Zarif speaks to the media in Tbilisi, Georgia, April 18, 2017. REUTERS/David Mdzinarishvili

“Many thanks for the generosity of the dear and brave people of Iran and its authorities over the past 67 months. I sincerely apologise for the inability to continue serving and for all the shortcomings during my service. Be happy and worthy,” he wrote on his Instagram page jzarif_ir.

Zarif’s engaging personality was never enough to neutralize conservative clerics at home, who accused Zarif of selling out his country. Hardliners threatened him with bodily harm when the agreement was signed after years of arduous negotiations.

When President Donald Trump withdrew the United States from the pact in 2018 and reimposed sanctions to cripple Iran’s oil industry, Zarif faced a storm of criticism in parliament.

Iran’s Supreme Leader, Ayatollah Ali Khamenei, on the other hand, was restrained in his approach to the masterful diplomat with a long record of handling Tehran’s Western foes.

SMILING DIPLOMAT

“You should always smile in diplomacy,” Zarif wrote in his 2013 memoir “Mr. Ambassador”. “But you should never forget you are talking to an enemy.”

Zarif’s familiarity with Western culture helped him forge close working relationships with American officials, who have long memories of the occupation of the U.S. embassy in Tehran, in which hardline students held diplomats hostage for 444 days during the Islamic Revolution that toppled the Shah.

Zarif lived in the United States, from the age of 17 as a student of international relations in San Francisco and Denver, and subsequently as a diplomat at the United Nations in New York, where he was Iranian ambassador from 2002 to 2007.

Zarif developed contacts with U.S. officials which served him well in the 1990s, when he was involved in talks to free U.S. hostages held by the pro-Iranian Hezbollah group in Lebanon.

The bespectacled diplomat was born in Tehran to a conservative merchant family.

Mastery of English helped him build a rapport with then U.S. Secretary of State John Kerry, with whom he was on first-name terms during the intensive nuclear talks.

Zarif’s email exchanges with Kerry at critical moments, including during the arrest of 10 U.S. marines in Iranian waters in 2016, defused tensions between the two countries that have had no political ties since 1980.

NEED FOR COMPROMISE

Managing expectations was critical for Zarif as Western powers and Iran squared off during heated talks that ended with an agreement announced in Lausanne, Switzerland.

“No deal can be perfect. Perfect for one side of the deal would be disaster for the other side,” he once said in an interview with U.S. talk show host Charlie Rose, describing the nuclear pact.

Zarif’s direct line between Tehran and Washington was lost when Trump entered the White House. Zarif showed his tough side.

“Trump’s ignorant hate speech belongs in medieval times - not the 21st Century UN - unworthy of a reply,” Zarif tweeted a few hours after Trump’s first speech at the UN General Assembly in which he called the nuclear deal an “embarrassment” and “one of the worst and most one-sided transactions the United States has ever entered into”.

Ridiculing a meeting between Trump and his ally Saudi Arabia’s Crown Prince Mohammed bin Salman and their discussion on Saudi purchases of U.S. military hardware, Zarif tweeted: “Some are exuberant to milk, and others even happier about being milked.”

HEATED PARLIAMENT SESSION

Zarif’s seeming ease with Western ways made him a divisive figure in Iran, and conservatives lined up to criticize him for speaking so directly to Tehran’s enemies.

Secretly filmed footage emerged in May 2015 of Zarif arguing furiously in a closed session of parliament with a lawmaker.

“Zarif has spent almost all his diplomatic life outside Iran and has a good grip of international affairs - but this is his weak point, too,” said Hossein Rassam, former Iran adviser to Britain’s Foreign Office.

While the U.S. decision to abandon the nuclear deal tarnished Zarif, Iran still managed to gain deep influence through proxies in Lebanon, Iraq, Yemen and Syria, to the dismay of its Middle East rival Saudi Arabia.

Zarif recalled how he had once sent a conciliatory message to Saud al-Faisal, the late Saudi foreign minister.

“He told me the Arab world is none of your business,” Zarif told a U.S. interviewer. “I am telling him the Arab world is our business.”

ATTACKED BY BOTH SIDES

Some hardliners called Zarif a coward for studying in the United States, rather than defending his country in the 1980-88 war with Iraq which claimed a total of one million lives.

U.S. Senator Tom Cotton, a Republican who opposed the nuclear deal, tweeted at Zarif in 2015: “you hid in U.S. during Iran-Iraq war while peasants & kids were marched to die.”

Zarif responded by congratulating him on the birth of his son, adding: “Serious diplomacy, not macho personal smear, is what we need.”