With the Islamic State group on the back foot after a string of military defeats, foreign volunteers for the jihadist group are returning home and creating a massive security challenge, experts say.
These radicalised individuals, who have often received weapons and explosives training, are a "time bomb" as they flee the Islamic State and Syria and return home, France's top prosecutor has said.
The risk is especially acute for France, which has been attacked in the past year by jihadists hardened from time spent with ISIS in Syria and Iraq.
"At some time or another we will be faced with the return of a large number of French fighters and their families," Francois Molins, France's anti-terrorism prosecutor, told the daily Le Monde.
"Nearly 700 jihadists who are either French or live in France are in Iraq and Syria at the moment," Prime Minister Manuel Valls said last week.
"Their return represents an additional threat to our national security... We have to be prepared to fight back. It's going to be a long fight."
Like many countries, France has tightened its legislation surrounding returning extremists.
Suspects identified after being tracked by security services on their journey to Syria - in the vast majority of cases by passing through Turkey - are now systematically arrested when they try to re-enter France.
Many face trial and are given prison sentences.
Molins, the prosecutor, said nearly 1,000 individuals "are currently, or have been, investigated for Islamist terrorism". Around 280 have been charged and 167 of those prosecutions have led to jail terms.
But the limits to placing dangerously radicalised individuals under surveillance were shown in July, when two young extremists, including one wearing an electronic tag after twice attempting to go to Syria, killed an elderly priest near Rouen in northern France.
"Straight away there are questions about them being held in custody," Yves Trotignon, a former anti-terrorist analyst at France's foreign intelligence agency (DGSE), said.
"Will they be radicalised in prison? These are dangerous individuals and if they are tried on the facts set out by the prosecution, they will get two or three years. What happens to them after that?"
Trotignon said that of greater concern to security services were the hardcore jihadists who had years of experience staying under the radar.
"There won't be too many of them, but the real danger is those who are going to come back and are still convinced of the righteousness of their cause and who are going to plan attacks.
"We have known for a few months that IS(IS) are preparing for defeat militarily, so it is going to once again become an underground movement."
Foreign fighters returning home to Europe who still intend to carry out attacks will bide their time, Trotignon believes.
"They are not going to take a direct flight to western Europe. They are going to go on a winding route and make stops on the way and it could take several months. They might go to countries where they will change identity - we've already seen that happen.
"They will disappear into gaps, only to re-appear later."
Turkey's role is crucial. The Turkish army has seized control of several kilometres of the border with Syria that ISIS formerly used to pass fighters and equipment.
"The border is now very much sealed," a diplomat told French journalists.
"The Turks have done a huge amount of work, they have filled in holes and built walls. If you try to get into or out of Turkey illegally, you will be shot at."
More than 50,000 people are now barred from entering Turkey, the diplomat said, and 150 French nationals have been arrested in the country and returned to France in handcuffs.