According to Saudi Arabia, at least 1,301 people died while doing the Hajj, the majority of them were unapproved pilgrims who traveled great distances in sweltering heat.
The trip this year happened to coincide with a heatwave, with highs of over 50C (122F).
According to the official Saudi news agency SPA, over 75% of the deceased lacked valid permission to be there and were walking in the open heat without sufficient shade.
Some of those who died were elderly or chronically ill, the agency added.
Health Minister Fahd Al-Jalajel said efforts had been made to raise awareness about the dangers of heat stress and how pilgrims could mitigate this.
Health facilities treated nearly half a million pilgrims, he said, and some were still in hospital for heat exhaustion.
"May Allah forgive and have mercy on the deceased. Our heartfelt condolences go to their families," he said.
Saudi Arabia has been criticised for not doing more to make the Hajj safer, especially for unregistered pilgrims who have no access to facilities such as air conditioned tents and official Hajj transport.
Temperatures in Mecca climbed as high as 51.8C, according to Saudi Arabia's national meteorological centre.
Countries across the world have been giving updates on the number of their citizens who died, but Saudi Arabia had not commented publicly on the deaths or provided an official toll until Sunday.
AFP news agency quoted an Arab diplomat as saying 658 Egyptians had died. Indonesia said more than 200 of its nationals lost their lives, while India gave a death toll of 98 people.
Pakistan, Malaysia, Jordan, Iran, Senegal, Sudan and Iraq's autonomous Kurdistan region have also confirmed deaths.
Hajj is the annual pilgrimage made by Muslims to the holy city of Mecca. All Muslims who are financially and physically able must complete the pilgrimage at least once in their lifetime.
About 1.8 million people took part this year, Saudi Arabia said.
The fallout from the number of deaths has been growing.
On Saturday, Egyptian Prime Minister Mostafa Madbouly stripped 16 tourism companies of their licences and referred their managers to prosecutors for enabling illegal pilgrimages to Mecca.
On Friday Jordan said it had detained several travel agents who facilitated the unofficial travel of Muslim pilgrims to Mecca. Meanwhile Tunisian President Kais Saied fired the minister of religious affairs.