Millions of pilgrims took part in the final rites of Hajj in Saudi Arabia, as Muslims around the world marked the start of Eid al-Adha on Sunday.

Nearly 2.5 million white-clad worshippers performed a “stoning of the devil” on Sunday, casting pebbles at three walls in a ritual that will continue for several days.

Hajj is one of the largest religious gatherings on Earth and sees Muslims journey to Mecca to follow in the steps of the Prophet Mohammed in a five-day pilgrimage.

Saudi Arabia said 1.85 million pilgrims from 180 different countries joined more than 600,000 Saudi residents in the journey this year, including 200 survivors and relatives of the victims in New Zealand’s mosque attack paid for by Saudi King Salman.

The annual event reached its climax on Saturday as many pilgrims walked through pre-dawn darkness to gather on the slopes of Mount Arafat, where the Prophet Mohammed delivered his final sermon 1,400 years ago.

Hajj: Millions of pilgrims descend on Mecca Show all 12 1 /12 Hajj: Millions of pilgrims descend on Mecca Hajj: Millions of pilgrims descend on Mecca Hajj 12 Mulism pilgrims perform the "Tawaf al-Ifada", a mandatory circumambulation around the Kaaba, Islam's holiest shrine, prior to the start of the annual Hajj pilgrimage at the Grand Mosque in Saudi Arabia's holy city of Mecca. Fethi Belaid/AFP/Getty Images Hajj: Millions of pilgrims descend on Mecca Hajj 11 Muslim pilgrims perform the "Tawaf al-Ifada", a mandatory circumambulation around the Kaaba (the Cube), Islam's holiest shrine, at the start of the annual Hajj pilgrimage at the Grand Mosque in Saudi Arabia's holy city of Mecca on August 11, 2019, following their descent from Mount Arafat. AFP/Getty Hajj: Millions of pilgrims descend on Mecca Hajj 2 Muslim pilgrims rest during the Hajj pilgrimage in the Mount Arafat near Mecca. EPA Hajj: Millions of pilgrims descend on Mecca Hajj 1 A Muslim pilgrim stands under the rain near Mount Arafat, also known as Jabal al-Rahma (Mount of Mercy), southeast of the Saudi holy city of Mecca, as the climax of the Hajj pilgrimage approaches on August 10, 2019. Fethi Belaid/AFP/Getty Images Hajj: Millions of pilgrims descend on Mecca Hajj 3 Muslim Hajj pilgrims pray during the Hajj pilgrimage to Mount Arafat near Mecca. EPA Hajj: Millions of pilgrims descend on Mecca Hajj 4 Muslim pilgrims pray at Mount Arafat. Fethi Belaid/AFP/Getty Images Hajj: Millions of pilgrims descend on Mecca Hajj 6 Muslim pilgrims walk to take part in the symbolic stoning of the devil, the last rite of the annual hajj, and the first day of Eid al-Adha, in Mina. Amr Nabil/AP Photo Hajj: Millions of pilgrims descend on Mecca Hajj 7 This picture taken on August 11, 2019 shows a panoramic view of some of the dwellings of Muslim pilgrims during the annual Hajj pilgrimage, in Mina. Fethi Belaid/AFP/Getty Images Hajj: Millions of pilgrims descend on Mecca Hajj 5 A Muslim pilgrims casts stones at a pillar in the symbolic stoning of the devil, the last rite of the annual hajj, and the first day of Eid al-Adha, in Mina. Amr Nabil/AP Photo Hajj: Millions of pilgrims descend on Mecca Hajj 8 Muslim worshippers throw pebbles as part of the symbolic al-A'qabah (stoning of the devil ritual) at the Jamarat Bridge during the Hajj pilgrimage in Mina. Fethi Belaid/AFP/Getty Images Hajj: Millions of pilgrims descend on Mecca Hajj 9 Muslim pilgrims have their heads shaven by barbers upon leaving Muzdalifah after throwing pebbles as part on the symbolic al-Aqabah. Fethi Belaid/AFP/Getty Images Hajj: Millions of pilgrims descend on Mecca Hajj 10 Muslim pilgrims have their heads shaven by barbers. Fethi Belaid/AFP/Getty Images

Muslims believe the location of Sunday’s ritual in the tent city of Mina is where Abraham’s faith was tested when commanded to sacrifice his only son Ismail, but it has proven to be the deadliest part of the pilgrimage and in 2015 was the site of a stampede that left 2,500 dead.

The rite marks the beginning of the Islamic holiday Eid-al-Adha, which translates as “festival of the sacrifice”.

After casting their stones, worshippers in Mecca will echo the story of Abraham with a sacrificial slaughter, or pay for it to be done in their names, along with millions of others in cities around the world.

The meat of goats, sheep and cows is traditionally distributed among neighbours, family and the poor during the celebration.

In one Bangladeshi city alone, 4,000 cleaners have been employed to clear leftover blood and animal waste from the streets, local media reported.

In the UK, Sadiq Khan and Boris Johnson wished worshippers a happy Eid.

“The story of Eid al-Adha is one of sacrifice, about doing your duty and doing what’s right,” said the prime minister. “And that is something we see daily from Muslims right across the UK – men and women who, in all kinds of different ways, make such a huge contribution to modern British life.”

Celebrations were impeded elsewhere in the world. In East Asia, more than a million Muslims are reportedly interned in camps in China's Xinjiang province.

Rohingya Muslims suffer persecution in Myanmar, more than 700,000 of whom have fled to the world's largest refugee camp in Bangladesh.

Fourteen Muslim worshippers were injured in a clash with Israeli police during prayers at the Al-Aqsa mosque in Jerusalem, Palestinian medics said. Tens of thousands had made their way to the holy site.

Police unleashed tear gas and stun grenades upon worshippers in the worst bout of fighting seen in months at the highly contested site.

In Kashmir, the 24-hour curfew imposed by India’s prime minister Narendra Modi was slightly relaxed, allowing the Muslim-majority region to use cash machines and visit food stores.

Phones and internet reportedly remained inaccessible on Sunday.

The arrival of Eid al Adhr marks the winding down of hajj.

To mark the completion of the hajj, male pilgrims will shave their hair and women trim theirs to represent a spiritual renewal and rebirth.

Before heading home, they will return to perform a final circulation of the Kaaba in Mecca’s Great Mosque.

Performing the final rites of hajj in Mina, Mohammed Saleh told the Associated Press: “I came from Sudan to Mecca where I performed the pilgrimage. We hope all pilgrims will be successful in their hajj.”