As helicopters hovered in the sky above a seemingly endless number of soldiers marching in unison, it looked like Saudi Arabia was bracing itself for war.
It was in fact a show of readiness to host its most important event of the year, the Hajj.
The kingdom often talks up its military prowess, but even by its own standards, the parade in Mecca was huge.
Nearly two million pilgrims from across the globe come here every year for the Hajj.
The season lasts for nearly six days, but last year it was disastrous. Hundreds, possibly thousands, of people - many of them Iranian - were killed in a crush on the third day. It was the deadliest accident at the Hajj in more than two decades.
Iran is not sending any pilgrims this year, after Tehran and Riyadh failed to reach agreement over Hajj arrangements amid a diplomatic row.
Iran believes the Saudis are not doing enough to guarantee the safety of the pilgrims, while the Saudis say Iran wants special rights.
"Iranians want to politicise the Hajj," said Saudi interior ministry spokesman Mansour Turki. "They want to organise protests. We won't allow them to spoil the religious ritual. This is why they are criticising us."
The route to the Grand Mosque in Mecca, site of Islam's holiest place, the Kaaba, is punctuated by security checkpoints.
As we passed through one after another, officers thoroughly checked our IDs and filming kit.
A couple of miles away from the Grand Mosque, roadblocks have been set up and vehicles are banned, with only pedestrians allowed.
The police presence is heavy, with teams of officers organising the swelling crowds and trying to prevent chaos.
"I think security is fantastic," a middle-aged male pilgrim says, "but given the huge numbers of people here, accidents can always happen.
"Crowds can get out of control. But I am still very happy being here."
But other pilgrims are worried. "I am afraid of a possible stampede," said a woman from Algeria. "I hope the Hajj goes smoothly. I don't want to see a repetition of what happened last year."
In the wake of the crush, officials struggled to identify some of the victims. To avoid a similar situation, Saudi Arabia has developed electronic bracelets, which have been issued to all pilgrims.
Each bracelet has a barcode and can be connected to a smartphone via an app called Hajj Bracelet.
"If you open the app, focus it on the barcode written on the bracelet, you will instantly get all the personal details of each pilgrim, including his/her photo, name, age, nationality etcetera," Eissa Rawas, of the Saudi Ministry of Hajj, explained.
"This new technology helps a lot when a pilgrim is hurt or lost," he said.
The Saudis are using all their logistical capabilities to try to ensure this year's Hajj passes without incident.
But with millions of pilgrims performing their rituals in a limited time and space, the risk of mishap remains high.