Amman - Jordan is cracking down on firebrand preachers and online extremism to tackle jihadists after joining US-led air strikes on the Islamic State or Iraq and Syria (ISIS) 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-ISIS 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.
Also Read: Obama seeks human rights waiver on war funds
"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.
Since joining the anti-ISIS 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.
'Stopping extremist ideas'
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 spokesperson 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.
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 ISIS, 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.
'War on three fronts'
"The war on terror is a continuous process, [fought] on three fronts", government spokesperson 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".
Also Read: 'Terror' attack on Egypt vessel leaves 8 missing
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 ISIS 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.