But once its initial gains were secured, ISIS quickly betrayed the very groups that had aided its advance. Most prominently, ISIS declared the reestablishment of the caliphate, with the group’s spokesman Abu Muhammad al-Adnani claiming that “the legality of all emirates, groups, states, and organizations, becomes null by the expansion of the khilafah’s authority.” The statement clearly signaled that ISIS believed it had usurped the authority of its allies; indeed, in early July it rounded up ex-Baathist leaders in Mosul (doing so proved particularly problematic for ISIS because the ex-Baathists were also managing the actual governance and administration of the northern Iraqi city, and their arrest hastened the rapid disintegration of basic services).

ISIS committed a more damaging error at the beginning of August, when it launched a surprise incursion into Iraq’s Kurdish territory and promptly engaged in a campaign of genocidal slaughter and enslavement against the Yazidi minority sect. The moves were pointless from a military perspective, since the Kurdistan Regional Government’s Peshmerga forces weren’t fighting ISIS and the Yazidis didn’t pose a threat to the incipient caliphate. These decisions, along with the beheading of the American journalists James Foley and Steven Sotloff, helped draw even more enemies into the theater, including the United States and an international coalition backing U.S. military action.

The most obvious sign of ISIS’s decline is that the group is no longer conquering territory, seizing no major towns or cities since Hit (and this hasn’t been for lack of effort on its part). ISIS continues to capture villages from time to time; for example, on December 27 it gained control of 14 villages in Anbar after Iraqi security forces withdrew from the area. But those villages aren’t equivalent to a major urban area and had been taken from ISIS by Iraqi forces just two days earlier. In October, ISIS advanced ominously on the Syrian city of Kobane; the French philosopher Bernard-Henri Levy declared in The New Republic that “Kobane will fall. In a matter of hours.” It has yet to fall, and Kurdish forces now appear to have the advantage, though the town remains contested. ISIS has even been losing ground, albeit unevenly. In December, the group pulled its forces from Iraq’s Sinjar district, home to one of ISIS’s main resupply routes from Syria into Iraq (the other being Tal Afar). This has threatened to isolate ISIS-held Mosul.

ISIS’s brutality has also proven isolating. Local opposition against the group, including by Sunnis, is mounting in Mosul and Anbar, although ISIS did recently succeed in suppressing a revolt against it in Syria’s Dayr al-Zawr. These uprisings are certain to grow if ISIS weakens. Meanwhile, the group’s leaders seem increasingly paranoid, reportedly executing many of their own fighters in Mosul and elsewhere. In December, for example, Muammar Tawhlah, ISIS’s top official in Mosul, was killed by firing squad for suspected espionage. And ISIS’s bureaucratic mismanagement has alienated local populations, leaving them with a lack of job opportunities and essential services. As a resident of Mosul told the Financial Times, “When I was seven years old the war against Iran started. Since then, we’ve been at war. We’ve endured international sanctions, poverty, injustice. But it was never worse than it is now.”