Some of the biggest crowds ever seen for a funeral in Iran turned out for that of Qasem Soleimani, the top commander killed in a US air strike last week. In scale, it was second only to the funeral in 1989 of Ayatollah Khomeini, the founder of the Islamic revolution.
These scenes are perhaps surprising to outsiders, and even to some of the country's most senior leaders.
Only seven weeks ago, Iran witnessed the most violent anti-government demonstrations in decades. Security forces killed anywhere between 330 and 1,500 protesters in more than 100 cities across the country. Thousands more were injured and arrested.
So why have so many people come out to pay homage to Soleimani?
There is no doubt that feelings are running high. Arguably the most important man in the country's armed forces has been assassinated by the US, which for many is the arch-enemy of Iran.
Iran's Foreign Minister Javad Zarif took to Twitter with a message to President Donald Trump: "Have you seen such a sea of humanity in your life?... Do you still think you can break the will of a great nation and its people?"
But it is also clear that the government launched a massive effort to mobilise as many people as possible. The huge turnout sent a strong signal to President Trump that the government enjoys widespread support.
It also sent the message that any foreign aggression would rally Iranians behind their leaders and any war could well be long and costly.
For years, whenever they were short of answers to big problems facing the country, Iranian leaders have relied on mass shows of popular support. Historically, rallies have been to intimidate and silence opposition.
The organisers are now expert in their work. From declaring national holidays to rallying university students or demanding that military personnel and government employees come out with their families, every method of gathering crowds has been used.
Buses, trains and trucks are provided to transport people from villages and towns across Iran to rallies that are relentless advertised by state TV.
People turn up in large numbers because they feel required to do so.
Hardline organisers have powerful supporters, including in the Basij paramilitary force and in the Revolutionary Guards, who can always be relied on to do their duty.
Other factors help explain why so many ordinary Iranians closed ranks behind the country's leaders.
Some see Soleimani as a hero who devoted his life to defending the country. They feel he was uncorrupted and dedicated to his work, unlike many senior soldiers and officials.
He was also a commander of the Revolutionary Guards for much of the eight-year Iran-Iraq war in the 1980s, when Iranians - in spite of Western support for Iraqi leader Saddam Hussein - managed to stop Iraqi forces from overrunning their country.
In recent years, Qasem Soleimani also helped check Islamic State (IS) jihadists in Iraq, who had advanced almost to the Iranian border.
For nationalist mourners, Soleimani had projected Iranian power in the Arab world. He was seen as the architect of Iran's presence and reach from Lebanon to Syria, Iraq and Yemen.
There are reports that mourners came out of sheer anger at the assassination of an Iranian general abroad. They felt by killing him, the US was starting a war and that it was time to close ranks in defence of the country.
Former Tehran university professor Sadegh Zibakalam tweeted from the capital that in spite of efforts by the hardliners to own Soleimani, he was a national figure.
Another factor behind the high turnout was loose talk from President Trump. He tweeted that the US had selected 52 targets in Iran for a possible attack if Iran acted to avenge Soleimani's death.
He said these included a number of sites of cultural importance to Iran. Attacking cultural centres is a war crime.
It was immediately clear that this was not the way for the US to win hearts and minds in a country proud of a history that goes back thousands of years.
But many millions did not join the crowds - including those who did not see Soleimani as a force for good.
They saw him as a key cog in an oppressive machine. The reformists in Iran have not forgotten that he was one of 12 commanders who wrote to then-President Mohammad Khatami in 1999 threatening a coup unless he put an end to university unrest.
Many saw him as the architect of Iran's misguided involvement in the regional wars. He directed Hezbollah forces in southern Lebanon in the fighting against Israel in 2006.
He involved Iran in the civil war in Syria, where pro-Iranian forces he organised were responsible for thousands of civilian deaths.
He established and financed dozens of Shia militias in Iraq that operated outside government control, brought instability to that country, and helped create the condition for IS to rise.
In Yemen, he involved Iran in support of Shia Houthis who had overthrown the elected government.
Billions of dollars of Iranian money that could have been spent at home to help the millions living in poverty were instead spent on faraway adventures.
Most importantly, as it is now clear, in life his activities across the region brought Iran close to a war with the US and the world's most powerful military.
Perhaps he has brought Iran even closer to that reality in death.