Khamenei's funeral procession wended its way slowly through central Tehran, from Imam Hossein Square in the east to Azadi Square in the west, on the last of three days of public mourning in the capital.
State media reported that millions of mourners filled the main boulevards connecting the squares and crowded around the black lorry that carried the coffin of the late supreme leader and four family members.
Many people were waving Iranian flags and red banners symbolising vengeance.
There were also placards saying "We must rise" and others calling for the death of US President Donald Trump, who, along with Israel's Prime Minister Benjamin Netanyahu, ordered a joint attack on Iran four months ago that triggered a war in which thousands were killed.
Mourners were also seen throwing stones at a billboard displaying Trump's face that was hung from a bridge. "The US killed our father. We won't let you go!" it read.
"I came with honour and pride to show all the people of the world how much we loved him and how committed we are to the system, the people, and the Islamic Republic," Melika Nourian, a 22-year-old university student, told the AFP news agency.
Former president Mahmoud Ahmadinejad was seen at the procession, local media reported. It appeared to be his first major public appearance since the start of the war, when three of his bodyguards were reportedly killed in a strike near his home.
Iran's current president, Masoud Pezeshkian, was also filmed walking among a group of mourners on a Tehran street.
Earlier, he wrote on X that Khamenei had taught everyone in Iran that the country's "greatest asset" was "its people and their unity". He promised that Iranians would "continue the path of Iran's honour, progress, and glory".
Other senior figures shown by state media included Foreign Minister Abbas Araghchi, judiciary chief Gholamhossein Mohseni Ejei and Brig-Gen Esmail Qaani, commander of the Quds Force, the Revolutionary Guards' overseas operations arm.
But there was again no sign of Mojtaba Khamenei, who has not appeared on video or in public since before his appointment and communicates mainly through written statements.
Israeli Defence Minister Israel Katz said Ali Khamenei was "eliminated by Israel" because he had threatened its existence. "Any Iranian leader who will again try to pursue plans to destroy Israel will be killed as well," he added.
