At least 13 people were killed in Saudi Arabia on Tuesday when a suicide bomber targeted a mosque in the Asir region that was housing local security forces.

The Islamic State group later claimed responsibility for the attack. An Is affiliate called "al-Hijaz Province" circulated a statement on Twitter hours after the attack saying that one of its members detonated an explosive vest inside the mosque in the southern city of Abha.

A spokesperson for the Interior Ministry, in a statement carried by the official Saudi Press Agency, said nine other people were also wounded and that three of them were in serious condition. He identified three of those killed as "workers" in the mosque used by members of a Special Weapons and Tactics (SWAT) domestic security unit in Abha, in the southern province of Asir. "The terrorist attack struck worshippers during prayer. Ten policemen and three workers were killed while nine were wounded, three seriously," the spokesperson said. Suicide bomber disguised as cleaner kills 17 at mosque in southern #Saudi city, Asir during Dhuhr prayer#تفجير_عسير pic.twitter.com/VWL2exA28l — Mohammed Khalid Alyahya (@7yhy) August 6, 2015

The bomber was disguised as a cleaner in order to gain access to the mosque and once inside detonated a suicide belt among the security forces who were praying at the time, a source in the kingdom told Middle East Eye, on condition of anonymity.

Asir is in the south-west of the country and is close to the country's border with Yemen, where Saudi Arabia is currently engaged in a war to push back Houthi militiamen and reinstall the exiled president.

After the attack, local residents answered a call to donate blood by flocking to hospitals.