This year, some marchers beat their heads and chests with their hands, while others flogged themselves with iron chains in ritual self-flagellation, as loudspeakers played religious music across the city of some 6 million people.
Iraqi officials estimated the crowd at 3 million but verification of the numbers was impossible.
More than 1,800 Iraqi security forces were guarding the mosque complex, including 625 agents inside the shrine, officials said. Shiite militiamen also were throughout the area.
US troops took a lower-key security role, staying away from the area immediately around the mosque to show respect.
Along the Tigris River, residents used dinghies and small motor boats to shuttle pilgrims over the brown churning waters.
"We have so many problems with security, with water and with power in this country -- it's overwhelming," said Imad Muhi, 35, who was helping to bring some of the pilgrims over the river. "This is the one day when we take time out from our own suffering to mourn and celebrate this religious festival."