Six foreign pilgrims were hurt on Friday in Saudi Arabia when a suicide bomber targeting Islam's holiest site of Mecca blew himself up, the Interior Ministry said.
The incident happened around the Grand Mosque, where hundreds of thousands of worshippers gathered for early afternoon prayers on the last Friday of this year's Ramadan, the Muslim fasting month.
Saudi security forces thwarted the plot to attack the Grand Mosque in Makkah, home to the holiest site in Islam, exchanging gunfire with one of the suspects who blew himself up inside a home, the interior ministry said today.
The ministry described the plot as part of "self-serving schemes managed from abroad".
It said it launched raids in Jeddah as well as two areas in Makkah itself, including the Ajyad Al-Masafi neighbourhood, located near the Grand Mosque.
Five people, including a woman, were arrested in security operations in Makkah, the Saudi-owned Al-Arabiya news website said, citing interior ministry security spokesman Mansour al-Turki.
Five security force members and six other people ministry spokesman General Mansour al-Turki told Saudi television that police "foiled the terrorist plan that targeted the security of the Grand Mosque, pilgrims and worshippers."
In dawn raids on Mecca and the Red Sea city of Jeddah officers arrested five suspects, including a woman, before surrounding the bomber's location around the Grand Mosque.
"Unfortunately he started shooting towards security personnel once he noticed their presence in the area, which led to an exchange of fire before he blew himself up," Turki said.
The blast partially collapsed the building where he had taken refuge, injuring the six pilgrims, Turki said.
He added that four had already been released from hospital, and five security men were also slightly hurt.
Both Iran and Qatar, with strained ties with Saudi Arabia, were quick to condemn the attack and offer help and support.
Since late 2014, Saudi Arabia has faced periodic bombings and shootings claimed by Islamic State or ISIS.
Purported images from the scene that circulated on social media showed an alley filled with bricks and other debris apparently from a blast.
Video showed what appeared to be a bearded man's head lying among rubble from a collapsed structure.
Near the end of Ramadan last year in the Saudi city of Medina four security officers died in an explosion close to Islam's second holiest site, the Prophet's Mosque.
It was one of three suicide blasts around the kingdom on the same day, in which a total of seven people were believed killed. The others occurred in Jeddah and in the Gulf city of Qatif. The US Central Intelligence Agency said those attacks bore the hallmarks of ISIS.
Most of the targets in Saudi Arabia have been the Shiite minority and security forces, killing dozens of people.
Since July last year police have arrested around 40 people, including Saudis and Pakistanis, for alleged extremist links.
Saudi Arabia's counter-terrorism capabilities - which for years were led by Prince Mohammed bin Nayef - are well-regarded internationally.
On Wednesday Prince Mohammed was ousted from his posts of crown prince and interior minister, replaced as heir to the throne by King Salman's son Mohammed bin Salman.
Friday's counter-terrorist operation was the first to take place under the new interior minister, Prince Abdulaziz bin Saud bin Nayef, who is in his early 30s. Prince Abdulaziz is the nephew of the deposed minister.