The expulsion of IS jihadists from Iraqi cities has added an extra dimension to this year's pilgrimage to Imam Hussein's shrine in Karbala, about 80 kilometres (50 miles) southwest of Baghdad.

The annual commemoration of Arbaeen marks the end of the 40-day mourning period for the 7th-century killing of Imam Hussein by the forces of the Caliph Yazid -- a formative event in Shiite Islam.

ary units this year swept to victory after victory, leaving IS confined to a sliver of territory on the Syrian border.

"God has taken his revenge" against the Sunni extremist group, he said, after Iraqi security forces backed by mainly Shiite paramilit

Like millions of other Shiite pilgrims, Arkan al-Husseini travelled to Iraq's shrine city of Karbala for the Arbaeen commemoration Thursday of Imam Hussein's killing in battle -- but this time also to celebrate the Islamic State group's battlefield defeats.

"Thanks to God, Imam Hussein has overcome the tyrants. We've crushed them with the force granted to us by God," said 68-year-old Husseini, his face framed by a white beard and black headband.

Imam Hussein's killing in 680 AD was part of a fierce dispute over who should succeed the Prophet Mohammed, which eventually developed into a bitter schism between the Sunni and Shiite branches of Islam.

"Today we have defeated the children of Yazid," said the pilgrim from northern Iraq as he made his way towards the golden-domed mausoleum of the imam killed in the Battle of Karbala.

Almost 20 million Shiites converge on Karbala each year for Arbaeen, many on foot and others on chartered buses, from across Iraq and abroad, especially neighbouring Iran.

"These millions of people in Karbala are proof of our victory" over the jihadists, said another pilgrim, Mahmud Mohammed, 62.

IS swept across swathes of Iraq in 2014 and has regularly targeted Shiite pilgrims in devastating bomb attacks.

But the jihadist group has seen its self-styled "caliphate" disintegrate on the battlefield this year, losing its key northern Iraqi bastion of Mosul in July.

'Victory of good over evil'

s grandson, Imam Hussein (photo by: HAIDAR MOHAMMED ALI/AFP)

"Today, we are celebrating the victory of good over evil," said Mohammed, a member of Iraq's Shabak minority from near Mosul.

Abdel Hussein Farah, a resident of Karbala, said: "Now

that we've finished with the IS people, we feel safe."

But just like all the other black-robed pilgrims, he had to cross five checkpoints to reach the mausoleum.

Tens of thousands of security personnel have been deployed, as in past years, around the perimeters of the sanctuary as well as on all roads leading to Karbala.

Tents flying different coloured flags have been erected along the routes for volunteers to hand out food and drinks to pilgrims, as Iraqis mix with visitors from Iran, Yemen, Oman, Bahrain, Pakistan and Lebanon.

Against a backdrop of religious chants, men and women weep and beat their chests in mourning, some of the younger men using swords that leave blood dripping down their robes.

Arbaeen, which means 40 in Arabic, also marks the return to Karbala of companions of Imam Hussein held prisoner in Damascus for 40 days, and who had been presented with his head as a trophy by the Caliph Yazid.

The mausoleum was built at the site of the head's burial.