Former Iranian President Hashemi Rafsanjani, who died Sunday aged 82, was linked in the latter years of his life "reformists" including current President Hasan Rouhani, but during his long career he was associated with some of the regime's most controversial actions, including mass-casualty terror attacks and the assassinations of exiled dissidents.
The following year he delivered crucial support for the eventual victor, Hassan Rouhani, a moderate with whom he had a warm rapport. He served as the fourth President of Iran between 1989 and 1997.
He lost a presidential election in 2005 to hardline Mahmoud Ahmadinejad, the little-known mayor of Tehran at the time, a defeat that indicated resentment toward Rafsanjani as part of the elite and the perception he served few interests other than his own.
Any dreams of taking on a higher-profile elder statesman role collapsed with Ahmadinejad's disputed reelection in 2009 and the intense crackdown that followed. Many observers said they thought that moderate voters turned to Rouhani as an indirect vote of support Mr. Rafsanjani.
Khamenei and his conservative supporters subsequently stripped Rafsanjani of even more of his influence, and two of his children were jailed.
Since the 2013 presidential election, Mr Rafsanjani has fully backed Mr Rouhani. Iran's moderate leaders will no doubt struggle to fill the hole he leaves behind.
Mr. Rafsanjani was born August 25, 1934, in the village of Bahraman in southeastern Iran.
Rafsanjani was said to be still an influential figure in Iran.
Following the news of Rafsanjani's death, a crowd gathered outside the hospital in Tehran's Tajrish neighbourhood where he had been taken, according to residents.
Ayatollah Rafsanjani was the head of the Assembly of Experts from 2007 until 2011.
Over the past 38 years, whether under Khomeini or afterwards, Rafsanjani played a critical role in suppression at home and export of terrorism overseas as well as in the quest to acquire nuclear weapons.
His death is a huge blow for Iran's marginalized reformist movement, and moderates in the government, for whom the Shiite Muslim cleric was a leader and figurehead.
How that shift plays out in Iranian politics remains to be seen, but in the meantime it's likely that Iran's hardliners will be able to take advantage of Rafsanjani's sudden absence, both in regards to the future leadership of Iran as well as the ongoing efforts at rapprochement with the West and Arab world.