First came billowing banners in yellow, green and black. Then colorful tents were raised Sunday beside tables stacked with sugar-filled tea glasses, steaming teapots and plates of biscuits.
And, surrounding every table and tent, wary Iraqi federal police teams and bands of armed Shiite militiamen scanned the crowds for suicide bombers.
It was Muharram, the beginning of the Islamic new year. Shiite Muslims poured into the streets to begin a 10-day period of mourning that culminates in a mass pilgrimage to the holy city of Karbala in southern Iraq to commemorate Ashura, the 10th day of Muharram.
The annual processions have been repeatedly bombed by Sunni militants in the past. This year, for the first time, Shiites marked the holiday while under the looming threat of Islamic State fighters who have seized nearly a third of Iraq while setting off daily car bombs and suicide attacks in Shiite neighborhoods, killing hundreds.
There is one more difference this year: The holiday coincided with Iraqi government claims that its forces had driven Islamic State from a key city south of Baghdad on the route taken by the hundreds of thousands of pilgrims who march to a Shiite shrine in Karbala.
"Because of this great victory, the pilgrims will be safe," said Ali Khazil, 25, a Shiite political party official organizing a tent and food table, where motorists pulled over for free tea and biscuits.
Prime Minister Haider al-Abadi, a Shiite, announced that Islamic State militants had been driven out of Jurf al-Sakhar, 35 miles southwest of Baghdad. Abadi lauded the role of Shiite militiamen, whom he called "heroes of popular mobilization." The militias called the effort "Operation Ashura."
State TV on Sunday showed Iraqi soldiers walking past the city's police station and municipal building. Footage also showed soldiers trying to remove roadside bombs left by the militants.
Islamic State seized the majority Sunni city of about 80,000 people in late July after the group's predecessor, al Qaeda in Iraq, had dominated it for years. Its "liberation," as Abadi called it, would provide not only an important military foothold but also a psychological victory for the Shiite-led government by opening a secured route for Shiite pilgrims.
"When we heard this good news, my whole family was relieved. It's a blessing," said Abdul Rahman, who had stopped for tea at a Shiite table in central Baghdad on Sunday. He said he and his family plan to make the pilgrimage to Karbala this week.
Naeem Aboudi, spokesman for the Asaib Ahl al Haq militia, whose fighters played a central role in Jurf al-Sakhar, said the operation was carried out without U.S. assistance. Iraq's interior minister, Mohammed Ghabban, said U.S. aircraft provided limited air cover but launched no airstrikes.
Aboudi said militiamen and government forces contended with booby-trapped buildings left by retreating militants. "The terrorists remain in a few places only" around the city, he said.
U.S. and coalition aircraft have bombed Islamic State targets in Iraq since Aug. 8, mostly in western and northern areas. A spokesman for the U.S. Central Command did not respond Sunday to requests for information about government claims and any U.S. role in Jurf al-Sakhar. A Centcom news release Sunday made no mention of airstrikes in the area among 12 strikes elsewhere in Iraq.
Photos posted on the internet showed the commander of Iran's paramilitary Quds Force, Gen. Qassem Suleimani, meeting with two top Asaib Ahl al Haq militia leaders, underscoring Shiite Iran's role in Iraq's fight against Islamic State.
Interior Minister Ghabban issued a statement saying the operation "secured the road to Karbala for the pilgrims during Muharram and Ashura." Ghabban, formerly a senior leader of the Badr Organization and its powerful militia, is a Shiite who took office a week ago. The Badr militia took part in the operation.
Ashura commemorates the death of Iman Hussein, the grandson of the prophet Mohammed, in the Battle of Karbala in 680 A.D. Shiite pilgrims from Iraq and other Muslim countries walk in processions to Karbala to worship at a shrine to Hussein.
The government's claims of victory in Jurf al-Sakhar brought joy and satisfaction to many Shiites, even on a day of mourning.
"The people are so happy," said Abu Mustafa, a Shiite militiaman who guarded a tent and food table in Baghdad's Karada neighborhood. "They're all talking about the victory."
Among those providing free tea and food were brothers Marwan and Safwan Naweel, both Chaldean Christians. They said they were participating in the commemorations out of a sense of solidarity; they have made pilgrimages to Karbala in the past and intend to go again this year.
"It doesn't matter if you are Muslim or Christian, we all love Imam Hussein," said Safwan, 30. He said he made a wish for a baby boy on a previous pilgrimage to Karbala and was rewarded with the birth of a son, Ivan.
Like most Iraqi Shiites, the brothers detest Islamic State. Marwan said he and his extended family were forced to flee their homes near Mosul three months ago, after Islamic State militants seized the town, murdering Shiites, Kurds and Christians. Safwan opened his Baghdad home to 13 family members.
"This is my fate," Safwan said before resuming his task of filling tea glasses.
Near the brothers' tea table, adorned with tributes to Hussein, police and militiamen searched cars, worried about Islamic State attacks.
"Our intelligence people told us to be very aware of suicide bombings today," said Khazil, the Shiite political official. He said Sunni suicide bombers in the past have posed as pilgrims, sipping tea before detonating suicide vests among worshipers.
Two bombs exploded in Baghdad on Sunday, killing five people, but it was not clear whether those attacks were aimed at pilgrims.
Khazil said pilgrims will make the trek to Karbala whether or not the roads around Jurf al-Sakhar are fully secured.
"They want Daesh to come to them," he said, using the Arabic acronym for Islamic State. "They say it would be a good thing to die, to become a martyr for Hussein."