Pilgrims on Sunday performed the last major ritual of the hajj, the "stoning of the devil", in western Saudi Arabia as Muslims the world over celebrated the Eid al-Adha holiday.
As one of the world's largest annual religious gatherings wound down, Amman announced that at least 14 Jordanian pilgrims had succumbed to an "extreme heat wave", highlighting the acute physical toll of the annual rites which in recent years have fallen during the oven-like Saudi summer.
Beginning at dawn, the 1.8 million Muslims undertaking the pilgrimage this year threw seven stones at each of three concrete walls symbolising the devil in the Mina valley, located outside Islam's holiest city of Mecca.
The ritual commemorates 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.
Multiple stampedes have occurred in Mina over the years, most recently in 2015 when up to 2,300 worshippers were killed in the worst hajj disaster.
The site has been revamped since then to streamline the movement of the large crowds.
Roads leading to the concrete walls were nevertheless packed on Sunday, with some pilgrims struggling under the morning sun.
At least two pilgrims were seen lying on the side of the road, sheltered by buildings and cars.
"It's very difficult, we can't find transport. I can't get up anymore," said Ahmed Alsayed Omran, a 70-year-old Egyptian retiree sitting on the sidewalk.
Temperatures soared well above 40 degrees Celsius (104 degrees Fahrenheit) each day and on Saturday hit 46 degrees Celsius (114.8 degrees Fahrenheit) on Mount Arafat, where pilgrims performed hours of outdoor prayers.
Jordan's foreign ministry said on Sunday that in addition to the 14 Jordanian pilgrims who died "after suffering sun stroke due to the extreme heat wave", 17 others were "missing".
Iran reported the deaths of five pilgrims but did not specify the cause.
Saudi Arabia has not provided any information on fatalities.
During last year's hajj at least 240 people -- many from Indonesia -- died, according to figures announced by various countries which also did not specify causes of death.
There were also more than 10,000 cases of heat-related illnesses, 10 percent of which were heat stroke, a health ministry spokesman told AFP.
Worshippers did their best to take the taxing conditions in stride, seizing what for many was a once-in-a-lifetime chance to pray at Islam's holiest shrines.
"It's physically gruelling, but it's very spiritually charged. For me, I was sort of in awe at all times," said 49-year-old Canadian Neron Khan.
For part of the pilgrimage, "I was in some sort of heat exhaustion situation," she added.
"But I had to keep going because we were surrounded by everybody. And you just had to push through."
One treatment centre near Mount Arafat recorded 225 cases of heat stress and fatigue so far, the official Saudi Press Agency reported.
"It was very, very hot," Rohy Daiseca, a 60-year-old Gambian living in the United States, told AFP on Saturday night as pilgrims collected stones to throw.
"Alhamdulillah (praise be to God), I put a lot of water on my head and it was OK."
Amal Mahrouss, a 55-year-old woman from Egypt, said she was happy beyond words and the hajj showed "that we are all equal, that there are no differences between Muslims around the world."
One of the five pillars of Islam, the hajj must be performed at least once by all Muslims with the means.
This year's figure of 1.8 million pilgrims is similar to last year's, and Saudi authorities said on Saturday that 1.6 million of them came from abroad.
These included 17,500 Syrians, according to Badreddine Mansour, director of a Saudi agency specialising in pilgrimages.
For Syrians living in government-controlled areas, hajj has long been out of reach but the reintegration of President Bashar al-Assad's government into the Arab fold last year has enabled direct flights to the pilgrimage.
For Ghada Rifai, 60, a retired teacher from Damascus, this meant "a dream come true."
Sunday's stoning ritual coincided with the Muslim holiday of Eid al-Adha, or the feast of the sacrifice, which honours Abraham's willingness to sacrifice his son before God offered a sheep instead.
Worshippers typically slaughter a sheep and offer part of the meat to the needy.
The festivities were clouded by the war between Israel and Palestinian militant group Hamas in the Gaza Strip.
"We don't feel the Eid holiday because our brothers in Gaza are oppressed under the (Israeli) occupation," said Najem Nawwar, a 43-year-old Egyptian pilgrim.
But Saudi authorities warned no political slogans would be tolerated.
That did not stop many worshippers from voicing solidarity with Palestinians.
"We pray for them... and for the liberation of Palestine, so that we have two holidays instead of one," said Wadih Ali Khalifah, a 32-year-old Saudi pilgrim.