Saudi Arabia is intensifying its high-profile crackdown on extremists against a background of growing alarm about jihadis in Iraq and Syria. it announced the arrest of 88 people, days after an imam was jailed for glorifying al-Qaida and the leader of Islamic State (Isis).

Scores of alleged militants have been imprisoned in recent weeks as the authorities have condemned Isis and warned, as King Abdullah told foreign envoys at the weekend, that terrorism needs to be fought "with force, reason and speed".

The government in Riyadh is rattled by the advances made by the jihadis and embarrassed by the fact Saudi nationals are estimated to make up the second biggest contingent of Arab foreign fighters in the ranks of the organisation, about 2,500 compared to 3,000 from Tunisia.

The Saudi interior ministry said it had arrested 88 people accused of preparing attacks at home and abroad. Three were Yemenis, one of unknown nationality and the remainder Saudis. Of those, 59 had previously been detained for membership of a "deviant group" – the usual term for al-Qaida. All had been under surveillance before being detained in the last few days, Al-Arabiya TV reported.

Saudi media are reporting almost daily on the discovery of signs of support for Isis – most recently in slogans scrawled on the walls of schools in the al-Naseem neighbourhood of Riyadh.

Having in effect defeated al-Qaida in a concerted anti-terrorist campaign in 2004, the government fears the consequences of fighters returning from the battlefields of Syria and Iraq and the enthusiasm they command at home.

It rejects accusations that it is responsible for creating the group because of Saudi promotion of fundamentalist doctrine and anti-Shia sectarianism over many decades. But the Saudis, Qataris and other Gulf states played a key role in backing Islamist brigades fighting to overthrow Syria's president, Bashar al-Assad, some of which later morphed into Isis.

"Isis could not have come about without the Gulf states turning a blind eye to funding," said Toby Matthiesen, a Gulf expert at the University of Cambridge. "It's this ad hoc mentality where they do something and don't think of the consequences. They felt they occupied the moral high ground. They wanted Assad to go but now are confronted with people who want to take over Mecca and Medina on the basis of Salafi Wahhabi ideology. Monarchs don't fit into that. Potentially there are a lot of Isis supporters in Saudi. It is a really tricky situation for them. And they are under heavy pressure from the west to show they are fighting Isis."

The anti-Isis campaign is also being pursued diplomatically, with the Saudis urging allies to shore up those threatened. Crown Prince Salman, the defence minister, was in Paris on Monday, seeking $3bn (£1.8bn) worth of weapons to help Lebanon's army fight a growing threat from jihadis in Syria.

The Saudi government now bans its citizens from fighting abroad, donating money or sympathising with militant ideologies. Last week the grand mufti urged young people to ignore calls to jihad from people representing deviant principles.

On Monday 17 men in Saudi Arabia were sentenced to jail terms ranging from two and a half years to 26 for following extremist ideology, planning to fight in Iraq, coordinating the travel of "misled" members of society and trying to turn public opinion against the state.

Last week a Riyadh court sentenced an imam to five years in prison after he was convicted of glorifying takfiri organisations that accuse others of apostasy. The unnamed imam was found guilty of inciting against the state in a sermon which was widely distributed on social networking sites. He also urged mothers to raise their children to be advocates of jihad and promoters of virtue. "Many Muslim lions have gone to Syria to fight the tyrant [Assad] and defend Islam," he said. He also praised the work of Abu Bakr al-Baghdadi, the leader of Isis.

If the Saudi government is alarmed, popular understanding of Isis seems limited. In a film circulating on social media a preacher named Sheikh Fawzan explains that the group is the creation of "Crusaders, Zionists and Safawis" (a pejorative term for Iranians and other Shia Muslims).In May, the interior ministry said it had dismantled a major terrorist organisation with 62 members and links to extremist elements in Syria and Yemen that was plotting attacks against government facilities and foreign interests.