BEIRUT, Lebanon — In streaming ribbons of white, great masses of Muslim pilgrims made their way between cities of air-conditioned tents toward the next stop on their holy tour of Mecca in Saudi Arabia.
Then something went disastrously wrong, trapping the crowds in narrow streets and touching off a mass panic and crushing stampede that left the asphalt covered with lost sandals, crumpled wheelchairs and piles of white-robed bodies.
It was the deadliest accident during the Hajj pilgrimage in a quarter-century, with at least 717 pilgrims from around the world killed and more than 850 wounded. And it posed yet another challenge for the country’s new leader, King Salman, who is already coping with low oil prices, a war in Yemen and an increasingly fierce rivalry with Iran.
The stampede was the latest in a series of crises that have plagued the pilgrimage this season: Just two weeks ago, a crane collapse killed more than 100 visitors, and hotel fires have injured others. The missteps have embarrassed the insular Saudi monarchy, which considers itself the global guardian of orthodox Islam and takes great pride in protecting the holy sites and their millions of annual visitors.
King Salman — who bears the title of “the custodian of the two holy mosques,” giving him personal responsibility for Mecca and Medina — expressed his condolences for the dead in an address aired on Saudi state television and ordered a review of the management of the pilgrimage. A commission was formed to investigate.
Other officials appeared to blame the dead. The Saudi health minister, Khalid al-Falih, said in a statement that the stampede may have been caused by “some pilgrims who didn’t follow the guidelines and instructions issued by the responsible authorities.”
But some present in the area at the time said security forces had temporarily closed exits from an area packed with pilgrims, causing the crowding that led to the stampede.
Khalid Saleh, a Saudi government employee who rushed to the site when he heard screams and sirens, said he had found “huge numbers of people on the ground either dying or injured.” Pilgrims there told him that some of the area’s exits had been closed so that V.I.P. cars could pass, he said.
The Saudis’ main regional rival, Iran, blamed the tragedy on Saudi mismanagement. The head of Iran’s Hajj organization, Said Ohadi, said two paths near the site of the accident had been closed for “unknown reasons.”
“This caused the tragic incident,” he told Iranian state television. “Saudi officials should be held accountable.”
At least 131 Iranians were among the dead, according to Iranian news agencies.
Ayatollah Ali Khamenei, the supreme leader of Iran, blamed “misconduct and improper acts” by Saudi officials and declared three days of public mourning.
The Saudi government has spent billions of dollars on construction in Mecca in recent years aimed at enlarging the grand mosque, adding accommodations and facilitating movement between the sites. Those investments followed a number of high-casualty accidents, including the 2006 deaths of 360 people on a bridge that had long been identified as a dangerous choke point.
Nevertheless, Thursday’s stampede is likely to renew criticism that Saudi Arabia lacks the management skills to protect one of the world’s largest regular human migrations.
Irfan al-Alawi, the executive director of the Islamic Heritage Research Foundation and a critic of how the Saudi government has developed Mecca and another holy city, Medina, said by telephone from Mecca that the stampede had been a result of “poor management” by the government, given the number of past disasters.
The stampede occurred early Thursday, the first day of the Muslim Eid al-Adha holiday, near a T-shaped intersection of narrow streets in Mina, about six miles east of Mecca, where many pilgrims stay in air conditioned tents.
The area is close to Jamarat, where pilgrims gather to throw pebbles at walls in a ritual that represents the stoning of the devil.
Maj. Gen. Mansour Turki, a spokesman for the Saudi Interior Ministry, told reporters that large groups of pilgrims had run into each other and started shoving, causing the stampede, which was exacerbated by extreme heat and fatigue.
General Turki and other officials said they would not comment on how the streets had become so crowded before the official investigation was complete.
And Saudi officials confined reporters given official access to the pilgrimage for hours after the accident, preventing them from reaching the site and investigating its cause.
Survivors described a nightmare situation of getting trapped in a crush of bodies and feeling other people walk over their backs in an effort to escape.
“I saw someone trip over someone in a wheelchair and several people tripping over him,” said Abdullah Lotfy, a pilgrim from Egypt, according to The Associated Press. “People were climbing over each other just to breathe.”
Cellphones and cameras are prohibited from the main sanctuaries, but can be used in the surrounding areas, and videos of the aftermath shared on social media showed scores of lifeless bodies in the street, many covered with the simple white garments pilgrims wear during the hajj.
One video showed a heap of men lying atop one another, while rescue workers in fluorescent yellow vests worked to free struggling survivors trapped between lifeless bodies.
It occurred less than two weeks after a large construction crane toppled over and crashed through the roof of the Grand Mosque in Mecca, killing at least 111 people and injuring 394 others. The Saudi authorities have faulted the Saudi Binladin Group, a construction conglomerate working on the mosque expansion, denying it future contracts and banning some of its executives from leaving the country.
The accidents have occurred as the Saudi government spends billion of dollars on the construction of new buildings — including the world’s largest hotel — that critics say have destroyed the sites’ natural setting and cater only to the wealthiest pilgrims.
But accidents that kill large numbers of visitors have become less common than they were during earlier eras. The last was the stampede in 2006, along with a building housing pilgrims collapsed, killing at least 73 people.
Sami Angawi, a Mecca-born architect who has spent decades studying the pilgrimage, said the Saudi government faces a huge logistical dilemma in welcoming so many people and cycling them through a series of specific sites in a limited amount of time. Some two million pilgrims from 180 countries are performing the hajj this year.
He said the pilgrims’ diversity and lack of a common language added to the challenge. “With a huge number like this and all the diversity that is in it, it is hard to communicate and do orientation,” he said.
But he criticized the Saudi government for seeking to build its way out of the problem instead of improving crowd control.
“There is a lot of money spent, but the solution is not in making more roads or bridges,” he said. “It is in how to organize the management of people to have a flow from one area to another.”
Madawi al-Rasheed, a Saudi anthropologist at the London School of Economics, accused members of the royal family of profiting handsomely from the construction boom.
“The renovation and expansion are done under the pretext of creating more space for Muslim pilgrims, but it masks land grabs and vast amounts of money being made by the princes and by other Saudis,” she said. “There is no accountability.”
Dr. Rasheed said that officials in the kingdom had avoided responsibility in part by citing the belief that anyone who dies during the pilgrimage — one of the five pillars of Islam, and a duty for all able-bodied Muslims with the means to make the trip — goes to heaven.
Saudi state television reported the deaths in text banners on its screen during normal pilgrimage programming, only briefly showing footage of rescue workers putting injured pilgrims into ambulances.
“That is among the things that happen at any large gathering,” one presenter said.
He closed his program by reminding viewers that it is a “virtue” to die while performing the pilgrimage and that the tragedy was only “temporary.”
Reporting was contributed by Mona Boshnaq from London, Kareem Fahim from Cairo, Thomas Erdbrink from Tehran, Christine Hauser from New York, and Sheikha al-Dosary from Alexandria, Va.