Saudi security forces foiled an attack on the Grand Mosque in the Muslim holy city of Mecca on Friday, state television Al-Ekhbariya and Al Arabiya TV reported.

Saudi Arabia's Interior Ministry said a suicide bomber who was planning an attack on the Grand Mosque in Mecca blew himself up on Friday when security forces surrounded a house where he was hiding.

The ministry said, in a statement read on Saudi-owned Al Arabiya television, that security forces had also detained five other militants, including one woman.

Earlier, Al Arabiya said security forces had found two groups of terrorists in Mecca and a third group in the city of Jeddah. The foiled attack targetted worshipers at the mosque, it said.