A Saudi court has sentenced four people to jail terms for trying to go to Iraq to join the fighting there and for supporting al-Qaeda's operations abroad, state news agency SPA has said.

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

Other charges against the defendants included "storing and possessing prohibited computer documents and helping a number of people in going abroad to fight in troubled nations," the agency said.

In February, Saudi Arabia 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-Qaeda offshoot captured swathes of Iraqi territory last month, the Reuters news agency reported.

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 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-Qaeda after the group staged attacks inside the kingdom in 2003-06 that killed hundreds.

Saudi Arabia said in May it had detained 62 suspected al-Qaeda members with links to people in Syria and Yemen who
were plotting attacks on government and foreign targets in the kingdom.

Riyadh said that the group had links to the Islamic State.

Source: Agencies