The death of Iran's president is unlikely to lead to any immediate changes in Iran's ruling system or to its overarching policies, which are decided by Supreme Leader Ayatollah Ali Khamenei.
But Ebrahim Raisi, who died in a helicopter crash on Sunday, was seen as a prime candidate to succeed the 85-year-old supreme leader, and his death makes it more likely that the job could eventually go to Khamenei's son.
A hereditary succession would pose a potential crisis of legitimacy for the Islamic Republic, which was established as an alternative to monarchy but which many Iranians already see as a corrupt and dictatorial regime.
Here's a look at what comes next.
How does Iran's government work?
Iran holds regular elections for president and parliament with universal suffrage.
But the supreme leader has final say on all major policies, serves as commander-in-chief of the armed forces and controls the powerful Revolutionary Guard.
The supreme leader also appoints half of the 12-member Guardian Council, a clerical body that vets candidates for president, parliament and the Assembly of Experts, an elected body of jurists in charge of choosing the supreme leader.
In theory, the clerics oversee the republic to ensure it complies with Islamic law.
In practice, the supreme leader carefully manages the ruling system to balance competing interests, advance his own priorities and ensure that no one challenges the Islamic Republic or his role atop it.
Raisi, a hard-liner who was seen as a protégé of Khamenei, was elected president in 2021 after the Guardian Council blocked any other well-known candidate from running against him, and turnout was the lowest in the history of the Islamic Republic.
He succeeded Hassan Rouhani, a relative moderate who had served as president for the past eight years and defeated Raisi in 2017.
He wrote 105 words so offensive they sent two world powers to war
After Raisi's death, in accordance with Iran's constitution, Vice President Mohammad Mokhber, a relative unknown, became caretaker president, with elections mandated within 50 days.
That vote will likely be carefully managed to produce a president who maintains the status quo.
That means Iran will continue to impose some degree of Islamic rule and crack down on dissent.
It will enrich uranium, support armed groups across the Middle East and view the West with deep suspicion.
What does this mean for succession?
Presidents come and go, some more moderate than others, but each operates under the structure of the ruling system.
If any major change occurs in Iran, it is likely to come after the passing of Khamenei, when a new supreme leader will be chosen for only the second time since the 1979 Islamic Revolution.
Khamenei succeeded the founder of the Islamic Republic, Ayatollah Ruhollah Khomeini, in 1989.
The next supreme leader will be chosen by the 88-seat Assembly of Experts, who are elected every eight years from candidates vetted by the Guardian Council.
In the most recent election, in March, Rouhani was barred from running, while Raisi won a seat.
Any discussion of the succession, or machinations related to it, occur far from the public eye, making it hard to know who may be in the running.
But the two people seen by analysts as most likely to succeed Khamenei were Raisi and the supreme leader's own son, Mojtaba, 55, a Shiite cleric who has never held government office.
What happens if the supreme leader's son succeeds him?
Leaders of the Islamic Republic going back to the 1979 revolution have portrayed their system as superior, not only to the democracies of a decadent West, but to the military dictatorships and monarchies that prevail across the Middle East.
The transfer of power from the supreme leader to his son could spark anger, not only among Iranians who are already critical of clerical rule, but supporters of the system who might see it as un-Islamic.
Western sanctions linked to the nuclear program have devastated Iran's economy.
And the enforcement of Islamic rule, which grew more severe under Raisi, has further alienated women and young people.
The Islamic Republic has faced several waves of popular protests in recent years, most recently after the 2022 death of Mahsa Amini, who had been arrested for allegedly not covering her hair in public.
More than 500 people were killed and over 22,000 were detained in a violent crackdown.
Raisi's death may make the transition to a new supreme leader trickier, and it could spark more unrest.