Saudi Arabia said on Saturday that security forces had cleared hundreds of thousands of unregistered pilgrims from Mecca ahead of the hajj which begins next week.
Crowd management is a major concern during the annual pilgrimage, one of the five pillars of Islam which drew more than 1.8 million Muslims last year, according to official figures.
Those turned away in recent days from the holy city, home to the Grand Mosque, include 153,998 foreigners who travelled from abroad on tourist visas rather than the required hajj visas, the official Saudi Press Agency said.
In addition Saudi authorities have rounded up 171,587 others who are based in Saudi Arabia but are not residents of Makkah and did not have hajj permits, SPA said.
The hajj, which begins on June 14, must be undertaken at least once by all Muslims with the means.
It involves a series of rituals completed over at least four days in Makkah and its surroundings in the west of Saudi Arabia.
Many seek to complete the rites through unofficial channels as obtaining the formal permits and travel packages can be extremely costly, with limited quotas for pilgrims from each country.
Saudi Arabia is home to the holiest shrines in Islam at Makkah and Madinah, and the Gulf kingdom makes billions of dollars each year from the hajj and from pilgrimages, known as umrah, undertaken at other times of the year.
The pilgrimages are also a source of prestige for the Saudi monarch whose official title includes “Custodian of the Two Holy Mosques” in Makkah and Medina.
Large crowds have proved hazardous in the past during the hajj, most recently in 2015 when a stampede during the “stoning the devil” ritual in Mina, near Makkah, killed up to 2,300 people in the deadliest-ever hajj disaster.
Fears of a repeat have spurred Saudi officials to crack down on off-the-books pilgrims.
More than 1.3 million registered pilgrims had arrived in Saudi Arabia for the hajj as of Saturday, Makkah regional authorities said on X.