Official figures show 1.5 million worshippers arrived from abroad alone ahead of the start of the annual pilgrimage on Monday.
After circling the Kaaba, the stone cube-shaped holy building inside the Grand Mosque in Mecca, pilgrims headed to the nearby Mina valley, some eight kilometres away, where they will spend the night in a massive tent city.
On the second day, they head to Mount Arafat, about 20 kilometres east of Mecca, where they stay until sunset in what is considered the peak of the Hajj pilgrimage.
Saudi Arabia has been attacked with hundreds of drones and missiles in the course of the three-month war in Iran.
Air defences intercepted most of them, but there were also some casualties and damage to energy infrastructure and residential areas.
Saudi Arabia's Ministry of Defence released footage showing air defence units being deployed to protect the religious sites around Mecca.
The armed forces are responsible for "protecting the airspace over the holy sites and responding to all threats to ensure the safety and peace of mind of the pilgrims," the ministry stated.
For most Muslims, taking part in the Hajj is a once-in-a-lifetime experience.
Many save for years to be able to afford the journey and Hajj packages from specialist tour operators. Per person, these can easily cost the equivalent of $US5,800 ($A8,000).
Airfares have risen significantly as a result of the Iran war, with airlines sharply increasing their surcharges for aviation fuel.
Temperatures of up to 45 degrees Celsius were expected in Mecca on Monday. Two years ago, more than 1300 people lost their lives in the extreme heat.