Those coming from outside Saudi Arabia were required to submit a negative Covid-19 PCR result from a test taken within 72 hours of travel.
Since the start of the pandemic, Saudi Arabia has registered more than 795,000 coronavirus cases, more than 9,000 of them fatal.
Those attempting to perform the hajj without a permit face fines of 10,000 Saudi riyals (around $2,600).
Policemen in the mountainous city have set up checkpoints and conducted foot patrols.
Some pilgrims have donned clothing featuring the names and flags of their countries. "Hajj 2020 -- Chad" was written on the back of the white robes of one group.
Hosting the hajj is a matter of prestige and a powerful source of political legitimacy for Saudi Arabia's rulers.
Costing at least $5,000 per person, the hajj is also a money-spinner for the world's biggest oil exporter, which is trying to diversify its economy.
In normal years, the pilgrimage brings in billions of dollars.
These days it represents a chance to showcase the kingdom's ongoing social transformation, despite persistent complaints about human rights abuses and limits on personal freedoms.
Saudi Arabia now allows women to attend the hajj unaccompanied by male relatives, a requirement that was dropped last year.