A German court on Thursday jailed three young German men for up to four and half years for travelling to Syria where they teamed up with Islamist militants.
Fadil Rudolf S., 26, who received the longest prison term, had first travelled to Syria to join the Sunni militia group Junud al-Sham and in 2013 joined fighters of the Islamic State (IS) militants.
"After his first return to Germany, he once again made himself available as a fighter for the IS over several weeks in July 2014," the court in the western city of Duesseldorf said in a statement.
"Later in January and in the summer of 2015, he also sought twice to travel to Syria to join the IS."
The other men, 24-year-old Mohamed A. and 26-year-old Mustafa P., were sentenced to two years and nine months for involvement in Junud al-Sham for several months in 2013.
"The confessions of the accused had a mitigating effect on their sentences," the court statement said.
Separately, prosecutors in the southwestern town of Karlsruhe decided to detain a 27-year-old man, Ashraf Al-T., who they suspect of having contacts with an IS member in Syria who runs the group's foreign operations.
The man is thought to have been "authorised to plan an attack in Germany", prosecutors said without elaborating.
The man was arrested Wednesday evening in Berlin. He said he was a Syrian asylum seeker who arrived in Germany last year, but prosecutors did not specify his nationality.
According to figures released in May by German intelligence services, 820 Islamist militants have left Germany for Syria and Iraq.
Almost a third have returned and 140 were killed while abroad, while around 420 are still in Syria or Iraq.
Germany has so far been spared large-scale Islamist militant attacks.
But it was shaken by two assaults claimed by IS and carried out by asylum seekers -- an axe rampage on a train in Wuerzburg that injured five, and a suicide bombing in Ansbach in which 15 people were hurt.
Police said last month they had foiled an alleged plot by a Syrian refugee to bomb one of Berlin's airports.