LUCKNOW, India — At least 24 people were killed and 20 others injured in a stampede that occurred as they were crossing a crowded bridge to reach a Hindu religious ceremony in northern India on Saturday, police said.

The stampede took place on the outskirts of Varanasi, a city in Uttar Pradesh state known for its temples. Organizers were expecting 3,000 devotees at the ceremony, but more than 70,000 thronged the ashram of a local Hindu leader on the banks of the Ganges River, said police officer S.K. Bhagat.

“We were not prepared for such a large crowd,” Raj Bahadur, a spokesman for the organizers, told The Associated Press.

The stampede happened as police started turning back people from the overcrowded bridge, the Press Trust of India news agency cited Bahadur as saying. That triggered a rumor among the devotees that the bridge had collapsed, and they started running for safety, he said.

Nineteen people were killed on the spot and five others succumbed to their injuries at a hospital, said police officer Daljit Chaudhary. Four of the 20 injured people were still in serious condition at the hospital, he said.

Prime Minister Narendra Modi said he was deeply saddened by the tragedy. “I have spoken to officials and asked them to ensure all possible help to those affected,” he tweeted.

Deadly stampedes are fairly common during Indian religious festivals, where large crowds gather in small areas with few safety or crowd control measures.

In October 2013, a stampede in Madhya Pradesh state in central India killed more than 110 people, mostly women and children.