On the morning of October 17, Iraqi Prime Minister Haider al-Abadi announced the launch of the operation to recapture the Iraqi city of Mosul from the Islamic State. In the hours that followed, Kurdish Peshmerga claimed to have seized no fewer than nine villages and 200 square kilometers of territory. By lunchtime on day two, the spokesman for the U.S.-led coalition went as far as to say that the offensive was “on or ahead of schedule.”  

Unsurprisingly, the Islamic State’s version of events read very differently. While its official media team conceded that the group had faced a large attack near Mosul on Monday morning, that was about all its propaganda shared with the mainstream news narrative. Indeed, while the peshmerga were counting up their captured kilometers at the end of the first day, the Islamic State’s Amaq News Agency was claiming that the reports were all false, and that it had, contrary to the lies peddled by the “crusader” media, managed to “absorb the momentum” of the encroaching forces before subsequently “repelling” them.

On the second and third days of the operation—dubbed “Qadimun Ya Naynawa” (“We Are Coming, Nineveh”) by Abadi—the propagandists seemed to grow more measured in their denialism. While they continued to challenge the coalition narrative, branding the Islamic State as the aggressor in a fusillade of propaganda (in 72 hours, the group released 69 operation claims, videos, and photo reports regarding Mosul), they also began to acknowledge some of the inroads being made by the coalition.

That all changed with the publication of the Islamic State’s newspaper on day four of the operation. Its front page bore the headline, “A Disappointing Start to the Crusader Campaign against Nineveh.” Explaining how the coalition had already been forced from “offense to defense,” the lead article was complemented by a fiery editorial about how the Mosul offensive—which it claimed will never really end—is set to cause the coalition "a calamity greater than that which befell them" when Mosul fell in 2014.

Notwithstanding the Islamic State’s current defiance, it is unlikely that its propagandists will continue claiming victory in this territorial battle for much longer. It is vastly outmanned and outgunned and, much as it would prefer otherwise, Mosul’s fall in the next few months is near inevitable. No matter how much social-media savvy the Islamic State possesses, this is an unsavory truth that its propaganda machine cannot spin.

But contrary to some reports, this does not pose an existential threat to the Islamic State. For some time, the group has been preparing for this very moment and others like it (the recent loss of Dabiq, for example), proactively but subtly shifting its overarching narrative away from divine aggression and towards steadfast resistance, reshaping it in order to allow for defeat, even the most catastrophic sort. While leaders of the Islamic State were already hinting at such a shift last year, this pivot first began to manifest properly following a May 2016 statement, directed at the coalition, by late spokesman Abu Muhammad al-Adnani. “Would we be defeated and you be victorious if you were to take Mosul or Sirte or Raqqa or even take all the cities and we were to return to our initial condition?” (“Certainly not!” was the answer he provided, in case you were wondering.)

In the ensuing months, the notion that the caliphate was on the cusp of downsizing—from proto-state to proto-insurgency—and that this was perfectly fine, received more attention from Islamic State media, notably from, among others, the al-Naba newspaper editorial board. This re-framing—casting the staggering loss of territory as a simple expression of God’s divine project—first really came to bear in June 2016, when Fallujah fell to Iraqi forces. Before this setback, the Islamic State had a clear-cut policy for dealing with defeat: Look the other way. When, for example, the Syrian border town of Tel Abyad fell to a coalition of Kurdish and Free Syrian Army fighters in June 2015, propaganda coverage was notably lacking, with many Islamic State supporters asserting that it was nothing more than a tactical retreat in the absence of an officially delineated line. Likewise, other significant losses, like Tikrit, Ramadi, and Palmyra, were more or less overlooked by the propaganda factory.

This obfuscation worked in some places, but it could never work with Fallujah. This would have been too big a loss for the Islamic State to simply sweep under the rug. It owed a lot to the city, which it had largely controlled for two and a half years. Its roots there, symbolic and logistical, ran far deeper than they did in any of the above towns. Losing it would have strong reverberations.

Recognizing this conundrum, the Islamic State’s leaders considered their next steps with care. First, they embraced the battle for Fallujah wholeheartedly, producing a constant flow of operational reports, short videos, newspaper articles, and photographic essays, not to mention high-spec documentaries like “Fallujah of the Resistance” and “Signs of Victory,” all of which, at least initially, depicted the battle as epic, heroic, and distinctly undecided. However, as Fallujah’s imminent capture by Iraqi forces became apparent just two weeks into the offensive, the Islamic State slowed the flood to a trickle, but not before making sure to frame its loss appropriately.

Since its Fallujah test run, the Islamic State’s media mavens appear to have continued in this vein, deeming it a better bet to prioritize long-term inevitability over short-term triumphalism. This shift, something of a tactical retreat, enabled them to reframe territorial loss as a confirmation of the nearing apocalypse, rather than evidence of a failing insurgency.

To be sure, this approach is not perfect. But from the Islamic State’s perspective it’s better than nothing. In the glory days of 2014 and 2015, it made itself an attractive option to jihadists by lacing its self-aggrandizing propaganda with potent promises of imminent Armageddon. The end of the world was right around the corner and, as the old propaganda line instructed, supporters had to hop aboard the caliphal train while they still had the chance. These days, even though the Islamic State frames things less urgently than before, the apocalypse still occupies center stage. Indeed, if anything, the end-times obsession is more prominent than ever in its narrative. Now, it’s a resource with which to buoy morale and sustain interest, even in the face of battlefield reversals.

By accommodating ideology to situational exigencies, the Islamic State passes the buck onto predestination and claims that all territorial losses, no matter how damaging, are necessary elements of God’s caliphate project. As long as it is still able to blight its enemies from afar, physically governing large parts of Iraq is no longer essential for its particular jihadist ambitions. Rather, according to the new line, losses are both unavoidable and, in a sense, a good thing—a sign that the prophecies are coming true.

While it may seem contrived from the outside, for the true believers among the caliphate’s support base, this ideological maneuvering will likely work. As one weary-sounding propagandist wrote in the most recent issue of Rumiyah, the Islamic State’s multilingual zine, “complete victory is coming”—just not any time soon.