German authorities have arrested a suspected member of Afghanistan's Taliban who is accused of taking part in an attack in which an American soldier was killed.

Federal prosecutors say the 20-year-old Afghan national, identified only as Abdol S. in keeping with German privacy rules, was arrested in Bavaria on Wednesday.

Prosecutors said Thursday that the suspect joined the Taliban in Afghanistan in 2013 and was trained to use an AK-47 assault rifle and hand grenades.

They say that, in 2013 and 2014, he participated at least twice in fighting against Afghan government troops and U.S. soldiers.

According to prosecutors, a U.S. soldier was killed and two others wounded during one of the attacks.

The Taliban have been waging an insurgency against Afghanistan's U.S.-backed government for over 15 years.