Performing the Hajj at least once in a lifetime is one of the five "pillars", or duties, of Islam for those who can afford it.
Every able-bodied Muslim is expected to go on the Hajj once
Many Muslims save for years in order to perform the pilgrimage. They often have to travel thousands of miles.
Then, once they arrive, they must brave the fierce heat of the desert as they perform the Hajj rituals.
The sheer number of pilgrims - almost two million this year - poses big challenges to the Saudi authorities.
For the Saudi hosts, the event has a special importance.
They are acutely conscious of their responsibility as custodians of the Muslim holy places.
The authorities face formidable problems.
1987: 400 die in Iranian-Saudi confrontation
1990: 1,426 pilgrims killed in tunnel leading to holy sites
1994: 270 killed in stampede
1997: 343 pilgrims die and 1,500 injured in fire
1998: At least 118 trampled to death
2001: 35 die in stampede during stoning
In recent years hundreds have died as a result of demonstrations, fires, stampedes - or just sunstroke and exhaustion.
The Saudi authorities have introduced a quota system to keep down the numbers.
The Valley of Mina has been transformed into a vast encampment of fireproof tents to accommodate the pilgrims.
In a huge logistical operation, thousands of buses have been used to carry pilgrims.
Many others have been travelling in private cars, some on foot.
The Hajj can be logistical nightmare for Saudis authorities
But the terrible death toll at the "stoning of the devil" ritual on Sunday shows that the Saudis have some way to go to eliminate the risks inherent in bringing so many people together.
And in recent years the authorities have faced an even more daunting challenge than accommodating hundreds of thousands and preventing stampedes - trying to keep politics out of the Hajj.
In 1987 hundreds of pilgrims were killed in clashes between the Saudi security forces and Iranian-led demonstrators.
Muslims are divided over whether faith and politics should mix.
Many regard such a big gathering as an ideal chance to promote political causes.
So the Hajj reflects the divisions within the Muslim world, as well as the goal of Muslim solidarity.