Baghdad: A walkway collapsed and set off a stampede in the holy city of Karbala on Tuesday as thousands of Shiite Muslims marked one of the most solemn holy days of the year. At least 31 people were killed and about 100 were injured, officials said.

It was the deadliest stampede in recent history during Ashoura commemorations, when hundreds of thousands of people converge on the city, some 80 kilometers (50 miles) south of Baghdad, for the occasion every year.

The stampede happened toward the end of the Ashoura procession, causing a panicked rush among worshippers near the gold-domed Imam Hussein shrine, according to two officials who spoke to The Associated Press from Karbala.

Shi'ite pilgrims gather during the religious festival of Ashura in the holy city of Karbala, Iraq (Image: Reuters)

Afdhal al-Shami, a shrine official, denied that there was a collapse or any cracks in the walkway. "It was a stampede that led to this incident," he said.

Mohammed Shenin Jebir, a pilgrim, said everything happened very suddenly.

"Visitors suddenly fell on the ground and there was a strong stampede, there were many pilgrims who all fell on top of each other," he said, speaking after being treated at the Hussein Medical City in Karbala for cuts and bruises above his right eye.

The somber day of Ashoura commemorates the killing of the Prophet Muhammad's grandson, Imam Hussein, by a rival Muslim faction in Karbala in what is now Iraq, in 680 A.D. Hussein and his descendants are seen by Shiites as the rightful heirs to the prophet. Hussein's killing has been attributed with cementing the schism between Shiite and Sunni Islam.

In recent years, Ashoura processions have been attacked by extremist Sunni militants. In 2004, at the height of Iraq's sectarian violence, 143 people were killed in near-simultaneous suicide and other bombings at shrines in Baghdad and Karbala during the Ashoura procession.

In 2005, rumors of a suicide bomber among worshippers crossing a bridge during a different religious holiday caused a massive stampede killing more than 950 people, many of whom jumped, in their panic, into the Tigris River.

Tuesday's commemorations were peaceful until the walkway collapsed, triggering the chaos.

The officials said the stampede took place during the so-called "Tweireej" run, when tens of thousands of people run toward the shrine of Imam Hussein in Karbala around noon.

The 2-3 kilometer (1-2 mile) run symbolizes when the maternal cousins of Imam Hussein's half-brother al-Abbas ran from the nearby village of Tweireej to rescue him, only to find out that he had been killed.

The officials — one of them at the Imam Hussein shrine and the other a security official — spoke on condition of anonymity because they were not authorized to speak to the press.

At least 10 among the injured pilgrims were in critical condition, according to the officials.

No Iraqi media immediately released images of the walkway collapse or ensuing stampede.

"We lament this tragic loss of life and wish those injured a swift and full recovery," U.S. Ambassador Matthew H. Tueller said, offering his condolences to the families of the victims on behalf of the U.S. Embassy in Baghdad.

The president and prime minister also offered their condolences and said they were following investigations into the incident.

Earlier in the day, hundreds of thousands of black-clad pilgrims held Ashoura processions amid beefed-up security in Karbala and in the capital, Baghdad, marching through the streets. Many of the faithful beat their chests and lashed themselves with chains in a symbolic expression of grief and regret for not being able to help Hussein before his martyrdom.

On Sunday night, thousands marched toward the holy shrine of Imam Hussein in Karbala, which had been lit up on the eve of the celebration.

This year's commemoration comes amid rising tensions in the Middle East and the crisis between Iran and the U.S. and its ally Israel in the wake of the collapsing nuclear deal between Tehran and world powers.

Israel has recently expanded its war on Iran and its allies in the region, and is believed to have struck targets as far out as Iraq in recent weeks, drawing outrage and pledges of retaliation.