The kingdom imprisoned dozens of people last month in security trials amid fears that the conflicts in Iraq and Syria will radicalize a new generation of young Saudis.
The six sentenced on Sunday were also banned from traveling for fixed periods after their release.
In February, King Abdullah decreed prison terms of three to 20 years for traveling 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, Islamic State, 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 organizations.
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. – Reuters