German authorities have arrested a 20-year-old Somali man on suspicion of being a member of the extremist militia al-Shabab.
Federal prosecutors say the man was detained Thursday in the central state of Hesse.
Prosecutors said in a statement Friday that the suspect, identified only as Abduqaadir A. in line with German privacy laws, is suspected of attempted murder and accessory to murder.
He is alleged to have joined al-Shabab in Somalia in 2012, undergone weapons training and then taken part in the killing of a person at a mosque.
The suspect is alleged to have later attempted to kill a member of the Somali government, who survived the attack.
After being detained by al-Shabab for failing to carry out the killing, the suspect fled Somalia and reached Germany in 2014.