Updated

Thousands of Muslims surging to complete a stoning ritual before sunset stampeded Thursday after some pilgrims tripped over dropped luggage, causing a pileup that killed at least 345 people in the second tragedy to hit this year's hajj.

Saudi authorities have sought for years to ease the flow of increasingly mammoth crowds during the annual Islamic pilgrimage, but the deaths on the final day of the stoning of the devil ritual underlined the difficulty in managing one of the world's biggest religious events, which this year drew more than 2.5 million followers.

The stampede came a week after another hajj disaster — the Jan. 5 collapse of a building being used as a pilgrims' hotel that killed 76 people in Mecca.

In the stoning ritual, all the pilgrims must pass a series of three "pillars" called al-Jamarat, which represent the devil and which the faithful pelt with stones to purge themselves of sin.

The site in the desert of Mina outside the holy city of Mecca is a notorious bottleneck in the weeklong pilgrimage and has seen deadly incidents in seven of the past 17 years, including a stampede in 1990 that killed 1,426 people and one in 2004 that killed 244.

"I heard screaming and ... saw people jumping over each other," said Suad Abu Hamada, an Egyptian pilgrim. "Police starting pulling out bodies. The bodies were piled up. I couldn't count them, they were too many."

Bodies covered in white sheets lined the pavement near the ramp where the stampede occurred, and emergency workers rushed the injured away on stretchers. Police cleared part of the site, but thousands of pilgrims continued the stoning ritual.

The Interior Ministry put the death toll at 345, and the Health Ministry said 289 people were injured. State-run Al-Ekhbariyah television said most of the victims were from South Asia.

After the 2004 stampede, Saudi officials widened ramps leading to a platform the width of an eight-lane highway where the three pillars are located and created more emergency exits to accommodate the crowds.

Each of the small, round pillars also were replaced with 85-foot-long walls to allow more people to stone them at once without jostling each other. The walls were extended through the bottom of the platform so more pilgrims can carry out the stoning from below.

Thursday's stampede occurred below the platform, near one of the four big ramps. In theory, the crowds are supposed to enter the platform using two of the ramps and exit down the other two, but pilgrims often ignore the rules.

Thousands of pilgrims were rushing to complete the last of the three days of the stoning ritual before sunset when some of them began to trip over dropped baggage, causing a crush, said Maj. Gen. Mansour al-Turki, spokesman for the Interior Ministry.

Many pilgrims carry personal belongings — tents, clothes and bags of food — as they move between the various stages of the hajj.

"This was fate destined by God," al-Turki said. "Some of the pilgrims were undisciplined and hasty to finish the ritual as soon as possible."

Mina General Hospital, a small facility near the al-Jamarat site, was filled with injured, and some victims had to be sent to hospitals in Mecca and Riyadh, Dr. Ismail Abdul-Zaher said.

Many pilgrims expressed frustration over the repeated disasters at al-Jamarat.

"This should not happen every year. It should be stopped, it's a scandal. There must be a way to organize this better," said Anwar Sadiqi, a pilgrim from Pakistan.

Ensuring a smooth pilgrimage is a key concern for Saudi Arabia's royal family, which bolsters its legitimacy by touting its role as the "custodian of the holy cities" of Mecca and Medina, where Islam's 7th century prophet Muhammad was born and lived.

Crown Prince Sultan Bin Abdel Aziz told reporters the kingdom had "spared no effort" to avoid such disasters but, he added, "it cannot stop what God has preordained. It is impossible."

"We feel pain and sorrow for them and for their families and we send our condolences," the prince said on Al-Ekhbariya television.

The hajj is a complex balance of safety with Islam's requirements that every able-bodied Muslim should perform the pilgrimage at least once. Saudi Arabia sets a quota of participants, allowing every nation to send 1,000 pilgrims for every 1 million in population.

The three-day stoning ritual in particular is a nightmarish problem in crowd dynamics.

Hundreds of thousands of pilgrims must move up the ramps onto the platform, maneuver from pillar to pillar and hit each with seven stones, then exit.

Many of the pilgrims are in a rush because of the time constraints on the ritual and their anxiety about past stampedes.

Traditionally, stoning was carried out from midday to sunset.

Shiite Muslim clerics have issued edicts allowing pilgrims to do the stoning in the morning, and some Sunni clerics have followed suit in an attempt to space out the crowds. But some clerics following Saudi Arabia's strict Wahhabi interpretation of Islam urge the faithful to stick to the midday start.

About 60,000 Saudi police and soldiers patrolled the Mina plain once the stoning ritual began Tuesday to direct pilgrims. Helicopters flew overhead, and authorities monitored the pilgrims from a control room through closed-circuit TV.

But some people complained that police did little to help.

"They look indifferent. They don't carry out their duties seriously," Iftikhar Hussein, an Iraqi pilgrim, said. "This looks like a garage rather than a holy site."

"If hajj is a duty for every able-bodied Muslim, it should be a duty for the government" to ensure it is safe, she added.

Signs giving directions are few, and pilgrims often ignore regulations. Peddlers selling food and souvenirs also impede the pilgrims.

Saudi Arabia has announced plans for further changes to the site in coming years that it says will allow 500,000 pilgrims an hour to carry out the stoning.

Among the changes, the platform is to be expanded to four levels, with 12 entrances and 12 exits. Also, there are plans to bus pilgrims to al-Jamarat from a nearby tent city in the desert rather than allow them to make their own way to the site.

Thursday evening, the highway from Mina to Mecca was packed with buses, trucks and cars carrying pilgrims to the holy city for Friday's final rite of the hajj: the "farewell tawwaf" — a walk around the Kaaba, the black stone cube that all Muslims face when they perform daily prayers.