TEHRAN: In this Dec 21, 2015 file photo, former Iranian President Akbar Hashemi Rafsanjani waves to journalists as he registers his candidacy for the elections of the Experts Assembly. - AP

TEHRAN: Former Iranian President Akbar Hashemi Rafsanjani, a wily political survivor and multimillionaire mogul who remained among the ruling elite despite moderate views, died yesterday, state TV reported. He was 82. Iranian media reported he suffered a heart attack and was hospitalized north of Tehran, where doctors performed CPR in vain for nearly an hour and a half before declaring him dead. State television broke into programming to announce his death, the female newscaster's voice quivering as she read the news. She said Rafsanjani, "after a life full of restless efforts in the path of Islam and revolution, had departed for lofty heaven".

Residents said a crowd gathered outside Shohadaa Hospital where Rafsanjani was taken, despite police warnings, blocking Tehran's Valiasr Avenue. His body was later transferred to Jamaran hospital. In a sign of mourning, state television channels carried a black banner on a corner of screen. His funeral will be held in Tehran tomorrow, his relative and aide Hossein Marashi was quoted as saying by Fars news agency. Mehdi, the imprisoned son of Rafsanjani who is in jail on corruption charges, attended the hospital to say goodbye to the body of his father. He was escorted out by police.

HH the Amir of Kuwait Sheikh Sabah Al-Ahmad Al-Jaber Al-Sabah expressed condolences to Iranian President Hassan Rouhani yesterday on the death of Rafsanjani. The Amir, in a cable to Rouhani, prayed to Allah the Almighty to bestow blessings upon the deceased. HH the Crown Prince Sheikh Nawaf Al-Ahmad Al-Jaber Al-Sabah and HH the Prime Minister Sheikh Jaber Mubarak Al-Hamad Al-Sabah sent similar cables.

Rafsanjani's mix of sly wit and reputation for cunning moves - both in politics and business - earned him a host of nicknames such as Akbar Shah, or Great King, during a life that touched every major event in Iranian affairs since before the 1979 Islamic Revolution. His presence - whether directly or through back channels - was felt in many forms. He was a steady leader in the turbulent years following the overthrow of the US-backed shah, a veteran warrior in the country's internal political battles and a covert go-between in intrigue such as the Iran-Contra arms deals in the 1980s.

He also was handed an unexpected political resurgence in his later years. The surprise presidential election in 2013 of Rafsanjani's political soul mate, Rouhani, gave the former president an insider role in reform-minded efforts that included Rouhani's push for direct nuclear talks with Washington.

Rouhani's victory was also another example of Rafsanjani's remarkable political luck. Rafsanjani was blocked from the ballot by Iran's election overseers - presumably worried about boosting his already wide-ranging influence. But, in the end, many moderates turned to Rouhani as an indirect vote for Rafsanjani. It came after years of dwindling influence. Another presidential comeback bid was snuffed out by Mahmoud Ahmadinejad's surprise victory in 2005 elections.

Rafsanjani was born on Aug 25, 1934 in the village of Nough in southern Iran into a wealthy family. He studied theology in the holy city of Qom before entering politics in 1963 after the shah's police arrested the founder of the Islamic republic, Ayatollah Ruhollah Khomeini. A confidant of Khomeini, Rafsanjani was the speaker of parliament for two consecutive terms until Khomeini's death in 1989, and went on to serve as president from 1989 to 1997 during a period of significant changes in Iran. At the time, the country was struggling to rebuild its economy after a devastating 1980-88 war with Iraq, while also cautiously allowing some wider freedoms, as seen in Iran's highly regarded film and media industry.

He also oversaw key developments in Iran's nuclear program by negotiating deals with Russia to build an energy-producing reactor in Bushehr, which finally went into service in 2011 after long delays. Behind the scenes, he directed the secret purchase of technology and equipment from Pakistan and elsewhere. Rafsanjani managed to remain within the ruling theocracy after leaving office, but any dreams of taking on a higher-profile elder statesman role collapsed with Ahmadinejad's disputed re-election in 2009 and the intense crackdown that followed. Rafsanjani's harsh criticism of Ahmadinejad branded him as a dissenter in the eyes of many conservatives.

In a sign of his waning powers, Rafsanjani's stance cost him his position as one of the Friday prayer leaders at Tehran University, a highly influential position that often is the forum for significant policy statements. But some analysts believe that Rafsanjani was kept within the ruling fold as a potential mediator with America and its allies in the standoff over Iran's nuclear program. His past stature as a trusted Khomeini ally also offered him political protection. Rafsanjani was a top commander in the war with Iraq and played a key role in convincing Khomeini to accept a cease-fire as it became clear that extending the stalemate could pose a crippling drain on Iran's economy.

Nearly 25 years later, Rafsanjani tried to revive his credentials among a new generation of reformers by recounting proposals he made to Khomeini in the late 1980s to consider outreach to the United States, still seen by hardliners as the "Great Satan". His image, however, also had darker undertones. He was named by prosecutors in Argentina among Iranian officials suspected of links to a 1994 bombing of a Jewish center in Buenos Aires that left 85 people dead. Some Iranian reformers accused him of involvement in the slaying of liberals and dissidents during his presidency - charges that were never pursued by Iranian authorities.

"The title of Islamic Republic is not just a formality," he said in 2009 in the chaos after Ahmadinejad's re-election. "Rest assured, if one of those two aspects is damaged we will lose our revolution. If it loses its Islamic aspect, we will go astray. If it loses its republican aspect, (the Islamic Republic) will not be realized.  Based on the reasons that I have offered, without people and their vote there would be no Islamic system." - Agencies