Chanting "God is great," millions of Muslims on Sunday stoned pillars representing the devil in a symbolic rejection of temptation on the second day of their annual hajj pilgrimage, a day that also marks the start of the Islamic holiday of Eid al-Adha.

Vast crowds cast pebbles as they flowed past the three pillars, which now resemble curved walls, in a four-level sprawling concrete structure built to expedite the flow of pilgrims. The ritual will be repeated for two more days, with participants eventually throwing stones at all three pillars.

The ritual in the desert valley of Mina commemorates Abraham's stoning of the devil, who is said to have appeared three times to the prophet to tempt him.

It is one of the most dangerous stages of the hajj, with the press of people around the pillars creating the risk of a stampede. In 2004, 244 people were killed, and the following year at least 360 others were killed when several pilgrims tripped over baggage while others behind them kept pushing ahead. Saudi authorities subsequently built the current complex to reduce the stampede danger.

Saudi authorities said Sunday that more than 2.9 million Muslims were performing the hajj this year.

Male pilgrims in the two-piece seamless white robes worn during the hajj, and women covered head to foot except for their hands and faces, chanted "God is great" while casting the pebbles.

"Hurry up, pilgrims," Saudi security officers called out through loudspeakers, to prevent crowds from building up next to the pillars.

Afterward, pilgrims shaved their heads or clipped off a lock of hair, a tradition dating back to the Prophet Muhammad's own pilgrimage. They are also required to slaughter a lamb or goat, representing the lamb that Abraham sacrificed in the place of his son Ishmael, although pilgrims may arrange for this to be done in a different location or in their own countries.

Sunday also marks the start of Eid al-Adha in remembrance of Abraham's near-sacrifice of his son.

"Thank God that we are doing hajj this year. May God protect all Arab and Islamic countries," said Dina Mohammed Ramadhan, a 27-year old pilgrim from Egypt, as she emerged from the crowed with her husband pushing her two babies in a carriage.

The five-day pilgrimage is packed with symbolism and ritual aimed at cleansing the soul of sin and winning absolution by tracing the footsteps of the Prophet Muhammad and of Abraham, whom Muslims view as a forefather of Islam.