A mass stampede at a major shrine in the city of Karbala, Iraq has killed at least 31 pilgrims.

The pilgrims gathered on Tuesday to observe the holy day of Ashoura.

Another 100 people were injured at the site, about 100km south of the capital Baghdad, said health ministry spokesman Saif al-Badr, stressing the casualty toll was not final.

This is the deadliest stampede in recent history during Ashoura.

The deadly rush began when part of a walkway collapsed during a procession causing mass panic among worshippers.

Hundreds of thousands of Shia pilgrims swarm Karbala in Iraq every year to commemorate the death of Hussein, Prophet Mohammad’s grandson.

He was killed in the year 680 in what would become Karbala by the forces of the Caliph Yazid, a major event that helped solidify the divide between what would become Islam’s Sunni and Shia branches.

On Tuesday, packed processions of black-clad worshippers made their way to Hussein’s gold-domed shrine in Karbala, carrying black flags with his name written in red and wailing loudly.

To express their sorrow, some whipped themselves while others – including young boys – cut incisions into their foreheads with scalpels or large sabres, leaving streams of blood cascading down their faces.

Similar ceremonies took place in the capital Baghdad and in the Iraqi cities of Najaf and Basra.

Under ex-dictator Saddam Hussein’s Sunni-dominated regime, the vast majority of Ashoura commemorations were banned.

Now the day is a national holiday with streets across the country shuttered to allow for elaborate re-enactments of the Battle of Karbala.

This year’s somber commemoration comes amid rising tensions in the Middle East and the crisis between Iran and the US in the wake of the collapsing nuclear deal between Iran and world powers.

People in Iraq, Iran, Pakistan, Afghanistan, India, and Lebanon marked the day with rallies, prayers and self-flagellation.