In the early morning of 20 November 1979, the imam of the Grand Mosque was preparing to lead the prayers for the fifty thousand worshipers who had gathered for prayer
Around 5:00 am, he was interrupted by insurgents who procured weapons from under their robes, chained the gates shut and killed two policemen.
The insurgents released most of the hostages and locked the remainder in the sanctuary. They took defensive positions in the upper levels of the mosque, and sniper positions in the minarets, from which they commanded the grounds.
The dissidents declared that the Mahdi had arrived in the form of one of their leaders, Mohammed Abdullah al-Qahtani, and called on Muslims to obey him.
The seizure was led by Juhayman al-Otaybi who declared his brother-in-law Mohammed Abdullah al-Qahtani to be the Mahdi.
Otaybi was a preacher, a former corporal in the Saudi National Guard, and a former student of Sheikh Abdel Aziz bin Baaz, who went onto become the Grand Mufti of Saudi Arabia.
al-Otaybi had turned against bin Baz and began advocating a return to the original ways of Islam, a repudiation of the West, an end to education of women, the abolition of television and the expulsion of non-Muslims.
He proclaimed that the ruling Al Saud dynasty had lost its legitimacy because it was corrupt, ostentatious and had destroyed Saudi culture by an aggressive policy of Westernization.
The seizure shocked the Islamic world as hundreds of pilgrims present for the annual hajj were taken hostage, and hundreds of militants, security forces and hostages caught in crossfire were killed in the ensuing battles for control of the site.
An elite Pakistani unit called “Rahbar” was rushed to Mecca, under command of General Pervez Musharraf (then a Major) from Pakistan on Saudi Government’s request.
In the middle of the day, Saudi troops abseiled from helicopters directly into the central courtyard of the mosque but were picked off by insurgents.
After failure of this exercise, Pakistani commandos split/showered water all over the Grand Masjid floors even in minarets.
Pakistani Army Commandos then released electric current in the water. The insurgents suspended their activities and start changing their positions to save themselves from the electric shocks
Saudi also brought in the help of French special forces who pumped posion gas in the basement, flushing remaining rebels.
During this time Pakistani Army Commandos were dropped by helicopters into the Grand Masjid in different locations and they easily captured many of the insurgents alive.
The siege ended two weeks after the takeover began with militants and the mosque cleared.
The battle had lasted for more than two weeks, and had officially left “255 pilgrims, troops and fanatics” killed and “another 560 injured … although diplomats suggested the toll was higher.” Military casualties were 127 dead and 451 injured.
The rebels’ leader, Juhayman, was captured, and he and 67 of his fellow rebels – “all the surviving males” – were tried secretly, convicted and publicly beheaded in the squares of four Saudi cities.
The executions were decreed by King Khalid after the edict issued by ulema.