Pilgrims making the trip to the shrine city of Karbala for Ashura, which marks the death of Imam Hussein, one of the most revered figures in Shiite Islam, have been targeted in the past by deadly bombings.
But this year, the threat to the pilgrims, who come from Iraq but also other countries including Iran, is even greater after the Islamic State (IS) jihadist group spearheaded a sweeping militant offensive that overran much of Iraq's Sunni Arab heartland.
The pilgrimage is a major test for the new government headed by Prime Minister Haidar al-Abadi, as well as for Iraq's security forces, who have struggled to push the militants back.
A major attack during the commemorations in Karbala, where Imam Hussein is buried, would increase already-significant tensions between Iraq's Shiite majority and Sunni Arab minority, and could spark revenge attacks.
The 2006 bombing of a revered Shiite shrine in Samarra, north of Baghdad, sparked waves of sectarian violence in which tens of thousands died, though an attack on a shrine during the pilgrimage would be unlikely to succeed.
"The level of danger is higher than past years. Before there was terrorism, but it did not reach this level," a police colonel said on condition of anonymity.
An army brigadier general who also declined to be identified by name agreed, saying: "There was danger," but "it is now greater than before. The threat is bigger."
Highlighting the risks, a suicide bomber detonated a truck rigged with explosives on Saturday at the main checkpoint through which pilgrims pass on their way from Baghdad to Karbala, killing more than 20 people.
And a car bomb exploded near a tent serving refreshments to pilgrims in the capital, killing at least 10 more.
MAJOR SECURITY DEPLOYMENTS
Signup to our newsletter and follow us on Facebook and Twitter!
Iraq will deploy thousands of security personnel as well as allied militiamen to guard against further attacks.
Among the most dangerous areas for pilgrims is jihadist-held territory south of Baghdad, along the road pilgrims travel to Karbala, where the main commemorations that peak on Tuesday take place.
Security forces and militiamen launched a major push to retake the Jurf al-Sakhr area near that road, driving the militants back.
Jurf al-Sakhr was used by jihadists to "rig cars (with explosives) and make bombs that targeted Karbala and Hilla" during pilgrimages, said Staff Lieutenant General Othman al-Ghanimi.
"Its liberation helps us carry out the security plan" for Muharram, the second holiest month in the Islamic calendar during which Ashura is marked.
"Clearing Jurf al-Sakhr... provides extra protection for the pilgrims," the police colonel said.
But while Jurf al-Sakhr has been retaken, the conflict has taken a heavy toll on the area, with residents forced from their homes, numerous houses destroyed and many buildings and roads still rigged with bombs.
Ghanimi said the security plan involves "more than 25,000 personnel from the army and police, in addition to 1,500 volunteers", a reference to members of Shiite militias.
These forces will be deployed on the road from Baghdad to Karbala and inside the shrine city itself.
Within the capital, plainclothes members of the security forces will be on the lookout for suicide bombers as people march to mark Ashura, and the numbers of forces deployed will be "much higher" than last year, the colonel said.
But attacks, especially by bombers on foot, are "difficult to control," the colonel said, adding that the threat cannot be entirely eliminated whatever measures are taken.