Jordan is cracking down on firebrand preachers and online extremism to tackle jihadists after joining US-led air strikes on the Islamic State group.
The desert kingdom shares borders with conflict-hit Iraq and Syria, and is struggling to cope with hundreds of thousands of Syrian refugees, adding to its own problems with homegrown Islamists.
Its decision in September to join the anti-IS coalition has put Jordan in even graver danger, but authorities insist its borders are secure and have launched a sweep against jihadists that extends to the Internet.
"Jordan is waging a war against jihadist ideology and amended the anti-terrorism law... because the Internet has become the main tool for mobilising and recruiting" militants, said analyst Hasan Abu Haniya.
- 'Stopping extremist ideas' -
Since joining the anti-IS fight, "130 IS sympathisers have been arrested, most of them members of Salafist groups," said defence lawyer Mussa Abdalat, referring to adherents of a strict Sunni interpretation of Islam.
"Only 50 of them have been brought to trial before the state security court... while the rest are still awaiting prosecution," Abdalat told AFP.
But for those already convicted or facing trials at military tribunals, the charge has often been the same: spreading the ideology of a terrorist group on the Internet.
Wary of Salafists, authorities have also moved to bring some of the country's nearly 6,000 mosques under tighter control by weeding out preachers who deliver fiery pro-jihadist sermons.
"We have stopped 25 imams from preaching because they violated regulations," Ahmad Ezzat, the spokesman for the ministry of religious endowments and Islamic affairs, told AFP.
"Some of them tried to use the minbar (pulpit) for political reasons while others used it to propagate extremist ideas," he added.
As in many other Arab countries where fears are mounting over the growing influence of Salafists, Jordan's ministry of Islamic affairs appoints imams, pays their salaries and monitors their sermons.
- 'War on three fronts' -
Preachers must promote moderate Islam and refrain from making political statements as well as saying anything that could undermine the sovereignty of the state or fan civil unrest.
Egypt has also moved to control mosques by laying out the theme of sermons on Fridays, as it faces growing unrest following the military's ouster last year of the Islamist president Mohamed Morsi.
Authorities say 1,300 Salafists are fighting in the ranks of IS, which has declared an Islamic "caliphate" on territory it has seized in Iraq and Syria.
They are estimated to number 4,000 in Jordan itself.
Hundreds are followers of Al-Qaeda's Syria franchise, Al-Nusra Front, but many switched allegiance to back the Islamic State group when Jordan joined the US-led coalition.
"The war on terror is a continuous process, (fought) on three fronts," government spokesman Mohammed Momeni told AFP.
These were "direct military confrontation, security efforts to monitor terrorist organisations... and religious awareness" in places like schools and mosques "to eradicate extremist ideology".
Jordan passed its first anti-terrorism law in 2006, when Al-Qaeda suicide attacks on three Amman hotels killed 60 people.
In April parliament adopted controversial measures to tighten the noose, as fears grew that the more than three-year war in Syria could spill over and threaten the kingdom's security.
These criminalised "the use of information technology, the Internet or any means of publication... to facilitate terrorist acts or back groups that promote, support or fund terrorism".
The amendments as terrorist acts "joining or attempting to join armed or terrorist groups, or recruiting or attempting to recruit people to join these groups" acts of terrorism.
They also outlaw "acts that would expose Jordan or Jordanians to the danger of acts of aggression, or harm the kingdom's relations with another country."
On Monday two Jordanians were sentenced to five years each for IS membership and two others for allegedly posting pro-jihadist comments and articles online.
Last month former Al-Qaeda mentor Issam Barqawi, also known as Abu Mohammed al-Maqdessi, was arrested only four months after being released from jail.
Barqawi, who was once mentor to Iraq's slain Al-Qaeda leader Abu Musab al-Zarqawi, was jailed again after the state prosecutor accused him of using the Internet to promote Al-Nusra Front.