BERLIN — A Syrian man has been convicted in Germany of membership in a terrorist organization for serving in the Islamic State group in his homeland and later helping plan an attack in Berlin that was never carried out.

Twenty-year-old Shaas al-Mohammad was sentenced under youth guidelines to five years in prison on Friday.

During his Berlin criminal court trial, prosecutors said al-Mohammad joined IS as a teenager in Syria in 2013 before seeking asylum in Germany two years later.

The court found that once in Berlin, he passed information about “soft targets” in the German capital to the group in apparent preparation for an attack.

Al-Mohammad had denied the charges and can appeal.

The trial wasn’t related to December’s deadly attack on a Berlin Christmas market, which was claimed by IS.