Even if the Islamic State group is one day defeated on its territory, the world could face an even greater threat from tens of thousands of battle-hardened jihadist veterans, experts have warned.
US intelligence services estimate some 30,000 people have joined the ranks of IS from around 100 countries, adding to the huge number that have fought with older Islamic extremist groups over the decades.
In Afghanistan alone between 1996 and 2001, some 10,000 to 20,000 people received jihadist training, many under the guidance of Osama Bin Laden.
After the fall of the Taliban regime, many of those fighters dispersed around the world, taking their radical ideology and knowledge with them.
Officials warn that jihadist veterans pose a major long-term threat that Western institutions are ill-equipped to handle.
"Just the current wave -- of around 250 returning fighters (coming to France) -- is a complicated problem," said a senior French counter-terrorist official, speaking on condition of anonymity.
He said the vast majority will be tried and imprisoned, and the rest closely monitored, but the difficulty of finding evidence against returning fighters means many are jailed for only five to seven years.
"That means that in four or five years, the first will start leaving prison. The problem will return," said the official.
"That's why we have to prepare now, and see how we can return these people to society. Some will be traumatised for years. We need to think about rehabilitation. It's a huge job."
- 'Even worse than IS' -
Regardless of current efforts to target the group with air strikes and diplomatic efforts in Syria and Iraq, IS has prepared the ground for years of global insurgency by gathering so many people in its self-declared "caliphate".
Fragmenting or dispersing the group can have its own terrible side-effects.
"Since only the most battle-hardened, the most radical will survive, we will find ourselves with something even worse than IS," said Mathieu Guidere, a radicalisation expert at the University of Toulouse.
"Don't forget: we thought we had eliminated Al-Qaeda by killing bin Laden, but the fragmentation of Al-Qaeda led to something worse."
Faced with the slow-moving institutions of the European Union and other Western countries, "we risk always being one step behind in the war," added Guidere.
"Jihadists know perfectly how to adapt to new conditions. They will create new structures and forms of action adapted to their environment, and become increasingly difficult to combat."
In its own territory, attacks on IS are also likely to worsen the violence against civilians in their immediate region, at least in the short term.
"If there is a perception that the local population is assisting the recapture of territory from the group, then there is absolutely a risk that the group will become more vicious," said Matthew Henman, head of IHS Jane's Terrorism and Insurgency Centre in London.
"Targeting civilians is also a good way of undermining security and stability after the recapture of territory -- highlighting that the government still can't protect civilians," Henman added.
"There might also be an increasing effort to send foreign fighters back to their countries for reprisal operations."
As the Paris attacks of November 13 demonstrated, European security agencies have little hope of collating and analysing all the data pouring in about radicalised individuals and combatants returning from the Middle East.
They must also monitor older jihadists from wars in Bosnia, Afghanistan and Iraq that could return to violence at any time.
"Long after the fall of Daesh (an alternative name for IS), the whole world will pay for the years of blindness during which it let the jihadist monster grow on Europe's doorstep," said Jean-Pierre Filiu, an expert on Islamic extremism at Sciences Po University in Paris.
"It will of course be the European countries, with at least 5,000 jihadists engaged with Daesh... that will be most affected," he warned.