Kingdom imprisoned dozens of people last month in security trials amid fears that the conflicts in Iraq and Syria will radicalise a new generation of young Saudis
Saudi Arabia's Specialised Criminal Court jailed six people for up to six years for security offences including travelling abroad to fight, adopting militant ideology and "breaking obedience to the ruler", state media reported late on Sunday.
The kingdom imprisoned dozens of people last month in security trials amid fears that the conflicts in Iraq and Syria will radicalise a new generation of young Saudis.
The six sentenced on Sunday were also banned from travelling for fixed periods after their release.
In February, King Abdullah decreed prison terms of three to 20 years for travelling abroad to fight and of five to 30 years for giving moral or material support to banned groups that the government has designated as extremist.
These include Al Qaeda, ISIL, Nusra Front, the Muslim Brotherhood, Hezbollah and Yemen's Houthi movement.
Saudi Arabia has detained over 11,000 people since a wave of attacks from 2003-06 against government and foreign targets in the conservative Islamic kingdom staged by Al Qaeda militants who had fought in Afghanistan and Iraq.
Officials say there are more than 2,500 Saudis now outside the country who are believed to be working with militant organisations.
A big proportion of them are thought to be in Syria, where Riyadh has sent arms and cash to some rebel groups fighting against President Bashar Al Assad, an ally of its main regional foe Iran, but says it has been careful not to back militants.