Saudi Arabia's highest body of religious scholars has issued a stern ruling calling terrorism a "heinous crime" and saying perpetrators including Islamic State (IS) militants deserve punishment in line with Islamic law.
The Council of Senior Religious Scholars said in its fatwa, or religious edict, that it backs the kingdom's efforts to track down and punish followers of IS and al Qaida.
The clerics are appointed by the government and are seen as guardians of the kingdom's ultraconservative Wahhabi school of Islam.
The statement by the group of 21 scholars underpins the kingdom's broader efforts to deter citizens from joining extremist groups that want to bring down the Western-allied monarchy.
US secretary of state John Kerry travelled to Saudi Arabia last week and won support from the kingdom and other Arab allies to help fight IS militants who have seized large parts of Iraq and Syria. A state department official told reporters ahead of the visit that Mr Kerry planned to ask Middle East countries to encourage government-controlled media and members of the religious establishment to speak out against extremism.
The edict highlights the historically close relationship between the Wahhabi establishment in Saudi Arabia and the kingdom's rulers, and gives religious backing to the Saudi king's efforts to fight IS as part of an international coalition. The council is the only official authority in Saudi Arabia allowed to issue religious edicts concerning questions about how citizens should live their lives.
The council's condemnations extended to others the Saudi government opposes as well, including the Shiite Hawthi rebel group in Yemen and Saudi Hezbollah, a Shia militant movement that was engaged in attacks in the kingdom in the 1980s and 1990s. It also criticised what it called "crimes of terrorism practised by the Israeli occupation".
The scholars said authorities have to track down instigators of conflict and financiers of terrorism because they commit "one of the greatest sins" which is "disobeying the ruler". They said they support the government's decision to prohibit citizens from fighting in conflicts abroad.
Though the council did not recommend specific punishments, it is considered a religious sin and a criminal act in Saudi Arabia to rebel against the king, who oversees Islam's two holiest sites in Mecca and Medina.
To help back up its religious ruling, the council referred to words of the Prophet Muhammad, who warned against following those who want to divide the nation.
"This is a warning to the advocates of division, strife and sedition, and a warning to those who followed them from going too far in order to avoid the punishment of torment in this world and the hereafter," the statement said.
The scholars added that any Muslim who thinks jihad - or striving in the path of God - means joining a terrorist group "is ignorant and has gone astray".
The Saudi king earlier this year called on scholars to speak out more aggressively against terrorism. Shortly afterwards, the head of the council and grand mufti of Saudi Arabia, Sheik Abdul-Aziz Al-Sheik, described IS and al Qaida as Islam's top enemies.
All of the groups mentioned in the clerical statement were branded "terrorist" organisations by the Saudi government this year. Notably absent from the council's list is the Muslim Brotherhood, which Saudi authorities have outlawed and also branded as terrorist.