Saudi Arabia faced mounting criticism on Friday after a stampede killed more than 700 Muslim pilgrims near the holy city of Mecca, as people in countries around the world mourned the victims.

But with the death toll hovering at 717 — a number Saudi officials said could still rise — the kingdom’s leadership appeared to rally around explanations that sought to deflect full responsibility.

Many of the statements increasingly suggested that the pilgrims share some blame for Thursday’s deadly crush, which left at least 863 others injured.

Saudi officials said most victims had ignored the allocated time slot in which their group was supposed to take part in an important ritual. On Friday, Health Minister Khalid al-Falih said the stampede may have been touched off “because some pilgrims moved without following instructions by the relevant authorities.”

Such accounts, however, could further anger critics who say Saudi authorities once again failed to manage the hajj crowds, leading to the deadliest incident to take place during the pilgrimage in 25 years.

Despite efforts to make the hajj safer, another pilgrimage tragedy

“It is not God’s will. It is man’s incompetence,” said Mohammad Jafari, an adviser to a British tour operator that organizes hajj trips, the BBC reported.

Saudi officials also denied reports that the arrival of an official’s convoy contributed to congestion in the area before the stampede. “The Kingdom of Saudi Arabia’s senior dignitaries’ vehicles do not travel through this area,” the Saudi ambassador to the United Kingdom, Prince Mohammed bin Nawaf al-Saud, said in a statement.

Some of the harshest criticism of the country’s handling of the crowds has come from Iran, Saudi Arabia’s main regional rival.

Iranian officials accused Saudi security forces of blocking two paths along the hajj route, causing congestion and at least 131 Iranian deaths in the stampede. Iran’s supreme leader, Ayatollah Ali Khamenei, said Saudi authorities should shoulder responsibility, and he blamed their “mismanagement” for the catastrophe.

In Tehran, thousands of protesters carried black banners and chanted against the Saudi royal family.

Hours later in New York, Iran’s president, Hassan Rouhani, suggested that inexperienced Saudi security units may have been deployed for the hajj because other personnel were involved with ­Saudi-led attacks in Yemen against rebel forces, which the West and its allies believe are backed by Tehran.

Saudi authorities say a stampede among worshippers killed more than 700 people at the height of the hajj pilgrimage in the holy city of Mecca. (Jenny Starr/The Washington Post)

“It shows an ineptitude — may show an ineptitude — by the government of Saudi Arabia,” Rouhani told journalists.

Saudi King Salman has ordered a full investigation. But the sheer scope of the hajj crowds — which have more than doubled over the past two decades — represents a major challenge for security and logistics, with no easy answers.

Saudi Arabia has struggled to deal with the growing number of visitors for the hajj, as Mecca has become more accessible and air travel more affordable for a burgeoning global middle class. The mingling of about 2 million people from around the world also has raised concerns that the pilgrimage could spark global epidemics.

Other nations mourning the dead stretch from Senegal to Indonesia.

Hajj rites and processions went ahead Friday as the pilgrimage wound down. Every Muslim is expected to perform the hajj at least once, as long as the person is physically and financially able to do so.

Stampedes have become less frequent in recent years, as Saudi authorities have undertaken major construction work to ease the flow of pilgrims. But Thursday’s incident is likely to push ­authorities to implement further security and crowd-control measures and to intensify calls for ­restrictions on the numbers ­allowed to visit.

Saudi Arabia has cut the number of pilgrims attending the hajj since 2012, when more than 3 million made the journey. Pilgrims from foreign countries are restricted by a quota system that varies from country to country.

The tragedy is the second to strike this year’s hajj. Two weeks ago, a crane collapsed at the main mosque in Mecca as preparations were being made for the pilgrimage, leaving more than 100 people dead and injuring hundreds more.

Before the stampede, crowds were making their way from a vast settlement of more than 160,000 tents on the floor of the desert valley in Mina to perform a hajj ritual to commemorate the stoning of the devil by the prophet Abraham, known in Arabic as Ibrahim.

During the ceremony, pilgrims fling pebbles at one of three pillars representing the devil. The rite is considered to be one of the most dangerous parts of the pilgrimage because of the large crowds it draws through the Mina area’s narrow roads.

“I thought I was going to die,” 56-year-old Radhi Hassan, a pilgrim from Iraq who was caught in the crush, said by phone. “I pushed people and was able to drag myself out.”

Health authorities said the heat — which topped 110 degrees Thursday — contributed to the toll.

“Two elderly people fell to the ground, and then there was ­chaos,” Hassan said. “Thousands of people were trying to push through and stumbling and falling to the ground like dominoes. People were stepping on other people, and many people suffocated.”

But Maj. Gen. Mansour al-Turki, a spokesman for Saudi Arabia’s Interior Ministry, said in a televised news conference that authorities should not be judged on “one accident.”

“We will spare no effort in investigating the causes,” he said. “This event has caused pain for all of us.”

The country has carried out major expansion work at its holy sites to ease the flow of pilgrims. The complex in which the stoning ritual takes place was expanded beginning in 2006 after more than 360 people were trampled to death in Mina. Two years earlier, about 250 died in a similar incident.

The five-story structure enables pilgrims to stone pillars from multiple levels at once, allowing about 300,000 people to pass through each hour. The site is equipped with closed-circuit television cameras and helipads to allow for speedy intervention in the case of a tragedy.

In 1990, about 1,400 pilgrims suffocated or were trampled to death during a stampede in a tunnel leading out of the city — one of the worst disasters in the modern history of the pilgrimage.

Murphy reported from Washington. Martin Baron in New York and Sarah Kaplan in Washington contributed to this report.

Read more:

The sad science of a stampede

Despite efforts to make the hajj safer, another pilgrimage tragedy

Today’s coverage from Post correspondents around the world