IN DEATH as in life, Akbar Hashemi Rafsanjani defied categorisation. He was a stalwart of a regime dubbed an exporter of terror and heresy. Yet regional arch-foes such as Bahrain and Saudi Arabia mourned his passing, as did the Great Satan itself, via a State Department press briefing. At home, embattled reformists felt they had lost their prime protector.

Ruthless guile was his hallmark. During his early years in power, the death penalty was applied freely to dissidents, communists, Kurds and Bahais. Foreign countries blamed Mr Rafsanjani for ordering murders of émigrés in Paris, Berlin and Geneva, and terrorist attacks on a Jewish cultural centre in Buenos Aires in 1994 and on American forces in Saudi Arabia in 1996.

Though a pragmatist to the point of cynicism, his career was rooted in zealotry. His greatest political asset was his friendship with Ayatollah Khomeini, the instigator of the Islamic revolution of 1979. As memories of that upheaval faded, his ability to assert confidently what the great man would have thought became ever-handier.

Other credentials were shakier. He had studied at the great seminary in Qom, but he was no theologian; nor was he able to wear the black turban reserved for the Prophet’s direct descendants. His family were prosperous pistachio farmers, and his power base was as much the bazaar as the mosque. He was dubbed kooseh, the shark, partly for hidden menace, but also mockingly: his smooth skin sprouted only a wispy beard, rather than the monumental growths of the heavyweight theocrats.

Arrested ten times under the shah’s American-backed regime, jailed for a total of more than four years (and on one winter’s day, he said, tortured from dusk to dawn) he was not anti-Western on principle. Indeed, he sniped at those who were: “if people believe we can live behind a closed door, they are mistaken. We are in need of friends and allies around the world.” Unlike his colleagues, he had travelled widely in America and elsewhere and spoke, in private, excellent English.

Those colleagues were often fuelled by rage. He was driven by frustration: with Iran’s backwardness, isolation and outsiders’ bullying. His aim was to fortify the regime, not consume its strength in pointless fights at home and abroad.

As the first speaker of the Majlis (parliament), he shaped the Islamic Republic’s constitution, reconciling limited electoral mandates with divine inspiration: a balancing act which few Muslim countries manage. He helped make his old ally, Ayatollah Ali Khamenei, Supreme Leader. It was a rare mistake: the two men spent the next 30 years tussling for power.

He ended the war with Iraq, first gaining the military advantage, and then arm-twisting his colleagues to accept a UN-brokered ceasefire. He restored diplomatic ties with most Sunni Muslim countries: notably, he was the only senior Iranian figure on cordial terms with the Saudi leadership.

He decisively backed Iran’s nuclear agreement with the West—outfacing those who thought that any dealing with the enemy was weakness or treason. The “world of tomorrow is one of negotiations, not the world of missiles”, he tweeted in March.

Interests of state

Earlier, he was embroiled in the Iran-Contra affair, in which Ronald Reagan’s administration illegally sold Iran American weapons, in exchange for help in freeing hostages and financing (also illegally) Nicaraguan anti-communist insurgents. When his role was revealed, he had the source, Mehdi Hashemi, jailed, while, characteristically, escaping opprobrium himself.

At home he eschewed sloganeering (he pressed for “Death to America” chants to be dropped from Friday prayers) and decried fanaticism, calling it “Islamic fascism”. Instead, he promoted economic change: liberalisation, privatisation, cutting subsidies and building infrastructure.

His political hero was Amir Kabir, a 19th-century reformist chief, of whom he wrote an appreciative biography. He was also a leading critic of the austere sexual and social mores of the Islamic Republic. It was wrong, he said, to criminalise youngsters for following their God-given and natural instincts.

His own instincts were finely tuned. As the occasion required, he could be steely, charming, witty or lachrymose (especially in response to his own rhetoric). He held court in lavish public buildings, while living in the same house as before the revolution. His family thrived: a business empire reputedly included the second-biggest airline, a near-monopoly on the pistachio trade and the largest private university. In 2003 Forbes magazine put his personal wealth at over $1 billion. Lies, said his fans. An underestimate, said his foes.

His biggest political setback was in 2005, when he failed to win a third presidential term: hard-up Iranians voted crossly for the puritanical, doctrinaire Mahmoud Ahmadinajad. Yet Mr Rasfanjani held on to power as head of the Expediency Council, a previously obscure power-broking body which links Iran’s theocratic and civil institutions. Lately, he tacked towards reformism, backing political and media freedoms in a speech in 2009, and supporting President Hassan Rouhani’s campaign for re-election. Was it sincere? Anyone who knew him, or Iranian politics, knew better than to ask.