Hundreds of thousands of Muslim pilgrims from all over the world, grouped by nationality, stoned the devil in Saudi Arabia's Mina valley on Saturday, as the hajj reached its final stages.
Men, women and children from 189 countries, many of whom had saved for years to make the trip, hurled pebbles at three vast stone pillars representing Satan, shouting "Allahu akbar (God is Greatest)."
They moved from one pillar to the next in groups by nationality, carrying their countries' flags in order not to be separated in the sea of humanity.
As pilgrims prayed after and during the stoning, others took pictures on their mobile phones of themselves next to the pillars.
This was criticised by members of the security forces who said through loudspeakers: "How are you people stoning Satan and taking pictures with him at the same time?"
Afghan pilgrim Aysha Mohammed, 77, sat down, panting. "There's a sweet feeling about getting tired during hajj" which Muslims must perform at least once in their lifetime.
"Ever since I was a child I had dreamt of standing on the Mount of Mercy in Arafat," where the Prophet Mohammed is said to have given his last sermon, she said with a smile. "They were purely spiritual moments."
"The trip to perform the hajj has cost me all the money I had," she told AFP. "I had been saving small amounts for over 15 years and I finally sold all my jewellery to reach this place."
Not everyone was satisfied, however.
Walking wearily towards the pillars, an exhausted 63-year-old Egyptian told AFP bluntly: "My trip has been bad."
Abdullah Jad, as he identified himself, said a company he paid to organise his pilgrimage took four years of savings and provided nothing in return, leaving him without accommodation and penniless in Saudi Arabia.
"An office took the money and told me they will have everything ready for me here," he said.
But "upon my arrival, I found out that I had been fooled and that I had no transport and nowhere to stay," said Jad, still wearing his traditional white pilgrimage robes and carrying an umbrella advertising a local telecoms company.
His voice quivered as he said that he had been sleeping at the Grand Mosque in Mecca and did not have enough money to eat. Drenched in sweat, Jad said the trip had cost him around 25,000 Egyptian pounds (nearly $4,000).
Signup to our newsletter and follow us on Facebook and Twitter!
Nearby, many pilgrims struggled to reach a parked truck offering free food and water.
Security forces were heavily deployed in the stoning area and first aid teams remained on high alert at the pillars.
The ritual, in the usually deserted Mina valley that comes to life only during the pilgrimage, began on Friday with the Muslim Eid al-Adha holiday as the faithful stoned the largest pillar, Jamrat al-Aqaba.
Early on Saturday, plastic bags of meat were gathered and sent to camps in Mina. On Eid al-Adha -- the feast of sacrifice -- sheep are slaughtered and the meat is distributed to needy Muslims.
The rite represents Abraham preparing to sacrifice his son before God provided a lamb in the boy's place at the last moment.
Piles of rubbish littered Mina's streets after pilgrims spent the night there.
Motorbikes replaced cars to become a luxury mode of transport amid the massive throngs, transporting pilgrims around Mina for between 150 and 200 riyals ($40-$53).
The stoning in Mina used to be the most dangerous phase of the hajj and the most problematic for the authorities, marred at times by deadly stampedes as well as fires in tent camps.
Now tents have been fire-proofed and gas canisters and cooking are banned. The stoning area has also been expanded to avoid overcrowding.
Saudi authorities have built a five-level structure around the three stoning sites, allowing for a smooth flow of pilgrims who are allowed to move in only one direction to prevent congestion.
The ritual recalls Abraham's stoning of the devil at the three spots where it is said Satan tried to dissuade the biblical patriarch from obeying God's order to sacrifice his son, Ishmael.
Groups of pilgrims were allocated specific times of day to perform the ritual.
According to the authorities, 168,000 police officers and civil defence personnel were mobilised for this year's hajj.
More than three million registered pilgrims are performing the rituals which end officially on Monday. Many pilgrims, however, conclude their pilgrimage on Sunday.