HELSINKI — A Norwegian court has sentenced a 34-year-old man to seven and a half years of prison for joining the Islamic State group and fighting alongside the terror group in Syria.

The Oslo District Court said Monday that the Norwegian man traveled in November 2014 to Syria, where he took part in various IS training schemes and weapons training.

The man, identified by the Norwegian broadcaster NRK as Kristian Michelsen, was arrested by Turkish authorities in 2016 on the Turkish-Syria border and handed over to Norway.

He has acknowledged being welcomed by IS members on arrival to Syria but denied the court’s charges, saying he soon had second thoughts on joining the group.

Defense lawyer Siri Langseth told NRK the man would appeal the verdict. Prosecutors had demanded a nine-year sentence.