The agency said Saudi security forces were conducting an investigation into what it said was an imminent attack by three terrorist cells based in Mecca and in Jeddah.
Investigators are also trying to identify a suicide attacker who apparently planned to detonate a bomb inside the mosque. He set off the load when security forces had him cornered in a building in central Mecca late on Friday.
The explosion killed the bomber and caused the building to collapse, the outlet reported. Five officers and six foreigners were injured in the blast and taken to hospital.
Earlier, the Saudi Interior Ministry said that state security forces have detained five terror suspects, including a woman, over a failed plot to attack the Grand Mosque in the holy city of Mecca.
The UAE foreign minister, Abdullah bin Zayed bin Sultan Al Nahyan, on Saturday condemned the plot as a "horrible crime," saying it would only strengthen their resolve to fight terrorism. Bahrain, Kuwait and Egypt joined in the condemnations of the failed attack.