"Extremism, which has generated terrorism, behoves us to combine our efforts to fight it and defeat it because it has nothing to do with Islam," the king said in an annual address to leaders of delegations from Islamic nations which performed the annual hajj pilgrimage, the official SPA news agency reported.
Saudi Arabia and four other Arab countries have joined an American-led coalition which is conducting air strikes against Islamic State group rebel positions in Syria.
Extremism "is a perverse factor which we can only remedy by eradicating", the king said in an address delivered by Crown Prince Salman bin Abdul Aziz, who also holds the defence portfolio.
"And we are engaged in eradicating it unwaveringly and with determination," he said to an audience which included presidents and other senior officials of Islamic nations.
Also Read
He said young people must be protected from extremist ideas.
Saudi authorities have long feared blowback from jihadist groups, particularly after Al-Qaeda attacks in the kingdom from 2003 to 2006.
The ultra-conservative Wahhabi Islamic tradition is predominant in Saudi Arabia, where it applies to both religious and political life.
The royal address occurred in Mina, where two million Muslim pilgrims from around the world engaged in a ritualised stoning of the devil on Sunday, the second-last day of the annual hajj.