Germany's domestic intelligence agency has warned against underestimating the threat posed by ISIS after its formal defeat in Syria and northern Iraq.
Thomas Haldenwang, the head of the Federal Office for the Protection of the Constitution, told German newspaper Welt am Sonntag that the number of radicals in Germany last year rose to 2,240, despite the demise of the extremists.
"I cannot give an all-clear on ISIS," Mr Haldenwang said. "It can launch an attack in Germany any time."
The "virtual cyber caliphate" can still attract recruits willing to conduct attacks on home turf, the chief intelligence officer said, adding that authorities could not possibly monitor everyone who is suspected of being radicalised online.
Mr Haldenwang said four officers were needed to monitor one person and that resources were being allocated to watch those considered extremely dangerous.
Extremists are also often tech-savvy and are aware of which apps to use if they want to send encrypted information, the agency chief said.
Mr Haldenwang also called on Germany to "pay more attention to far-right extremism" as far-right groups became increasingly "interlinked."
On the issue of the repatriating ISIS children, he said they were also the victims of the extremists and should be treated as such.
He called for legal reform to enable his agency to collect their data and pass it on to the youth welfare office.
This month, the German Foreign Ministry took several children of ISIS militants back to Germany from Iraq.
The fewer than 10 returns so far were carried out with the consent of the parents, the ministry said.
A mother, 31, was immediately placed under arrest when she arrived with her three children at Stuttgart airport, family lawyer Mahmut Erdem said.
Authorities suspect the woman took the children to Syria against the will of their father in 2015.
This month, the German Parliament approved legislation to strip dual nationals of their German citizenship if they joined foreign terrorist groups. But the law is not retroactive.
About 1,000 people are estimated to have left Germany to join terrorist groups in Syria and Iraq since 2013.
A third of them have already returned to Germany and have been prosecuted or placed in rehabilitation programmes.
A “small number” of children have also been repatriated to the UK in the past year, a British minister said.
Questions about ISIS returnees and their children have increased since Shamima Begum, the British wife of an ISIS fighter, was stripped of her citizenship.
Rights groups have also called on Sweden to return the children of about 80 children of Swedes who travelled overseas to fight for the terrorist group.
Save the Children has argued that, under the UN Convention on the Rights of the Child, European countries have a duty to repatriate them.