Tehran¡¯s Grand Mosalla Mosque, where the late Ayatollah Ali Khamenei was held in state earlier?this month, is an extraordinary building. In a country filled with exquisitely tiled, millennium-old houses of worship, this one is a plain, brutalist product of the 1979 revolution whose sole virtue is its size. With a main prayer hall that spans multiple World Cup soccer fields, it is a still-unfinished monument to the sheer scale of religious fervor that Iran¡¯s supreme leader sought to institutionalize.

When I went to Friday prayers in the mosque a decade ago, it was clear Khamenei had failed. Attendance was sparse. When the cleric leading the service began punching the air to chant ¡°Death to America! Death to Israel! Death to the Infidel!¡± the response was mechanical and insincere. As an American infidel, I didn¡¯t take part. My neighbor asked where I was from and brightened visibly when I told him. ¡°Ah, I like America,¡± he said, citing its freedoms.

Last week¡¯s ceremonies unfolded in the same place but a different world. There are far too many mourners for the indoor prayer hall and the sense is of defiance and fury. The ¡°Death to America!¡± chants are vengeful and heartfelt. When I visited, the 2015 nuclear deal was still in effect and many Iranians had hoped the days of their nation¡¯s zero-sum confrontation with Washington were over. Now the countries have been at war and the regime is trying to revive the legitimizing myth that lost its power in Khamenei¡¯s later years and left him ruling by violence alone. The war has made a cruel, despised and out-of-touch old man into a martyr.