Updated

A 25-year-old German has been sentenced to four and a half years in prison for joining the Islamic State group and working for its secret police.

The Duesseldorf state court found Nils D. guilty Friday of membership in a terrorist organization, the dpa news agency reported. His last name wasn't released in accordance with German privacy laws.

During his trial, Nils D. admitted to being part of an IS "storm trooper" unit that hunted spies and deserters, guarded prisoners and disposed of their bodies. He told the court he served as a guard at a facility where prisoners were held and tortured.

The German converted to Islam in 2011, became radicalized and traveled to Syria in August 2013. He returned over a year later and was arrested Jan. 10, 2015.