Dubai: A Saudi court on Monday sentenced four people to jail terms for trying to go to Iraq to join the fighting there and for supporting Al Qaida’s operations abroad, state news agency SPA said.

The four, one of whom was sentenced in absentia, were given prison sentences of two years to five years and six months, SPA said. They were also banned from travel for specific periods.

Other charges included “storing and possessing prohibited computer documents and helping a number of people go abroad to fight in troubled nations”, SPA said.

Saudi Arabia in February said it would jail for up to 20 years any citizen who fought in conflicts abroad, in an apparent effort to deter Saudis from joining rebels in Syria and becoming a security risk on their return.

The latest verdicts show that Riyadh is also worried about Saudis who may want to join the fighting in Iraq, where an Al Qaida offshoot captured swathes of Iraqi territory last month.

The decree in February also said Saudis who join, endorse or give moral or material aid to groups it classifies as terrorist or extremist organisations, whether inside or outside the country, would face prison sentences.

Earlier this year Riyadh designated the Islamic State in Iraq and the Levant (Isil) as a terrorist group. Isil has renamed itself the “Islamic State” and proclaimed the establishment of a “caliphate” on land it has captured in Syria and Iraq.

Over the past decade Saudi Arabia has imprisoned thousands of people convicted of working with Al Qaida after the Islamist militant group staged attacks inside the kingdom in 2003-06 that killed hundreds.

Saudi Arabia said in May it had detained 62 suspected Al Qaida militants with links to radicals in Syria and Yemen who were plotting attacks on government and foreign targets in the kingdom. Riyadh said that group had links to Isil.