One by one the young volunteers approached the majestic Kadhimiya shrine, the holiest site of Shiite Islam in the Iraqi capital. They sought blessings before heading off to war and uncertain fates.
"We will fight, and if we have to give our lives, we will," said Abdullah Hussein Ali, 21, accompanied by his younger brother Rami, who also signed up for the battle. "We have no choice. It is a question of survival."
The prospect of an assault on the capital, and on the great shrines of Shiite Islam, by Al Qaeda-style Sunni Arab militants has jolted Iraq's Shiite masses into action. The military appears to have halted the insurgents' advance on Baghdad, but the threat of a militant assault or renewed suicide bomb campaign within the city remains very real.
Though the capital remains outwardly calm in the blast-furnace heat of the Iraqi summer, there is a rumbling tension beneath the surface.
Baghdad these days feels very much like a Shiite city. Plastered on walls, lampposts and elsewhere are images of Shiite holy figures and "martyrs," including many killed in neighboring Syria, where Iraqi Shiite militiamen have gone to fight on behalf of the Syrian government against a Sunni-led rebellion.
Here in Iraq, the advance of Sunni militants allied with the Islamic State, an Al Qaeda offshoot, has clearly raised sectarian tensions. The 2003 U.S.-led overthrow of Saddam Hussein, a Sunni, contributed to sharpened divisions along religious and ethnic lines here. The Sunni population represents a minority in the capital and in the country as a whole, though Sunnis predominate in the areas to the north and west that have been seized by militants.
Any militant advance on Baghdad would clearly be met with forceful resistance from determined opponents, led by Shiite soldiers and militiamen. They appear unlikely to throw away their weapons and retreat, as Iraqi soldiers did last month in the face of an offensive by the Islamic State, which at the time was calling itself the Islamic State of Iraq and Syria, or ISIS. This time they would be fighting for the Shiite heartland, not a faraway outpost.
The Shiite volunteers here say they are the vanguard protecting the great shrine cities to the south, Karbala and Najaf.
"We will defend our holy places to the death," vowed Hassan Hussein, 27, one of half a dozen special forces commandos from Najaf who came to Kadhimiya before being deployed after reenlistment.
The sense of grim resolve evident among many Shiites recalls the dark days of 2006, when Shiite militiamen began to strike back methodically and ruthlessly at Sunni opponents, including Al Qaeda militants, who had for years targeted Shiite civilians and pilgrims.
The Kadhimiya mosque and its devout attendees were favorite targets of suicide bombers, prompting strict security procedures now in place. Vehicular traffic is banned near the shrine.
The violence that soared in 2006, after an attack on a revered Shiite shrine in Samarra, plunged Iraq into a savage sectarian war. Bodies turned up floating in the Tigris, dumped on streets, stuffed into sewer pipes, tossed into lots. Morgues couldn't handle the demand. The Shiite majority emerged from the carnage as the nation's principal power.
Whether the current scenario will devolve into such bloodletting remains to be seen.
For these recruits, defending Shiites from an existential threat is much more important than protecting the Shiite-led government of Prime Minister Nouri Maliki, who has been widely accused of alienating Sunnis. Since elections this spring, Maliki has been struggling to secure another term as prime minister.
A sense of steadfastness and confidence in victory was evident as worshipers arrived at the Kadhimiya mosque for the first Friday prayers of the Ramadan month of fasting. The gold dome and slender minarets shimmered in the heat.
Prominent among the lines of faithful walking to the shrine despite the 110-plus-degree temperatures — and the Ramadan strictures on drinking and eating — were the many military-aged men, who often arrived in groups. They exuded the jaunty self-assurance of many young men headed off to war, righteous in their cause.
Some wore jeans and sandals and carried small packs of clothing and other essentials to be taken to their bases. Their possessions were few. Many were recent recruits, having volunteered after a call last month from Iraq's top Shiite cleric, Grand Ayatollah Ali Sistani, to join the "holy defense" against the "terrorists." Many described themselves as laborers or unemployed.
"We are heeding our clerics' call," said Ali, the recruit who arrived with his younger brother. They were seated in a shaded entryway at the foot of the main street leading to the shrine. Rami, the brother, nodded in agreement, but didn't utter a word.
Sistani, assailed as the "sleeping cleric" a decade ago for being slow to act as Shiites were being slaughtered on the streets, did not hesitate this time. Multitudes have since signed up for either the army or militias.
Security forces guarding the sprawling shrine have become accustomed to the fervent volunteers who come here before shipping out to the front lines, keen to show their devotion. It is a comforting ritual for many who may never return.
"They arrive here day and night, all the time," said police Sgt. Iyad Kathem, who was among those posted at one of the pedestrian entrances, where everyone receives a security pat-down, be they young or old. "They are very enthusiastic."
Iyad Aaridhi, another former special forces soldier who was reenlisting, said, "We hope to destroy this threat and force these killers to flee Iraq."
"We are fighting for our homes, for our creed," he said.
Special correspondent Nabih Bulos contributed to this report.