RIYADH, Aug 28 (Reuters) - Saudi Arabia's Grand Mufti urged young people on Thursday to ignore calls to jihad from people representing "deviant principles", the latest salvo in an anti-militant campaign by the kingdom's religious establishment.

Riyadh, the world's No. 1 oil exporter, is unnerved by the rapid advance in Iraq and Syria of Islamic State insurgents and fears this could radicalise some of its own citizens and eventually lead to attacks on the U.S.-allied government.

The word "deviant" is usually used in official and religious Saudi circles to refer to the Islamist militant ideology followed by al Qaeda, of which Islamic State is an offshoot.

Sheikh Abdulaziz Al al-Sheikh, the highest religious authority in the country, this month described the creed of al Qaeda and Islamic State as Islam's "enemy number one", a message echoed in Friday sermons across the country.

Riyadh is among the main backers of mostly Sunni Muslim rebels, although not Islamic State, fighting President Bashar al-Assad of Syria. While Saudi clergy have backed the rebels' campaign as a jihad on the part of the Syrian people, they have said it is not a jihad for Saudis.

In 2003-06, Saudi al Qaeda militants who had fought in Iraq and Afghanistan returned to the kingdom and assaulted foreign and government targets. Hundreds of them have since been sentenced to prison including 23 on Wednesday.

In February King Abdullah decreed long prison terms for anybody who travelled overseas to fight.

On Monday Saudi authorities detained eight men they accused of helping others go to Syria to fight. On Thursday the daily Saudi Gazette reported that these included two imams of mosques in the small town of Tumair, north of Riyadh.

Saudi Arabia follows the ultra-conservative Wahhabi school of Sunni Islam, but while many of its views on public morality, Islamic law and religious heresy resemble those of Islamist militants, it differs from them in its political doctrine.

The Wahhabi clergy, whose most important members enjoy senior state positions and oversee a lavish religious infrastructure, believe that politics, foreign policy and declarations of jihad should be determined by the king.

In the past decade Saudi authorities have imprisoned a small number of clerics who backed al Qaeda, have sacked hundreds more for sermons seen as backing militant ideology and restricted the power to issue fatwas (religious edicts) to a few top clergy.

(Reporting by Angus McDowall; Editing by Mark Heinrich)

Our Standards: The Thomson Reuters Trust Principles.