A suicide bomber blew himself up near the Grand Mosque in Mecca as police disrupted a plot to target the holiest site in Islam just as the fasting month of Ramadan ends, Saudi security forces said.
The Interior Ministry said it launched a raid in Jiddah province, as well as two areas in Mecca itself, including the Ajyad Al-Masafi neighborhood, located near the Grand Mosque.
There, police engaged in a shootout at a three-story house a suicide bomber, who blew himself up and led to the building's collapse.
He was killed while the blast wounded six foreigners and five members of security forces, according to the Interior Ministry's statement. Five others were arrested, including a woman, it said.
Saudi state television aired footage after the raid Friday near the Grand Mosque, showing police and rescue personnel running through the neighborhood's narrow streets. The blast demolished the building, its walls crushing a parked car as what appeared to be shrapnel and bullet holes peppered nearby structures.
The Interior Ministry "confirms that this terrorist network, whose terrorist plan was thwarted, violated, in what they would have perpetrated, all sanctities by targeting the security of the Grand Mosque, the holiest place on Earth."
The ministry did not name the group involved in the attack. The kingdom has battled an al-Qaeda insurgency for years and more recently has faced attacks from a local branch of the Islamic State group.
Neither group immediately claimed those arrested, though Islamic State sympathisers online have urged more attacks as an offensive in Iraq slowly squeezes the extremists out of Mosul and their de facto capital of Raqqa in Syria comes under daily bombing from a US-led coalition.
The disrupted attack comes at a sensitive time in Saudi Arabia as King Salman earlier this week short-circuited the kingdom's succession by making his son, Defense Minister Mohammed bin Salman, first in line to the throne.
The newly appointed crown prince, 31-years-old, is the architect of Saudi Arabia's war in Yemen against Shi'ite rebels, now stalemated. He has also offered aggressive comments about the kingdom confronting Shi'ite power Iran.