There was a time when the Islamic State of Iraq and Syria appeared unstoppable. In September and October, as the jihadist group captured territory through a major offensive in Iraq’s Anbar province, culminating in the fall of the town of Hit on October 13, observers feared that even Baghdad was in danger of being overrun. ISIS is now in the midst of another major military movement in Anbar, but the always-overblown fears about the organization’s advance are now receding—and the group’s decline has grown increasingly apparent.

ISIS’s signature attributes, ferocity and unpredictability, have raised the group’s profile and inspired a spate of lone-wolf attackers. But the organization has also made several strategic errors along the way. The Islamic State’s lifeblood is partially money and territory, but primarily momentum against weak and ill-prepared enemies. And that momentum, which peaked in early August, has stalled.

Where has ISIS overplayed its hand? The group already had an impressive array of foes when a June blitzkrieg extended its reach into Iraq—enemies that included the Iraqi government, the Iranian regime, and even other jihadist groups like the Nusra Front, with whom it frequently skirmished in Syria. This offensive wasn’t solely the work of ISIS, which fought alongside a coalition of Sunni insurgent groups that included former members of Saddam Hussein’s Baath party. The offensive was also widely backed by Iraq’s disaffected Sunni elite.

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.”

ISIS’s financial and military resources have also shrunk as U.S. airstrikes have destroyed the group’s materiel and capacity to refine oil. The Islamic State is still able to sell unrefined oil on the black market, but the difference between the price it can set for unrefined versus refined oil is significant. Reports this week indicated that ISIS expects a $250-million surplus in its $2-billion budget, but these figures are entirely self-reported: Accountants aren’t exactly lining up to get into ISIS-controlled territory and perform an outside audit.

ISIS, moreover, lacks an industrial base capable of sustaining its military efforts (Ninawa and Salahaddin governorates have a number of factories, but the group has a shortage of qualified technical personnel to man and supply them). It cannot build its own heavy armor, armored personnel carriers, Humvees, anti-tank weapons, surface-to-air missiles, anti-aircraft weapons, or radar stations. Only through military raids can the organization capture the equipment it needs for battle, and the last time it did this successfully was in August.

All of these setbacks seriously threaten ISIS because of its reliance on momentum—a dependency articulated in a recent issue of the group’s English-language magazine Dabiq. An article carrying the byline of the British journalist John Cantlie, ISIS’s forcefully conscripted propagandist, noted that “as an entity enjoys success, it attracts more to its fold, thereby causing expansion and breeding more success until it achieves some sort of critical mass, the point at which it becomes self-perpetuating, self-sustaining.” ISIS is not yet self-sustaining. Drawing a steady flow of zealous recruits remains a necessity for the group, not a luxury.

Nevertheless, to borrow President Obama’s words, the United States and its allies are far closer to degrading ISIS than destroying it. The Islamic State is currently positioning itself to attack the Al-Asad airbase in Anbar province, where U.S. military advisors are now located, and such an assault could amplify calls in the United States for an American withdrawal from the region. ISIS could conceivably launch a major cross-border attack against Jordan or move into Suwayda, the only majority-Druze province in Syria, carrying out massacres comparable to those that the group committed in Sinjar or Hit. In the latter scenario, the Islamic State would be goading the U.S. to intervene militarily on what could be seen as the side of Bashar al-Assad’s supporters. ISIS could yet seize the Iraqi cities of Ramadi or Haditha, which would represent powerful symbolic gains for the group and disasters in terms of lives lost, but would do little to improve the Islamic State’s overall strategic position. Even if ISIS lost all its Iraq holdings (which won’t happen anytime soon), the organization would simply be back to where it started before the June offensive, hunkered down in its stronghold of Raqqa, Syria. Even if its “caliph,” Abu Bakr al-Baghdadi, is killed, and even if large portions of the organization subsequently reconcile with—and return to—al-Qaeda, a core is likely to persist for a long time under the ISIS label.

None of these developments, however, would necessarily reverse the Islamic State’s noticeable decline. Indeed, ISIS’s jihadist rivals have been gaining ground. The Nusra Front, which Syria watchers once considered a spent force, has in recent weeks made major gains in Idlib, Hama, and Daraa, and its growing strength has effectively marginalized the “moderate” Syrian opposition. It’s a clear sign that jihadism will bedevil Iraq and Syria for some time to come—and that this problem is much broader than ISIS.