The Federal Prosecutor’s Office handed down the sentence on Wednesday for membership of a criminal organisation and serving in a foreign army.
The man left for Syria in December 2013, telling Swiss Public Radio, RTS, that he had been converted by a French recruitment website. He stayed in a training camp for two weeks before having second thoughts and deciding to leave, but said he was held prisoner for 54 days by the Islamic State before being released and returning to Switzerland.
In addition to the suspended sentence of community work, the man has been ordered to undergo psychiatric treatment and create a photography project on the theme of peace.
Federal Prosecutor Michael Lauber confirmed to RTS that the man would not be going to jail but said this didn’t mean sentences for other cases would be identical.
In October, a French citizen was sent to prison for seven years after joining a militant Islamist group “for a dozen days”.
On Monday, the Swiss parliament voted to ban al-Qaeda and Islamic State in Switzerland. This comes into effect in January.
The Swiss Federal Intelligence Service (FIS) has said that between 2001 and September 2014 there were 55 cases of people leaving Switzerland to fight in jihadist conflicts. Of these, 35 had gone since May 2013.
swissinfo.ch and agencies