RTR2YPXQ
Former Iranian President Akbar Hashemi Rafsanjani casts his ballot in a parliamentary election in Tehran March 2, 2012. Reuters

Former Iranian President Akbar Hashemi Rafsanjani died Sunday after being taken to a local hospital to be treated for a heart condition, according to media reports. Rafsanjani, 82, enjoyed wide influence in Iran as a supporter of President Hassan Rouhani and an adviser to Supreme Leader Ayatollah Ali Khamenei.

He was treated at a hospital north of the capital, Tehran. His brother, Mohammad Hashemi, initially said he was in good condition, the Associated Press reported. It's unclear how his condition worsened. He apparently died from a heart attack as doctors scrambled to save him, Reuters reported. His relative and aide Hossein Marashi said he died at the hospital.

Rafsanjani served as Iran's president from 1989 to 1997. He was the head of Iran's Expediency Council, which advised Khamenei, and had been tasked with one day naming Khamenei's successor.

The state-run Irinn network announced Rafsanjani had "passed away after a lifetime of fighting and constant efforts in line with fulfilling the goals of Islam and the revolution."

Rafsanjani was born in 1934 in the central Iranian city of Rafsanjan to a family of farmers. He studied theology and rose to become Iran's second in rank after that of ayatollah. He entered politics after helping to found the Islamic Republican Party and overthrow the government in 1979 to establish a new, theocratic regime.

He was one of the richest men in Iran because of his links to the nation's lucrative oil industry. He authored the non-fiction book, "Amir Kabir, the Hero of Fighting against Imperialism." He had three sons Mohsen, Mehdi, and Yasser, and two daughters, Fatemeh and Faezeh.

It's unclear who Rafsanjani supported as the next ayatollah, but Ibrahim Raisi is widely considered to be named Iran’s next supreme leader. Raisi, 56, has served as lead prosecutor of the Special Court of the Clergy and as a member of the “Death Commission,” which made thousands of Iranians political prisoners.

"The position of the supreme leader was once thought to belong to an esteemed cleric known for his theological erudition. However, Khamenei’s lackluster religious credentials have paved the way for an even less impressive figure who has spent his professional life weaving conspiracies in the regime’s darkest corners," wrote Ray Takeyh, a senior fellow at the Council on Foreign Relations and the co-author of "The Pragmatic Superpower: Winning the Cold War in the Middle East" in the Washington Post.