Tehraninfo-icon: Ali Akbar Hashemi Rafsanjani, the former Iranian president who helped chart the country's course after the Islamic revolutioninfo-icon, has died aged 82.

He died from a heart attack today despite the efforts of doctors at a hospital in Tehran, state mediainfo-icon reported.

A pivotal figure in Iraninfo-icon since the 1979 revolution, when the Pahlavi dynasty was overthrown and eventually replaced by an Islamic republic, Rafsanjani helped nascent Islamic Republic tide through a brutal eight year long USinfo-icon backed warinfo-icon with Iraqinfo-icon and economic sanctions by the West. 

Hashemi Rafsanjani was rushed to the Tajreesh Martyres Hospital in Northern Tehran after experiencing a heart failure Sunday afternoon.

"Ayatollah Hashemi Rafsanjani suffered a cardiac arrest at around 18:00 today and was immediately rushed to a Tehran hospital where a team of heart specialists tried hard to resuscitate him for one and a half hours, but unfortunately to no avail," Deputy Healthinfo-icon Minister Mohammad Haji Aghajani said in the evening.

"He died at 19:30 this afternoon," the deputy minister declared.

President Hassan Rouhani rushed to the hospital after hearing the news. 

According to IRNA news agency, the funeralinfo-icon for Hashemi Rafsanjani will be held in Tehran on Tuesday. 

In a statement, the Iranian administration announced a three-day mourning period across the country and declared Tuesday as a national holiday.

Afghanistaninfo-icon's Chief Executive, Kuwaitinfo-icon's Emir, crown prince and prime minister, Indian Prime Minister and Turkeyinfo-icon's former President Abdullah Gul as well as the country's foreign minister were among the first foreign dignitaries to send messages of condolence to Tehran.

Born on August 25, 1934, the influential Iranian politician and writer was the fourth president of the Islamic Republic, serving from 1989 to 1997.

He was Iran's Parliament Speaker in the 1980s and the country's president for two terms from 1989 to 1997.

Rafsanjani was also a key figure during the eight years of Iraq-Iran war (1980-88), serving as substitute to commander-in-chief of the armed forces.

Hashemi Rafsanjani also served as chairman of Iran's Experts Assembly that is tasked with choosing the country's Leader.

He was also head of Iran's Expediency Council ever since 1987.

The body of the influential politician was returned to his home in the vicinity of Hosseiniyeh Jamaran - the home to the Late Founder of the Islamic Republic Imam Khomeini - in Shemiran in Northern Tehran.

Hashemi Rafsanjani married Effat Marashi, a housewife, in 1958. The couple have three sons and two daughters.

His fourth son, Mehdi who went on trial and was convicted to 10 years of imprisonment for corruptioninfo-icon charges, was released from prison in the evening to attend his father's funeral ceremony, local media reports said.