Tehran: Iran began a days-long funeral on Saturday for the late Supreme Leader Ayatollah Ali Khamenei, months after an airstrike killed him at the start of the war. He was 86.

Khamenei's body was to lie in state at the Grand Mosalla in Tehran, Iran's capital. Early on Saturday, mourners dressed in black walked through the streets of Tehran, emptied of vehicle traffic, trying to reach the Grand Mosalla.

Some carried banners and flags, while billboards across the city bore Khamenei's image. A crowd of men outside rhythmically beat their chests in mourning, a common practice at Shiite funerals.

"I am here to say goodbye to my beloved leader Ali Khamenei", said a weeping Hananeh Mousavi, 27, who attended the funeral alongside her mother. "I never expected to see such a day. I wish I had died before this tragedy".

An outdoor stage set up at the Grand Mosalla resembled the stage where Khamenei once delivered speeches at a husseiniyah in his compound in downtown Tehran. That site was destroyed in the Israeli airstrike that killed Khamenei and some of his family members at the start of the Iran war on February 28.

Iran's government expects millions to flood the streets of the capital in scenes reminiscent of the funeral of the late Supreme Leader Ayatollah Ruhollah Khomeini in 1989.

"We attended the funeral to show that we are all committed to defending our country and religion", said Ali Kazemi, who came from the north-western city of Tabriz, about 530 kilometres from Tehran.

A large turnout could provide a boost for Iran's government, particularly as it tries to leverage its hold over the Strait of Hormuz in negotiations with the United States over a permanent end to the war, and as concerns linger that Israel could launch another attack.

Iran chose July 4, the 250th anniversary of the founding of the United States, to begin the funeral. While authorities did not acknowledge the timing, crowds at the ceremony in Tehran chanted “Death to America!”, reprising a slogan commonly heard in Iran since the 1979 Islamic Revolution, the US Embassy takeover and the hostage crisis.

“We knocked the hell out of Iran", US President Donald Trump said in a speech at the same time in South Dakota in front of Mount Rushmore. “They want to settle so badly. We gave them a week off for a funeral".

Khamenei's body will be transported to cities in both Iran and neighbouring Iraq. Authorities have shut down streets, airspace and daily life in Tehran for the mourning period.

It remains unclear whether Iran's new supreme leader, Ayatollah Mojtaba Khamenei, will appear at his father's funeral. The late supreme leader appeared at Khomeini's funeral in 1989, visibly weeping, as he began his journey to lead Iran for decades while confronting the West.

Israel's repeated threats to kill Mojtaba Khamenei prompted a warning from Iran's joint military command on Thursday, which told Israel and the United States “to avoid any miscalculation” in the coming days.