To the sound of mournful chants and the slow beat of drums, they march, whipping their backs with metal flails.
It is an ancient ceremony going back almost 14 centuries – the Shia commemoration of Ashura.
But this year in particular has poignant significance for Iranians.
The devout remember the betrayal and death of the Imam Hussein as if it happened yesterday.
We filmed men and women weep as they worshipped at the Imamzadeh Saleh Shrine in northern Tehran.
The grandson of the Prophet Muhammad was killed by the armies of the Caliph Yazid in the seventh century Battle of Karbala.
Shia Muslims mark the anniversary every year and reflect on the virtue it celebrates – of resistance against oppression and injustice. But more so than ever this year, in the wake of Israel and America’s attacks on their country.
The story is one of prevailing over adversity and deception. A sense of betrayal is keenly felt here by people and officials.
Many Iranians believe they were lured into pursuing diplomacy as part of a ruse by the US.
Iran believed it was making diplomatic progress in talks with America, which it hoped could lead to a deal. Then Israel launched its attacks and, instead of condemning them, the US joined in.
“Death to Israel” chants resounded outside the mosque in skies that for 12 days were filled with the sounds of Israeli jets.
There is a renewed sense of defiance here.
One man told us: “The lesson to be learned from Hussein is not to give in to oppression, even if it is the most powerful force in the world.”
A woman was dismissive about the US president.
“I don’t think about Trump. Nobody likes him. He always wants to attack too many countries.”
Pictures on billboards nearby link Imam Hussein’s story and current events. They show the seventh century imam on horseback alongside images of modern missiles and drones from the present day.
Other huge signs remember the dead. Iran says almost 1,000 people were killed in the strikes, many of them women and children.
Officially Iran is projecting defiance, but not closing the door to diplomacy.
Government spokeswoman Dr Fatemeh Mohajerani told Sky News that Israel should not even think about attacking again.
“We are very strong in defence, and as state officials have announced, this time Israel will receive an even stronger response compared to previous times. We hope that Israel will not make such a mistake.”
But there is also a hint of conciliation. Senior Iranian officials have told Sky News back-channel efforts are under way to explore new talks with the US.
Israel had hoped its attacks could topple the Iranian leadership. Those hopes proved unfounded. The government is in control here.
For many Iranians it seems quite the opposite happened – the 12-day war has brought them closer together.
This story originally appeared on Skynews