BERLIN (Reuters) - Islamic State is using “headhunters” on social media and instant messaging sites to recruit disaffected young people in Germany, some as young as 13 or 14, the head of the country’s domestic intelligence agency said on Thursday.

A 3D printed logo of Twitter and an Islamic State flag are seen in this picture illustration taken February 18, 2016. REUTERS/Dado Ruvic/Illustration

Hans-Georg Maassen also drew parallels between the militant Islamist group and past radical movements such as communism and Adolf Hitler’s Nationalist Socialists that also tried to lure young people keen to rebel against their parents and society.

“On social media networks there are practically headhunters who approach young people and get them interested in this (Islamist) ideology,” Maassen told foreign reporters in Berlin.

He cited the cases of a German-Moroccan girl, Safia S., 16, who is accused of stabbing a policeman at a train station in Hanover in February last year, and a 12-year-old German-Iraqi boy who tried to detonate two explosive devices in the western town of Ludwigshafen in December.

In closing arguments at Safia’s trial on Thursday, prosecutors asked the judge to convict her of attempted murder, grave physical injury and support of a foreign terrorist organization, with a sentence of six years in prison. A verdict is expected on Jan. 26.

Prosecutors are also seeking a three-year sentence for Mohamad Hasan K., a 20-year-old German-Syrian accused of having known of Safia’s planned attack but not informing the police.

About 20 percent of an estimated 900 people from Germany who have been recruited by Islamic State to join the fight in Iraq and Syria are women, some as young as 13 or 14, Maassen said.

German authorities are monitoring 548 Islamists deemed to be a security risk, but German law does not allow for their arrest until they have committed a crime, Maassen said.

He said he was satisfied that police and security officials had communicated well over the case of the failed Tunisian asylum seeker Anis Amri, who killed 12 people on Dec. 19 by ramming a truck through a Berlin Christmas market.

The case sparked criticism because German authorities had identified Amri, who was imprisoned in Italy for four years, as a security risk and had investigated him for various reasons, but never took him into custody.

German Interior Minister Thomas de Maiziere said on Wednesday the cases of all those deemed a security risk in the aftermath of the Berlin attack would be reviewed.

Maassen said European intelligence agencies were also seeing the radicalization of other segments of society through social media, with growing numbers of people who were not previously politically active attracted to far-right groups.

Such people had their views reinforced in so-called “echo chambers” on the Internet, Maassen said.

“We’ve seen this with Islamic State, but now we’re seeing this with so-called ‘good citizens’ who are being radicalized, and we worry that this radicalization could be transformed into a willingness to commit violent acts.”

Support for far-right groups has grown in Germany following the arrival of more than a million migrants and asylum seekers over the past two years, many of them young Muslim men fleeing conflicts in Syria, Iraq and elsewhere.