Millions of Muslim pilgrims have taken part in the ritual stoning of the devil that marks the beginning of the end of the annual Hajj pilgrimage.

The Hajj officially ends on 29 October.

Muslims hurl pebbles at three adjacent walls that symbolise 'Satan', the devil. By doing so, they show their determination to reject sin and temptation.

Security has been tightened in Mina, the otherwise deserted valley where the ritual takes place. Stampedes have been known to occur during the stone throwing.

Devotees from 189 countries have been moving around the valley in groups in order to ease crowding. Muslims who have carried out the ritual can call themselves 'Hajjis'.

While some Muslims shouted 'Allahu Akbar' (God is the greatest) during the stoning ritual, others took pictures with the pillars.

"How are you people stoning Satan and taking pictures with him at the same time?" queried one of the announcers.

Many Muslims are moved to tears by the ceremony. Meanwhile, some Syrian Muslims who joined the pilgrims tried to demonstrate against President Bashar al-Assad.

Saudi Arabian authorities swiftly dispersed the crowd, which had intended to protest against Assad.

"Tears came down my face thinking about kids, refugees and all those killed. I prayed for God to free Syria from the unjust regime that had us living under fear and panic for 40 years. We want the downfall of the regime and in its place a modern country built on equality," a tearful Syrian calling himself Mohammed told the Associated Press.

Muslim pilgrims pray after casting seven stones at a pillar that symbolises Satan during the annual Hajj pilgrimage on the second day of Eid al-Adha in MinaReuters
Tents of Muslim pilgrims pitched at the site where they cast stones at walls symbolising Satan as part of a Hajj pilgrimage rite, in Mina, near the holy city of MeccaReuters
Muslim pilgrims sleep along a street near where they will cast stones at a pillar that symbolises Satan, during the annual Hajj pilgrimage in Mina, near the holy city of MeccaReuters
Syrian Muslim pilgrim shouts slogans against Syria's President Bashar al-Assad during the annual Hajj pilgrimage in Mina, near the holy city of MeccaReuters
A Muslim pilgrim wearing a full-faced veil prays after casting seven stones at a pillar that symbolises Satan during the annual Hajj pilgrimage on the second day of Eid al-Adha in MinaReuters
A Muslim pilgrim in tears as he prays after casting seven stones at a pillar that symbolises Satan during the annual Hajj pilgrimage, on the second day of Eid al-Adha in MinaReuters
Muslim pilgrims pray after casting seven stones at a pillar that symbolises Satan during the annual Hajj pilgrimage, on the second day of Eid al-Adha in MinaReuters
Muslim pilgrims cast stones at walls symbolising Satan on the second day of Eid al-Adha in MinaReuters
An aerial view of the tents of Muslim pilgrims on the second day of Eid al-Adha in MinaReuters
Saudi police officers take their positions as Muslim pilgrims cast seven stones at a pillar that symbolises Satan, on the first day of Eid al-Adha in MinaReuters
A Muslim pilgrim has his head shaved after casting seven stones at a pillar that symbolises Satan, on the first day of Eid al-Adha in MinaReuters
A Muslim pilgrim prays after casting seven stones at a pillar that symbolises Satan, on the first day of Eid al-Adha in MinaReuters
A Muslim pilgrim prays after casting seven stones at a pillar that symbolises Satan during the annual Hajj pilgrimage, on the first day of Eid al-Adha in Mina, near the holy city of MeccaReuters