BAGHDAD — At least 31 people were killed in a stampede on Tuesday at a shrine near the Iraqi city of Karbala, where tens of thousands of pilgrims were observing the holy day of Ashura, officials said.

About 100 people were injured in the panicked rush, which began when part of a walkway collapsed, two officials said.

Hundreds of thousands of people converge every year on Karbala, which is about 50 miles south of Baghdad, for Ashura, which is one of the most sacred events for Shiite Muslims.

The day commemorates the killing of Hussein, a grandson of the Prophet Muhammad, by a rival Muslim faction in A.D. 680, an event that is said to have cemented the schism between Shiite and Sunni Islam. Shiites consider Hussein and his descendants the rightful heirs of the prophet.