The 12-day "Northern Thunder" manoeuvres in the kingdom's northeast included 20 nations from the Middle East, Africa and Asia, Saudi officials said.
Saudi Arabia's King Salman was joined by several foreign leaders for the final day of the exercise, which came as Riyadh vies to assert its leadership in the region.
Among them were Egypt's President Abdel Fattah al-Sisi, Sudan's Omar al-Bashir, Yemen's Abedrabbo Mansour Hadi and Pakistani Prime Minister Nawaz Sharif.
As the dignitaries watched from a pavilion, Apache gunships fired rockets with a bone-shaking blast. Smoke rose from targets on the ground and commandos rappelled from helicopters.
Fighter jets streaked through the sky releasing orange flares, artillery shells whistled through the air and heavy machinegun fire boomed from across the drill site, which stretched for dozens of kilometres (miles).
The exercises took place near Hafr al-Batin city, close to the Kuwaiti and Iraq borders.
Saudi Arabia's chief of staff, General Abdulrahman al-Bunyan, commanded the exercise and called it "the largest Arab and Islamic military gathering" in the region.
Riyadh has adopted a more assertive foreign policy since Salman took the throne early last year following the death of his half-brother king Abdullah.
It leads a coalition fighting rebels in Yemen, participates in US-led air strikes against the Islamic State group and has offered to send special forces to fight IS in Syria.
"Northern Thunder" also took place after tensions escalated between Sunni-dominated Saudi Arabia and its regional Shiite rival Iran, which back opposing sides in Syria and Yemen.
Signup to our newsletter and follow us on Facebook and Twitter!
Riyadh cut diplomatic ties with Tehran earlier this year after mobs ransacked Saudi diplomatic missions in Iran following the execution of a prominent Saudi Shiite cleric.
Saudi Brigadier General Ahmed al-Assiri told reporters this week the exercises were preparation to tackle the region's "terrorist menace" and were not directed against Iran.
Assiri said the manoeuvres are distinct from a 35-nation coalition to fight "terrorism" which Saudi Arabia announced in December.
Officials have said the new coalition would gather in the kingdom this month for its first publicly announced meeting.
Authorities released no figures for the number of troops taking part from each country in Northern Thunder.
An AFP reporter saw Pakistani, Egyptian, Kuwaiti and Sudanese troops alongside Saudis.
A foreign military source told AFP he did not think Northern Thunder was directed at Syria "or anything else" but was a chance to practise working together.
The source said Saudi troops were "honing their skills and their operability with other nations."
Northern Thunder's official Twitter account said the exercises aimed to "confront all the threat scenarios in the region".
According to the International Institute of Strategic Studies, Saudi Arabia has the best equipped military of Gulf countries, with an army of 75,000 troops and 313 combat-capable aircraft.