A suicide bomber has struck a mosque in Saudi Arabia used by interior ministry special forces in the south-western city of Abha, killing at least 13 people.

Ten of those killed were members of the security forces, an interior ministry statement said. The state-owned Al-Ekhbariya news channel earlier gave a higher death toll, reporting that 17 had been killed in the attack.

Nine other people were wounded in the attack, three of them seriously, said interior ministry spokesman Major General Mansour al-Turki.

He said initial findings point to the attack being carried out by a suicide bomber wearing an explosive vest.

The bomb targeted police trainees as they were in the middle of prayer, an official said. He could not immediately confirm if the mosque was inside an interior ministry compound.

State media reported that the mosque belongs to an interior ministry emergency services post in Abha, which is the provincial capital of Asir.

There was no immediate claim of responsibility but blame is likely to fall on Islamic State (IS), whose local affiliate has claimed responsibility for a number of attacks in recent months, including various deadly shootings and smaller attacks against police at checkpoints in the capital Riyadh.

Thursday's attack was the deadliest against Saudi security forces since IS attacks first appeared in the kingdom last year.

A suicide bomber that struck a Shiite mosque in the eastern village of al-Qudeeh in May killed 22 people.

That was the deadliest militant assault in the kingdom in more than a decade, and was followed a week later by another suicide bombing outside another eastern Shiite mosque that left four dead.

In November, a gunman opened fire at a mosque in the eastern Saudi village of al-Ahsa, killing eight.

Saudi authorities last month announced the arrest of more than 400 suspects in an anti-terrorism sweep. They said at the time that they had thwarted other IS attacks being plotted in the oil-rich kingdom, including a suicide bomb plot targeting a large mosque in eastern Saudi Arabia that can hold 3,000 worshippers, and attempts to attack other mosques, diplomatic missions and security bodies.

Saudi Arabia is also leading a coalition targeting Iran-allied Shiite rebels in neighboring Yemen, not far from Abha. The rebels have carried out a number of cross-border attacks against military targets.