Saudi Arabia said on Saturday that only residents and citizens would be permitted to perform Hajj this year.
Pilgrim numbers will be limited to 60,000 because of the health threat posed by the Covid-19 pandemic.
The decision was taken in view of the global situation and the emergence of new mutations of the coronavirus, the Ministry of Hajj and Umrah said.
Only people between the ages of 18 and 65 who have received at least one dose of a Covid-19 vaccine at least 14 days prior and are free of chronic diseases will be allowed to perform Hajj this year, the ministry said.
The annual pilgrimage is expected to begin around July 17. Nearly 2.5 million pilgrims performed Hajj in 2019, the year before the pandemic began.
Saudi Arabia last year limited the Hajj to about 1,000 residents. Two thirds were foreign residents from among the 160 nationalities that would have normally been represented at the pilgrimage. The remaining third were Saudi security personnel and medical staff.
There were expectations that pilgrims from abroad would be allowed to take part this year after Saudi Arabia eased strict border controls, but the Hajj ministry said the global situation was still a concern.
"In light of what the whole world is witnessing with the coronavirus pandemic ... and the emergence of new variants, the relevant authorities have continued to monitor the global health situation," it said.
"Considering the large crowds that perform Hajj, spending long periods of time in multiple and specific places ... required the highest levels of health precautions."
The authorities reopened the Grand Mosque in Makkah last October for prayers and the Umrah pilgrimage, which can be performed throughout the year, but with stringent health controls to prevent the spread on infection.
Only 20,000 Umrah pilgrims are allowed each day. The number of worshippers for daily prayers will be capped at 60,000.
Saudi Arabia said those wishing to perform the Hajj would have to apply online. The authorities did not specify how many foreign residents would be among the 60,000 pilgrims.
Saudi Arabia has so far recorded more than 460,000 coronavirus infections, including 7,536 deaths.
The Health Ministry says it administered more than 15 million doses of Covid-19 vaccine among its population of more than 34 million.
Saudi Arabia said that it informed other countries of the decision not to allow pilgrims from abroad.
"There was great understanding," said the country's deputy Hajj minister, Abdulfattah bin Sulaiman Mashat.
"Arrangements for this were based on the kingdom's keenness on the pilgrims' health and the safety of their countries," he said.
Riyadh is speeding up a nationwide vaccination drive as it moves to revive tourism and host sports and entertainment events, pandemic-hit sectors that are a bedrock of the country's Vision 2030 programme.
It has approved the Pfizer-BioNTech, Moderna, Johnson & Johnson and AstraZeneca vaccines.
In May, only inoculated citizens were allowed to travel abroad, after Saudi Arabia lifted a ban on overseas trips introduced at the start of the pandemic.
The kingdom has also said that from August 1, vaccinations would be mandatory to enter government and private establishments, including education institutions and entertainment venues.
A similar rule will be introduced for those using public transport.