IS, which is losing ground on several fronts in Syria and Iraq, is also battling to prevent some of the thousands of foreign volunteers who have joined its ranks since 2014 giving up the fight and going home.
"They sense that we have entered the final stage. Many are starting to send us messages to know how they can return," France's national intelligence coordinator, Didier Le Bret, told AFP.
"Expanding the glorious caliphate is no longer on the agenda and we know that some have been killed while trying to flee," he added.
Slipping past the Sunni extremists is no easy task, making Western security services wary of returning jihadists.
"We worry when we get someone back. How do you know whether he is sincere or on a mission?" Le Bret said.
Patrick Calvar, head of the domestic intelligence agency DGSI told the National Assembly, or lower house of parliament, in mid-May that 244 people had returned to France from Syria and Iraq.
"We're seeing more and more (expressions) of intention to return home," he told lawmakers.
But many of those who wanted to defect were "prevented by Daesh (IS) policy, which considers those who want to leave Syria as traitors to be immediately executed," he said.
In January 2014, five months before IS proclaimed a caliphate in parts of Syria and Iraq, a study by the International Centre for the Study of Radicalisation (ICSR) at King's College London set up a database of returning jihadists, to try understand their motivations.
The list currently runs to 60 names.
'It's just slaughter'
Signup to our newsletter and follow us on Facebook and Twitter!
The ICSR gave various reasons for the growing disenchantment among IS recruits.
"The defectors' reasons for leaving may be as complex as the reasons they joined," ICSR director Peter Neumann wrote in a report in September. "Not everyone has become a fervent supporter of liberal democracy. Some may have committed crimes."
Neumann said four main complaints emerged from the testimonies of the returnees: "'IS is more interested in fighting fellow (Sunni) Muslims than the Assad government', 'IS is involved in brutality and atrocities against (Sunni) Muslims', 'IS is corrupt and un-Islamic' and 'life under IS is harsh and disappointing'."
Shiraz Maher, one of the researchers who interviewed the deserters, told AFP that "most" of the returning fighters insisted "I didn't come (to Syria) for that".
"I want to tell all the mujahideens not to come to Syria. This is not jihad. You will find yourself killing other Muslims," she quoted them as saying.
The losses sustained by IS in Syria and Iraq in recent weeks may also spur the homeward movement. Scores of IS fighters have been killed on various fronts, according to monitors.
Life in Islamic State strongholds like the Syrian city of Raqqa is often a far cry from the utopian visions of a pure Islamic society that lured some foreign combatants.
Heady dreams of adventure, comradeship and glory on the battlefield founder on a daily diet of grinding hardship, wanton barbarity and constant fear -- of IS itself, bombardments by its adversaries or both.
Shiraz recalled: "One told me they think nothing of bringing down buildings with women and children inside, just to kill one person. It's not revolutionary jihad, it's just slaughter'."
Some of the returnees also complain of discrimination by IS commanders on the basis of country of origin.
An Indian who went to fight was relegated to the most menial of tasks.
"They made me clean the toilets," he said.