President Ebrahim Raisi died on Sunday, along with the foreign minister, after his helicopter crashed near the Azerbaijan border.

Thousands have marched in Iran for the final day of funeral rites for President Ebrahim Raisi, who died in a helicopter crash earlier this week.

Raisi, 63, died on Sunday alongside his foreign minister and six others when their helicopter crashed in the country’s mountainous northwest while returning from a dam inauguration.

Thousands of people, holding placards of Raisi and waving flags, marched in the eastern city of Birjand on Thursday morning to bid him farewell.

Iran’s Supreme Leader Ayatollah Ali Khamenei, who announced five days of mourning for those who died in the crash, led prayers in Tehran on Wednesday for Raisi’s funeral.

Raisi will be laid to rest at the holy shrine of Imam Reza, a mausoleum in the city of Mashad, where the ultraconservative president was born.

He will become the first top politician in the country to be buried at the shrine, representing a significant honour for the former leader.

Foreign Minister Hossein Amirabdollahian will also be buried on Thursday at the shrine of Shah Abdol-Azim in the town of Shahr-e Rey.

Iranian officials and foreign dignitaries paid their respects to the late diplomat at a Tehran ceremony before the burial.

A woman holds a poster of the late Iranian President Ebrahim Raisi
A woman holds a poster of Raisi during a funeral ceremony for him, in Tehran, May 22, 2024 [Vahid Salemi/AP]

Raisi’s death comes at a time of worsening strains between the clerical leadership and broader society, aggravated by tightening political and social controls.

Vice President Mohammad Mokhber took over as caretaker president on Monday, while Ali Bagheri Kani was appointed acting foreign minister until the June 28 election.

Al Jazeera’s Ali Hashem, reporting from Tehran, said the Iranian establishment wanted to form “parallel lives”, with Iranians mourning for Raisi while getting ready for an election, which was not expected until next year.

“The main thing here is the establishment doesn’t want the feeling of uncertainty to dominate and, of course, [cause] a vacuum. In fact, Iranians are very sensitive to vacuums, and that’s why we’re seeing them announcing elections in less than the 50-day period – it’s going to be in a month and a few days.

“Given the election is on the way, the days coming will witness the registration of candidacies. People of course are circulating names, namely from the conservative camp,” Hashem said.

During Raisi’s presidency, who was elected in 2021, the country witnessed mass protests, a deepening economic crisis and unprecedented armed exchange with Israel.

Before his death, Raisi was also widely expected to succeed Ayatollah Khamenei.