Saudi Arabia's Specialised Criminal Court has sentenced four men to prison for travelling abroad to fight in Syria's civil war, local and state media reported on Sunday.

King Abdullah decreed in February that citizens involved in fighting overseas faced up to 20 years in prison in a bid to prevent the radicalization of young people who might then turn against their own government.

While the conservative Sunni Muslim kingdom has backed opposition groups battling President Bashar al-Assad, an ally of Riyadh's main regional rival, Shiite Iran, it also regards militant groups there as a threat to its own security.

"The accused were proven to have ... quit their obedience to the ruler by travelling abroad to fight," the official Saudi Press Agency reported.

The men were sentenced to terms ranging between four months and two years and 10 months, it said, adding that their crimes included forgery of travel documents and money laundering.

The website of the daily al-Riyadh newspaper said two of the men had fought in Syria before becoming disillusioned with the conflict and surrendering to Saudi authorities.

The other two had travelled to Yemen with the intention of then going to Syria, it said. The sentences were lenient as the defendants had shown remorse and cooperated with authorities.

The kingdom has called on citizens fighting in Syria, Iraq and Yemen to return home, often describing them as "misled" in official statements. Saudi state media usually reserves its harshest criticism for militant groups or clerics who recruit young Saudis as fighters.