Saudi Arabian authorities on Friday said they had thwarted a major attack on the Grand Mosque in the holy city of Mecca. A statement issued by the Interior Ministry said a suicide bomber detonated explosives after he was cornered by security personnel in a building, Saudi-based Al Arabiya reported. The explosion, which resulted in a building collapse, hurt six foreign nationals and five security officials, Reuters reported.

The statement said three groups had planned the attack on the holy site, which draws millions of devotees during the holy month of Ramadan. Two of the groups were based in Mecca and the third in Jeddah, Al Arabiya reported.

No group has claimed responsibility for the incident. Officials have arrested five of the accused, the statement said. The suicide bomber was traced down in the city’s Assila district, while a second attack was “foiled in Ajyad al-Masafi neighborhood”, Al Arabiya said.

The Islamic State group has targeted the kingdom with attacks in the past.