KARBALA, Iraq - Millions of Shiite Muslim pilgrims defied the threat of jihadist attacks and thronged the Iraqi shrine city of Karbala for the climax of annual Arbaeen mourning rituals on Saturday.
Some had walked for more than 12 days, from Iraq's far south or across the border from Iran, while others were bused in or crammed into lorries for the journey.
Defence Minister Khaled al-Obeidi said a total of 17 million will have gone through Karbala for Arbaeen this year, including more than four million foreigners from 60 countries.
A sea of devotees descended on the city to reach the shrine of Imam Hussein, beating their heads and chests to show remorse for not saving him from the armies of the caliph Yazid that beheaded him in 680 AD.
While many chanted in unison, rapt in a collective religious trance, others were keenly aware of the symbolic power Arbaeen could have in the war against the Islamic State group.
A mortar attack that killed one person on Friday highlighted the huge security concerns surrounding what is believed to be one of the largest religious gatherings in the world.
But the pilgrims were undeterred.
"Forget mortars, even if it rains jihadists on Karbala, we will not be prevented from visiting the Imam Hussein shrine," said Kadhem Hussein, a 25-year-old who had walked from Nasiriyah, some 300 kilometres (180 miles) away.
The Islamic State group - led by Sunni extremists - considers Shiites to be heretics and has made targeting the community one of its main objectives.
The head of Karbala operations command, brigadier General Qais Khalaf Rahim, said the number of security personnel in Karbala was hiked by 15,000 to 40,000 following the mortar attack.
"The efforts of these jihadists are vain because we have all come to Karbala ready to sacrifice, wishing to become martyrs," said Abdel Hussein Salem, who volunteered to serve food to the pilgrims at one of the city's entrances.
Leaders in Iraq's Shiite-dominated government as well as clerics have been keen to cast the pilgrimage as an act of resistance against the jihadists who took over swathes of the country in June.
Many of the million or so Iranians who flocked to Iraq for the occasion said they were performing the pilgrimage on the order of their nation's supreme leader, Ayatollah Ali Khamenei.
Turnout estimates were hard to verify independently but all officials seemed to agree this Arbaeen was the largest they had ever seen. Some southern towns and cities looked emptied of their population.
Rahim command chief said new access roads had to be opened to handle the flow of pilgrims converging on Karbala, a medium-sized city around 70 kilometres (45 miles) south of Baghdad.
Even Grand Ayatollah Ali al-Sistani, the most revered Shiite cleric in Iraq, acknowledged Friday that Karbala "is not, in its current state, able to accommodate such huge numbers of visitors".
The municipality of Tehran provided 60 rubbish trucks and 10,000 volunteer cleaners to handle the tonnes of waste from the tens of thousands of meals served to the pilgrims.
Strength in numbers
Aerial views of the city showed rivers of black-clad faithful, many wearing coloured headbands and waving flags, as far as the eye could see.
Men could be seen perched on walls, roofs and window sills attempting to direct the flow of weeping and chanting visitors in order to avoid stampedes.
Ali Sabri, an Iranian from Tabriz, running a large "mawkab" - one of the 7,000 spots serving food and beverages to the pilgrims in Karbala - shipped in a bread-making machine that can churn out 90,000 flatbreads in eight hours.
"I will present this machine as a gift to the shrine authorities after the pilgrimage," he said.
The security deployment has been massive, amid fears IS and its seemingly endless supply of suicide bombers could seek to cause maximum casualties by attacking large crowds.
Access to central Baghdad has been very restricted for days, to minimise the risk of major attacks and avoid a complete logjam.
Iraqi officials have stressed how crucial a recent military victory against the jihadists in the Jurf al-Sakhr area has been in making the pilgrimage possible.
The continued presence there of IS fighters would have exposed the pilgrims walking through an area that has seen some of the worst sectarian violence of the past decade and been dubbed the "triangle of death".
Few incidents have been reported, however.
Besides Friday's deadly mortar fire near Karbala, which fell short of the area where pilgrims were congregating, four people were killed near in crowd management related incidents.
Three other people were killed earlier this week in a bomb blast targeting pilgrims in Baghdad.