WHEN the jihadists of Islamic State (IS) seized Mosul and the Iraqi army fled last June, they became the world’s most dangerous terrorist organisation. Sweeping out of Syria and north-western Iraq, they stormed southward, and came close to taking Baghdad. They murdered male prisoners in gory videos and enslaved female ones. Groups from Nigeria to Libya and Afghanistan pledged allegiance to them. Devotees attacked innocent civilians in Western cities; this week at least 19 people were killed in an assault on tourists in Tunisia (though the culprits are unknown). The IS threat has pushed together unlikely allies: in Iraq America provides the air power while Iran musters the ground forces.

As our briefing explains (see article), IS differs from jihadist groups that have gone before, including its parent, al-Qaeda. It is uniquely brutal in its treatment of foes and uniquely competent as a propagandist. But what most sets it apart is its claim to have restored the Islamic caliphate. The revival of a single state to rule over all Muslims, dating to Islam’s earliest days and abolished in 1924 by modern Turkey after the fall of the Ottoman empire, was meant to eradicate decades of supposed humiliation by outsiders and Arab rulers who presided over the decline of flourishing Arab societies.

To Western ears, the pretence that IS is a government in office is absurd, a bit of jihadist braggadocio; to many Muslim clerics (and even al-Qaeda) it is heresy. Yet it has stirred a form of messianism. “Rush, O Muslims, to your state,” declared Abu Bakr al-Baghdadi, IS’s leader. And thousands have indeed rushed to fight for and build the Islamic Utopia: even schoolgirls have abandoned families and friends in Europe.

The call of the caliphate has galvanised zealots. Yet, even as IS launches terrorist attacks, the good news is that cracks in the caliphate are becoming increasingly apparent. IS is losing ground, money and the consent of the people it rules.

The state of Islamic State

The caliphate has been pushed out of the Syrian town of Kobane by Kurdish fighters, backed by American air power. It is being squeezed in Tikrit (the tribal base of the former dictator, Saddam Hussein) by the Iraqi army and Shia militias co-ordinated by Iran. Compared with the peak, when it was at the gates of Baghdad, its territory has shrunk by about 25%.

IS’s funds are dwindling, too. America and its allies have bombed lucrative oil facilities. Most of the hostages have been sold or murdered in video-recorded beheadings. Now that IS’s forces are retreating, the loot of conquest has dried up. Some analysts reckon it may have lost up to 75% of its revenues. That makes it harder for IS to keep fighting and to provide services to the roughly 8m people living under its rule.

That may help explain signs of internal tension. The movement has started to kill its own followers, sometimes for fleeing before the enemy and on at least one occasion supposedly for zealously beheading too many people. Residents complain of extortion, violent repression and declining public services. There are reports of tensions between local and foreign members over disparities in pay.

Judged by its own standard, then, the caliphate is failing as an all-conquering state and model for society. That matters because a proto-state with a large territory and population to defend is also more vulnerable to setbacks than terrorist groups that are not rooted to a patch of land. Precisely because IS claims to be running a model Islamic state, its visible failure exposes the bankruptcy of its ideology and the hollowness of its claims to would-be recruits. If, as some say, the secret of IS’s success is success itself; then failure will gain momentum, too.

Even so, the hardest part of defeating IS still lies ahead, starting with the military campaign in Iraq. In recent days the operation to oust it from Tikrit has been hampered by hidden bombs and snipers. And after Tikrit falls, there is Mosul—bigger and more important, with a population closely associated with IS. The recapture of Mosul is vital to puncturing IS’s claim to be a caliphate. The nature of the campaign matters, too. The Iranian-sponsored Shia militias at the forefront of the fighting in Tikrit are known for having victimised Sunni civilians in earlier fighting nearer Baghdad. The fear is growing that, by depending so heavily on Iran, Iraq is being turned into an Iranian satrapy. If so, Iraq’s disenchanted Sunni population will cleave even more tightly to the IS jihadists as their best and only protectors. It is important, therefore, that the attack on Mosul is led by a professional, non-sectarian Iraqi army. The trouble is that the Iraqi army is demoralised and far from ready.

The creation of a caliphate: a timeline tracking Islamic State's rise to become the world's most dangerous terrorist group Hardest of all is the insoluble problem of Syria. Even if Mosul can be retaken, IS or something like it will survive, certainly for as long as it enjoys an unchallenged haven in Syria. For the time being, nobody is even thinking of trying to eject IS from the Syrian city of Raqqa: not the regime in Damascus, which wants to prove that the only alternative to IS is Bashar Assad; not the Kurds, who will not fight far beyond their enclaves; not Jabhat al-Nusra, the most effective rebel force, which remains a franchise of al-Qaeda; and not the rebels being trained by America, who are too few to make a difference. Syria will not be pacified soon—possibly not for many years. Until that moment, IS can lurk there, controlling swathes in the east, destabilising Sunni areas of Iraq and biding its time until it has another chance to rise up. Defeat in Mosul could reduce the caliphate to a rump entity, or could lead it to disintegrate into a patchwork of warring fiefs, like much of the rest of the country. It would still pose a grave threat to the outside world and would need constant watching. But degradation would make it easier to contain than it is today.

Always with us

Destruction is much further off. As much as Islamic State is a cause of chaos in the Middle East, it is also a symptom. Its ideology feeds off Sunnis’ sense of victimhood. The group has taken root across the region, and especially where the state has collapsed. Defeating it is ultimately a matter of rebuilding governments in the Arab world—a task that will take decades. Cutting back the caliphate is just the vital first step.