ISIS has an intense interest in the apocalypse. Its propaganda references it constantly, and the group has even conquered a town that only really made sense to target in light of prophecy. The idea that ISIS's actions are literally helping bring on the end times is central to the group's unique, and disturbing, ideology.

It would be easy to dismiss ISIS's apocalyptic obsessions as a weird quirk, or a sideshow to the serious business of the brutal war the group is waging in Iraq and Syria. But as a new book from the Brookings Institution's Will McCants makes clear, understanding ISIS's fascination with the apocalypse is essential to understanding the group itself.

Apocalyptic fantasies are "a major part of the Islamic State's recruiting pitch," McCants, the director of Brookings's Project on US-Islamic Relations, told me in an April interview.

"Based on their rhetoric, they believe that the final apocalyptic battles with the infidel are swiftly approaching." Those beliefs aren't mere superstitions. They have affected huge parts of ISIS's operations, from its recruitment strategies to its military priorities — and they continue to do so today.

The Iraqi apocalypse

To understand ISIS's apocalyptic bent, you need to start at the beginning: the Iraq War.

"Most modern Sunni Muslims viewed apocalyptic thinking with suspicion before the United States invaded Iraq in 2003," McCants writes in his new book, The ISIS Apocalypse, which was excerpted in the latest issue of Politico Magazine.

But the total chaos that followed the US invasion made it seem plausible that the end times could be beginning. This was especially true for Abu Musab al-Zarqawi, the leader of a terrorist group that came to be known as al-Qaeda in Iraq, and which eventually evolved into ISIS.

Iraq, the site of a prophesied bloodbath between true Muslims and false, was engulfed in a sectarian civil war. As Zarqawi saw it, the Shia had united with the Jews and Christians under the banner of the Antichrist to fight against the Sunnis. The Final Hour must be approaching, to be heralded by the rebirth of the caliphate, the Islamic empire that had disappeared and whose return was prophesied.

After Zarqawi's death in 2006, his successor renamed al-Qaeda in Iraq "the Islamic State in Iraq," and claimed the territory it controlled at the time for the caliphate. While the group had lost almost of that territory by 2009, it wasn't fully defeated. A small remnant lived on, holding on to the same ideology of conquest in the name of the caliphate — and eventually reconstituted itself as the ISIS that exists today.

Why ISIS's apocalyptic beliefs matter

Interestingly, McCants thinks ISIS's current caliph, Abu Bakr al-Baghdadi, isn't necessarily a true believer in the apocalypse prophecies the way his predecessors were.

"The leadership of the early Islamic State [in 2006 to 2010] seemed to have really believed these prophecies and acted accordingly," he told me. But "for the later leadership of the Islamic State, under Abu Bakr al-Baghdadi, the extent to which prophecy drives their behavior is unclear."

But if that's true, it only serves to highlight how important apocalyptic mythology is to ISIS as a whole. ISIS's apocalypticism is a key selling point for the group, which means that the group needs to act as if it believes it's bringing on the apocalypse even if individual leaders like Baghdadi don't really believe that's true.

For instance, ISIS invested significant resources into taking the Syrian town of Dabiq last summer. Dabiq has minimal military significance, but figures prominently in some of the apocalyptic prophecies that ISIS uses in its propaganda.

"You can say they capture the piece of territory because they believe the prophecy, or you can say they capture the territory because they want others to believe the prophecy," McCants said in our conversation. "But either way, they captured the territory. So the political impact [of the prophecy] is the same."

But perhaps more fundamentally, ISIS still holds to the prophecy-influenced idea that it needs to be an actual government, controlling and governing actual territory. That's the thing that makes ISIS different from, and more vibrant than, al-Qaeda and other jihadi groups active today. No other group has come this close to the dream of a modern caliphate. Its revival is at the heart of ISIS's appeal.

Yet the caliphate is also ISIS's Achilles heel. It means that, unlike the Taliban, ISIS can't simply fade away in the face of a stronger military force and launch a guerrilla war. It needs to keep holding on to territory if it wants to keep convincing recruits that it is, in fact, the prophesied caliphate. This forces the group to face its opponents head on in more conventional war — which is a huge problem, because ISIS has so many enemies in so many places. It's badly outgunned.

"I'm confident that the Islamic State's government in Syria and Iraq will crumble," McCants writes in his book. "No modern jihadist statelet has provoked international intervention and survived."

It would almost certainly be wrong to credit ISIS's counterproductive focus on holding territory entirely to its apocalyptic ideology. The fact that this is a motivation doesn't mean it's the only one.

But as McCants's work shows, ISIS's ideological origins continue to shape the group's actions today. If we fail to understand that, we will also fail to fully understand the group's strategy, its strengths, and its weaknesses.