Iran’s ex-President Ali Akbar Hashemi Rafsanjani, a dominant figure in the country’s politics since the 1980s, has died at the age of 82, media say.
Mr Rafsanjani had suffered a heart attack, the reports said.
He served as president from 1989 to 1997 but lost to Mahmoud Ahmadinejad when he ran again in 2005.
Although Mr Rafsanjani was part of the religious establishment, he was regarded as a “pragmatic conservative” open to improving ties to the West.
His final role was head of the Expediency Council, which tries to resolve disputes between parliament and the Guardian Council, but his power had now waned.
It was the 12-member council, a dominant force in Iran that interprets the constitution, that had disqualified Mr Rafsanjani after he entered the race for the 2013 presidential election as a reformist candidate.
Mr Rafsanjani denounced the move as “ignorant”, saying: “I don’t think the country could have been run worse.”
He then gave his support to the victorious candidate, Hassan Rouhani, who ran on the slogan “moderation and prudence” and attracted the suspicion of hardliners.
The two men were said to have had a warm relationship and Mr Rouhani was seen at Tehran’s Shohada Hospital shortly before the death was announced. A crowd reportedly gathered at the hospital after the announcement.
After his defeat in 2005, Mr Rafsanjani became openly critical of President Ahmadinejad.
In 2009, he sided with reformers who disputed that year’s elections, although the hardline Mr Ahmadinejad won a second term.
Mr Rafsanjani was among those calling for the release of political prisoners and greater political freedoms for parties prepared to work within the constitution.
The state-run Irinn network announced on Sunday that Mr Rafsanjani had “passed away after a lifetime of fighting and constant efforts in line with fulfilling the goals of Islam and the revolution”.