Muslim pilgrims arrive to perform the symbolic stoning of the devil ritual as part of the hajj pilgrimage in Mina, near Saudi Arabia s holy city of Mecca, on June 29, 2023. AFP
This year more than 1.8 million worshippers performed the hajj, which is one of the five pillars of Islam and is among the world's largest religious gatherings.
On Friday, two days after the last major ritual, tens of thousands of people packed roads and boarded buses out of Islam's holiest sites in Mecca, bringing the hajj to a close, the AFP correspondent said.
They departed after performing a farewell "tawaf" -- circling seven times around the Kaaba, the large black cube in Mecca's Grand Mosque.
"I am very happy that I finished the pilgrimage safely," said Mohammad al-Bashir, a 47-year-old Tunisian driver who was performing his last prayers on Friday.
The hajj has a history of deadly catastrophes including stampedes and militant attacks, but this year's main challenge came from the extreme temperatures.
More than 2,000 people have suffered heat stress this year, according to Saudi authorities, after temperatures soared to 48 degrees Celsius (118 degrees Fahrenheit) during the annual rites.
At least 230 people -- many from Indonesia -- died during the pilgrimage, according to numbers announced by various countries which did not list causes of death.
The real figure for heat stress -- which includes heatstroke, exhaustion, cramps and rashes -- is probably far higher, as many sufferers were not admitted to hospitals or clinics.
This year's attendance figures marked a dramatic increase on the 926,000 from last year, when numbers were capped at one million following the Covid-19 pandemic.
Only 10,000 were allowed in 2020, rising to nearly 59,000 a year later.
In recent years the hajj, which follows the lunar calendar, has fallen in the Saudi summer, at a time when global warming is making the desert climate even hotter.
Experts have warned that temperatures of 50 degrees Celsius could become an annual occurrence in Saudi Arabia by the end of the century.
The hajj is a major revenue-earner for Saudi Arabia, which is trying to pivot its oil-reliant economy in new directions including tourism.
The kingdom makes an estimated $12 billion a year from the hajj and year-round umrah pilgrimages.