Yet many Western analysts believed that he sought a less confrontational relationship with the United States than other powerful figures in the Iranian hierarchy, for whom hostility toward Washington was a touchstone of ideological purity.
Mr. Rafsanjani, for instance, was credited with suggesting that “Death to America” be dropped from the litany of slogans at Tehran’s Friday prayers, a weekly moment of fervor in Iran’s political and religious calendar.
In the closing stages of the Iran-Iraq war, which lasted from 1980 to 1988, Mr. Rafsanjani was appointed acting commander in chief of Iranian forces and was widely credited with persuading the leadership in Tehran to accept a United Nations resolution that ended the fighting.
For much of his career, he maintained roles in Parliament and on influential clerical panels, under the tutelage of Ayatollah Khomeini and then, less durably, of his successor, Ayatollah Ali Khamenei.
Mr. Rafsanjani’s clout declined sharply during the presidency of Mahmoud Ahmadinejad, from 2005 to 2013. A populist conservative, Mr. Ahmadinejad had a strong following among poor Iranians, many of whom resented the affluence that endeared Mr. Rafsanjani to his wealthier compatriots.
In 2013, Mr. Rafsanjani was disqualified from standing in presidential elections and swung his political weight behind a moderate, longtime associate, Hassan Rouhani, who won the vote and went on to bring many of Mr. Rafsanjani’s supporters into his cabinet and to negotiate the nuclear agreement with the United States in 2015.
But Mr. Rafsanjani, himself an ayatollah, clashed with Ayatollah Khamenei, the supreme leader, over the extent to which Iran should modify its bellicose stance toward outsiders. In March, Mr. Rafsanjani wrote on Twitter that the “world of tomorrow is one of negotiations, not the world of missiles.”
Mr. Khamenei responded: “Enemies continue strengthening their military and missile sectors. How can anyone say the era of missiles has passed?”
Without identifying Mr. Rafsanjani by name, Mr. Khamenei said: “People say that tomorrow’s world is a world of negotiations and not a world of missiles. If they say this thoughtlessly, it shows they are thoughtless. However, if this is intentional, then this is treachery.”
For all that, analysts in Tehran sensed that the pendulum was swinging toward the moderate camp, in which Mr. Rafsanjani played a defining role.
Ali Akbar Hashemi Rafsanjani was born on Aug. 23, 1934, in the village of Bahraman near the town of Rafsanjan in Iran’s southeastern Kerman Province. He was one of five sons and four daughters born to Mirza Ali Hashemi Bahramani, a prosperous pistachio farmer, and Mahbibi Safarian Hashemi.
At 4, he left his home village to study theology in the Muslim holy city of Qum, Iran, where he became a disciple of Ayatollah Khomeini. By some accounts, at the time of his death, Mr. Rafsanjani was the last surviving member of an inner circle of Islamic revolutionaries active during Ayatollah Khomeini’s exile from 1964 to 1979, fighting an often bloody cat-and-mouse contest with the notorious Savak secret police loyal to Shah Mohammed Reza Pahlavi.
From 1963 to 1978, Mr. Rafsanjani was jailed five times for his opposition to the shah, but he remained in close contact with exiled clerics, including Ayatollah Khomeini, who was living in Najaf, Iraq.
During that period, in 1962, he married Effat Marashi, whose family included several respected Shiite clerics. They had five children — two daughters, Fatemeh and Faezeh, and three sons, Mohsen, Mehdi and Yaser.
Information on survivors was not immediately available.
In the turbulence after Ayatollah Khomeini returned to Iran, Mr. Rafsanjani was elected to Parliament, known as the Majlis, and became its speaker, serving in that position until 1989.
In many accounts of the maneuvering after Ayatollah Khomeini’s death in 1989, Mr. Rafsanjani was credited with promoting Ayatollah Ali Khamenei as supreme leader, possibly in the mistaken belief that he would prove a pliant figure.
Instead, Ayatollah Khamenei built his own power base. But Mr. Rafsanjani’s back-room dealings — often trading on his close relationship with Ayatollah Khomeini — earned him the nickname “kingmaker.”
Mr. Rafsanjani was president from 1989 to 1997, facing the challenge of reconstruction after the eight-year war with Saddam Hussein’s Iraq. While his economic liberalism and privatization policies were popular among Iran’s entrepreneurial classes, many poor Iranians perceived no improvement in their plight.
As president, Mr. Rafsanjani showed little tolerance of dissent. While he sought improved ties with the West, he insisted on Iran’s right to develop its nuclear program and did not lift a fatwa declared by Ayatollah Khomeini that enjoined Muslims to kill the writer Salman Rushdie.
Moreover, critics asserted that the Rafsanjani presidency coincided with the spread of corruption and the infiltration by the hard-line Islamic Revolutionary Guards Corps of important economic enterprises.
By 2013, Mr. Rafsanjani was said to have built a family business empire that owned Iran’s second biggest airline, exercised a near monopoly on the lucrative pistachio trade and controlled the largest private university, Azad. The family’s business interests also included real estate, construction and oil deals. In 2003, Forbes magazine said Mr. Rafsanjani’s personal wealth exceeded $1 billion.
His time as president left a bitter legacy for many Iranians who struggled to get by. In parliamentary elections, he fared badly and was awarded a seat only after the intervention of a high-powered clerical panel, prompting him to withdraw from the legislature.
In 2005, Mr. Rafsanjani sought to run for the presidency again but lost in a runoff to Mr. Ahmadinejad, whose tenure until 2013 was marked by hard-line nuclear policies, increasingly strained ties with the West and a mounting catalog of economic sanctions over Tehran’s efforts to expand its nuclear capability.
In presidential elections in June 2009, Mr. Rafsanjani supported the moderate Mir Hussein Moussavi, who lost to Mr. Ahmadinejad. The outcome was widely disputed, and many Iranian protesters died or were detained challenging the authorities in the streets. The protesters included Mr. Rafsanjani’s youngest daughter, Faezeh, who had campaigned for women’s rights and was arrested in large demonstrations against Mr. Ahmadinejad’s victory.
In September 2009, Mr. Rafsanjani seemed to be sidelined when the authorities barred him from addressing Friday prayers in Tehran on Quds Day, an annual display of solidarity with Palestinians. Mr. Rafsanjani had delivered the Quds Day sermon for almost 25 years, but the authorities in 2009 feared his address would provoke antigovernment protests.
Mr. Ahmadinejad’s second term was marked by mounting disputes with the United States and Israel over Tehran’s nuclear ambitions and its advances in missile technology. In 2011, Iran sided with President Bashar al-Assad of Syria during the Arab Spring, along with the Hezbollah Shiite militia in Lebanon, setting Tehran against Mr. Assad’s Western adversaries, including the United States.
In May 2013, Mr. Rafsanjani announced plans for a comeback, entering his name for presidential elections that June, calculating that, after the years of sanctions-driven decline under Mr. Ahmadinejad, Iranians would think that Mr. Rafsanjani’s reputation as a pragmatist and modernizer would offset some of the opprobrium attached to his staggering wealth. At the time, he argued that Iran was in an economic “danger zone” because of Mr. Ahmadinejad’s “amateurism.”
But he was disqualified by the Guardian Council, an electoral vetting body controlled by hard-liners. Mr. Rafsanjani had long served on another critical panel, the 88-member Assembly of Experts, which is charged with choosing a successor to the Supreme Leader. In 2016, Mr. Rafsanjani polled first in Tehran’s voting for the Assembly of Experts, whose role had assumed greater importance since Ayatollah Khamenei, the Supreme Leader, was treated for prostate cancer in 2014.
In the manner of Iran’s competing power centers, however, a hard-liner, Ayatollah Ahmad Jannati, who was already the head of the Guardian Council, was elected by the Assembly of Experts as its chairman. The vote signaled new obstacles for the modest changes sought by Mr. Rouhani in running the Islamic Republic.
In another controversy, in May 2016, Mr. Rafsanjani was drawn into a ferocious debate over a meeting between his activist daughter, Faezeh, and Fariba Kamalabadi, a leader of the Baha’is, a minority religious group regarded by the clerical hierarchy as impure pagans.
Mr. Rafsanjani showed little sympathy for his daughter, calling the Baha’is “heretics” and saying publicly that his daughter had “committed a wrong deed” and should be ashamed of herself.