After sunset they head to Muzdalifah, halfway between Arafat and Mina, where they gather several dozen pebbles so they can perform the symbolic "stoning of the devil".
The last major ritual of the hajj is back at Mina, where pilgrims throw seven stones at each of three huge concrete walls representing Satan.
The ritual is an emulation of Abraham's stoning of the devil at the three spots where it is said Satan tried to dissuade him from obeying God's order to sacrifice his son, Ishmael.
After the first stoning, the Eid al-Adha feast of sacrifice begins, marking the end of the hajj.
The pilgrims can then change back into normal clothing, returning to circumambulate the Kaaba and complete their stone-throwing rituals before heading home.