BERLIN (AP) – German authorities have charged a Somali man who allegedly was a member of the foreign extremist group al-Shabab and is accused of attempted murder and assistance to murder.

Federal prosecutors said Monday that 20-year-old, identified only as Abduqaadir A., joined the group in 2012 in Mogadishu, and was trained to use pistols and hand grenades. During his training, he accompanied other al-Shabab members to a mosque where they assassinated a person with three shots to the head.

He was later assigned to kill a Somali government employee with the help of another group member at a restaurant. There, he shot several times at the man, wounding but not killing him. He was therefore arrested by al-Shabab until he managed to flee in October 2012.

Prosecutors say the accused came to Germany in June 2014, and was arrested in February.