BERLIN (AP) — A 25-year-old German has gone on trial accused of having been part of the Islamic State group's secret police.

The man, identified only as Nils D., is charged with membership in a terrorist organization and faces up to 10 years in prison.

Prosecutors allege he belonged to an IS "storm trooper" unit that hunted spies and deserters, guarded prisoners and disposed of their bodies.

At the trial opening Wednesday, D. told the regional court in Duesseldorf that he converted to Islam in 2011, quickly became radicalized and traveled to Syria in August 2013.

He returned over a year later and was arrested Jan. 10, 2015.

German news agency dpa reported that D. has agreed to testify fully at his trial, which could significantly reduce any sentence if he is convicted.