Saudi officials have said a foiled attack on the Grand Mosque in Mecca was carried out by foreign-backed terrorist hoping to destabilise the country.

No one has claimed responsibility for the planned atrocity, but reports in the Middle East have said ISIS or one of its affiliates are thought to be behind it.

On Friday a suspect blew himself up in a house where he was hiding during a gunfight, and a further five were arrested by security services.

Scroll down for video

Saudi security forces foiled a terror plot targeting the Grand Mosque in the Muslim holy city of Mecca, exchanging gunfire with suspects

ISIS leader Abu Bakr al-Baghdadi - who Russia has said was killed in an airstrike in Syria last month - has previously called for attacks against Saudi Arabia

ISIS leader Abu Bakr al-Baghdadi - who Russia believes was killed in an airstrike in Syria last month - has previously called for attacks against Saudi Arabia, which has been battling the group alongside the US.

The terror group has previously been quick in claiming responsibility for attacks around the world.

The Interior Ministry added that the attack on the mosque was being planned by three terrorist groups, two based in Mecca and a third in Jeddah.

A statement released to state television stopped short of naming ISIS as the group behind it, but said the attack was planned to cause chaos.

It said: 'They obeyed their evil and corrupt selves serving schemes managed from abroad whose aim is to destabilize the security and stability of this blessed country.

'The security people, with the help of Almighty Allah, and then the unlimited support of the Custodian of the Two Holy Mosques and the Crown Prince, will be able to foil these criminal schemes and arrest those involved in them.'

Pictured: Saudi security forces on the ground after the shootout, during which a suspect blew himself up

Pictured: A still from a video broadcast on Saudi state television showing the evacuation of the wounded

The US Central Intelligence Agency said previous recent attacks in Saudi Arabia bore the hallmarks of ISIS.

Most of the targets in Saudi Arabia have been the Shiite minority and security forces, killing dozens of people.

The attack has been condemned by Saudi Arabia's allies, with UAE Foreign Minister Sheikh Abdullah bin Zayed Al Nahyan stating: 'This heinous crime exposes the extent of terrorism and the savagery of those terrorist groups, and no one in their right mind can justify or explain it.'

Two terror cells were identified in October after a plot to attack a World Cup qualifying match in Jeddah, and four Pakistani nationals were arrested.

And in July last three suicide attacks, in Medina, Jeddah and Qatif were attributed by the Saudi government to ISIS.

Five people, including a woman, were arrested in security operations in Mecca, Saudi Interior Ministry spokesman Mansour al-Turki said.

The Interior Ministry said an attack on the mosque was being planned by three terrorist groups, two based in Mecca and a third in Jeddah

One suspect blew himself up and a further five have been arrested, Saudi intelligence chiefs revealed

Al-Arabiya said a suicide bomber hiding in a house in the Ajyad al-Masafi neighborhood of Mecca opened fire on security forces and later blew himself up on the eve of Ramadan.

Five security forces members and six other people - the latter all foreigners - were injured in the attack.

The Grand Mosque houses Islam's holiest site, the cube-shaped Kaaba that Muslims pray towards five times a day. The holy month of Ramadan ends this evening.

Saudi Arabia's regional rival Iran has condemned a plot to target the Grand Mosque in Mecca.

The Grand Mosque houses Islam's holiest site, the cube-shaped Kaaba that Islam's followers pray toward five times a day

Iran's Foreign Ministry issued a statement Saturday quoting spokesman Bahram Ghasemi as saying 'terrorism is rampant and growing now across the whole world'.

He called on all nations to 'be cautious' and said that Iran is ready to help other countries in confronting militants.

Saudi state television has aired footage after the raid near the Grand Mosque in Mecca, showing police and rescue personnel running through the neighborhood's narrow streets where security forces confronted a suicide bomber.

The footage shows the blast demolished the building, its walls crushing a parked car.

What appeared to be shrapnel and bullet holes peppered nearby structures.

TERRORISTS INCREASINGLY TARGETING MUSLIMS MARKING THE END OF RAMADAN Muslims from around the world flock to Mecca annually for the end of the holy fasting month of Ramadan. Terrorist attacks targeting the thousands of Muslims who congregate in Saudi Arabia have intensified since 2014, including blasts at holy sites such as the Prophet's Mosque in Medina. A similar attack in July last year occurred when four security officers were killed and five others wounded in a suicide bombing outside the Prophet's Mosque. It was the third attack to hit that day - including blasts in Jeddah and Qatif. The blast targeted Muslims as they knelt in prayer - an attack which the US Central Intelligence Agency said was typical of ISIS. ISIS claimed responsibility for another attack at a mosque in the city of Abha in August 2015 where fifteen people were killed But attacks during Ramadan and targeting mosques are not exclusive to the Middle East. Muslim worshippers were attacked while leaving Finsbury Park Mosque in London, leaving one man dead and several injured. Advertisement

The likelihood that ISIS leader Abu Bakr al-Baghdadi has been killed is close to 100 percent, Interfax news agency quoted the head of the defence committee in Russia's upper parliamentary house as saying on Friday.

Russia's defence ministry said a week ago it believed it may have killed Baghdadi when one of its air strikes hit a gathering of senior Islamic State commanders on the outskirts of the Syrian city of Raqqa.

But armed groups fighting in the region and U.S. officials say they have no evidence that Baghdadi was killed, and many regional officials have said they are sceptical about the information from Moscow.

Committee head Viktor Ozerov was quoted as saying the defence ministry would not have released information about Baghdadi's death if it believed it could be later proved incorrect.

"I think this information is close to 100 percent," Interfax quoted Ozerov as saying. "The fact that Islamic State has still not shown him anywhere also adds to our confidence that al-Baghdadi has been killed."

Baghdadi has frequently been reported killed or wounded since he declared a caliphate from a mosque in Mosul in 2014, after leading his fighters on a sweep through northern Iraq.

His death would be one of the biggest blows yet to the jihadist group, which is trying to defend its shrinking territory in Syria and Iraq against forces backed by regional and global powers.

Read more: http://www.dailymail.co.uk/wires/reuters/article-4632152/Baghdadi-death-near-100-pct-certain-Interfax-quotes-Russian-senator.html#ixzz4kweXkx00 Follow us: @MailOnline on Twitter | DailyMail on Facebook