Millions of Shiite Muslim pilgrims defied the threat of jihadist attacks and thronged the Iraqi shrine city of Karbala on Saturday for the climax of annual Arbaeen mourning rituals.
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's 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 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.
- High security -
The head of Karbala operations command, brigadier General Qais Khalaf Rahim, said the number of security personnel in Karbala was boosted 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 pilgrims in the city.
Leaders in Iraq's Shiite-dominated government and clerics have been keen to cast the pilgrimage as an act of resistance against the jihadists who seized swathes of the country in June.
Many of the million or so Iranians who flocked to Iraq 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.
Signup to our newsletter and follow us on Facebook and Twitter!
Rahim 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".
- 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 perched on walls, roofs and window sills attempted 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.
As night fell on Karbala, tens of thousands of the faithful knelt in perfect rows for a mass flood-lit prayer outside the shrine, with its glittering golden dome and two minarets.
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 endangered the pilgrims walking through an area that has 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 in crowd management-related incidents.
Three other people were killed earlier this week by a bomb blast targeting pilgrims in Baghdad.