Millions of Iranians have gathered in Tehran as the country begins a week of funeral ceremonies for former supreme leader, Ayatollah Ali Khamenei.The 86-year-old was assassinated in a joint operation by the United States and Israel on February 28, in air strikes that marked the beginning of a regional war that plunged the global economy into crisis.Having reigned since 1989, many Iranians had never known another leader.Many Iranians see Ayatollah Ali Khamenei as a martyr whose death should be avenged. (Reuters: Mohammed Salem)Iran chose to begin Khamenei's funeral on July 4, the 250th anniversary of the creation of the United States.And by sunrise, local time, thousands of mourners had gathered outside Tehran's Imam Khomeini Grand Mosalla Mosque to pay their respects.A crowd stood sobbing and chanting, as others handed out posters of the late Khamenei. Mourners were mostly dressed in black, some wearing T-shirts adorned with the former supreme leader's image."Mr Ali Khamenei was the most important citizen of our country. Why? Because he was the most patriotic Iranian," said Tehran resident Marzieh, who spoke to the ABC at one of the entrances to the Grand Mosalla as the site opened to the public early on Saturday morning."Mr Khamenei was not only important for us but he was important for the whole world. The world lost him. We are not the only ones who lost Mr Khamenei."Millions of people have gathered in Tehran, before the ayatollah's body gets moved elsewhere. (Reuters: Mohammed Salem)Khamenei's body arrived at Tehran's Grand Mosalla on Friday ahead of the funeral, Iranian state media reported.From Tehran, his body was expected to be taken to Qom, Najaf and Karbala, the great Shi'ite centres of Iran and Iraq, before being laid to rest on Thursday in Mashhad, home to the country's holiest pilgrim shrine in Iran's north-east.Former supreme leader's legacyFor almost 37 years, Khamenei wielded absolute religious and political authority in Iran.The Shia cleric commanded a devout following among the country's conservative Shiite population, while cultivating the loyalty of military hardliners opposed to the West's growing reach in the Middle East.People began gathering outside the Imam Khomeini Grand Mosalla Mosque from sunrise. (Reuters: Mohammed Salem)"Some will remember him as a person of resistance, as a person who was martyred by their enemies," said Ezgin Uzun-Teker, assistant professor of political science at Yeditepe University in Istanbul, Türkiye."But there will be others who will remember him for authoritarianism, women's rights and human rights violations, political suppression."In the weeks leading up to his funeral, people living in Iran sent the ABC anonymous voice notes that painted a different image of the ayatollah to that projected by his regime.Opponents of his regime said his death was met with widespread relief, and not despair."People came out onto their rooftops cheering [when he died]," Vahid, who works in real estate in Isfahan, told the ABC. He asked us to change his name because he fears for his safety."Some were clapping, others were chanting 'death to the dictator'."Other Iranians told the ABC they felt as though Khamenei's assassination was justice for decades of authoritarian rule."It was happiness mixed with a sense of revenge," said Parnian, a woman in her 40s who lives in Tehran, whose name has also been changed protect her identity."I felt as though a huge burden of grief had been lifted from my shoulders."I thought to myself, 'Justice has finally been served.'"Khamenei's 'Axis of Resistance'Only the second supreme leader to govern Iran since the 1979 Revolution that ousted the monarchy, Khamenei worked to expand the country's influence across the Middle East through his patronage of proxy militant groups, including Hezbollah in Lebanon, Hamas in Gaza and the Houthis in Yemen.He created the "Axis of Resistance", a military coalition intended to counter the influence of Israel and the United States, making him a hero to many who railed against western "imperialism"."He tried to establish Iran as a superpower in the region. That was his obsession," said Bozorgmehr Sharafedin, an Iran journalist and co-author of Stolen Revolution: Betrayal and Hope in Modern Iran."There were a lot of governments or militia groups that were listening to Iran and they were ready to act when Iran was under attack."So in the same way as NATO, he created this alliance that if any of you is under attack, all other proxy groups will act."Mourners attended a public farewell ceremony early in the morning of July 4. (Reuters: Alkis Konstantinidis)His forceful defiance of Western governments continued at home where he pursued nuclear and missile programs despite crippling international sanctions.He refused to give up Iran's uranium enrichment program, centring it as a cornerstone of the country's independence, scientific achievement and national pride.The collapsing 'superpower'Yet at the time of his death, analysts said, the empire Khamenei had spent more than three decades building was collapsing around him."We should say that at the end, it failed," Mr Sharafedin said."Iran's proxies were somehow eliminated, if not weakened, after October 7 [the Hamas attack on Israel] and Israeli retaliation."Iran's missile programme and proxies turned into a liability for the Islamic Republic. I would say that it encouraged the US and Israel to attack Iran because they saw it as a threat."So I think the grand strategy that he had created collapsed in the final years of his leadership."Iran is staging a week of mass funeral processions for Ayatollah Ali Khamenei. (Reuters: Mohammed Salem)In January, just two months before his death, Khamenei wrote the final and most fateful chapter of his own legacy when he ordered an unprecedented crackdown on opponents of his regime.Exasperated by a spiralling economy, political corruption and sheer hopelessness about the country's future, thousands of people, including from the conservative middle class, revolted in the largest demonstrations the country had seen since the Islamic Revolution almost 50 years ago.In every province of Iran, they flooded the streets demanding change. But once again, the supreme leader chose repression over reform.Almost 6,500 people were killed by security forces, mostly on January 8 and 9, according to US-based human rights group, HRANA. They are still investigating how more than 11,700 others died.For almost four decades Khamenei told his people that Israel and the US wanted to destroy their country. Yet, in his final act, it was he who oversaw the mass execution of Iranians."When I look back over the past 37 years under the rule of this criminal dictator, I see nothing but darkness, devastation, poverty, corruption, and bloodshed," Tehran resident Parnian told the ABC."He has gone to his grave, but what legacy has he left this country?"