History will record that the Islamic State caliphate—a bizarre pseudo-state founded on illusory goals, created by a global horde of jihadis, and enforced with perverted viciousness—survived for three years, three months and some eighteen days. The fall of Raqqa, the nominal ISIS capital, was proclaimed on Tuesday by the U.S.-backed militia that spearheaded the offensive, a coalition of Kurdish and Arab militias advised by U.S. Special Forces. Mopping-up operations were still going on (especially around the Raqqa stadium, which ISIS fighters had converted into an arms depot and prison), but the liberation of Raqqa marked the symbolic demise of the Islamic State’s rule.

“How far they’ve fallen. It’s a striking contrast to three years ago, when they planted the flag, in the summer of 2014, and proclaimed God’s kingdom on Earth had come again—and now they’ve evaporated,” Will McCants, the author of the best-selling book “The ISIS Apocalypse: The History, Strategy, and Doomsday Vision of the Islamic State,” told me.

“There are other places for ISIS to go and survive, but there’s something special about Syria and Iraq and the Fertile Crescent,” McCants, a fellow at the Brookings Institution, said. “It’s the theatre of prophecy. It’s where the apocalyptic drama unfolds. It’s the heartland of the historic caliphate, and it’s the scene of the final end-of-times drama, as predicted by Islamic scripture. Nowhere else in the Islamic world compares with it."

McCants said that the fall of Raqqa, a city that was once home to more than two hundred thousand Syrians but is now mostly destroyed, will weaken the group’s ability to recruit fighters and inspire attacks. “The fight will go on, and ISIS will morph into an insurgency and may try to reëstablish another state, but, for now, it’s a crushing blow,” he said. “ISIS put all its chips on creating a state and taking territory as proof of its divine mandate. Some of its followers now have to have doubts.“

At its height, the Islamic State was about the size of Indiana, or the country of Jordan, with eight million people under its control. ISIS transformed the world of jihadism by recruiting tens of thousands of followers from five continents—faster, in larger numbers, and from further corners of the Earth than any other modern extremist group. The caliphate was formally declared by Abu Bakr al-Baghdadi on June 29, 2014, from a pulpit in the Grand Mosque of Mosul, the largest city under ISIS control. It, too, was liberated, in July, after a gruesome nine-month offensive by Iraqi security forces.

ISIS still holds bits and pieces of territory in both countries. But it no longer rules. Baghdadi, an Islamic scholar who was detained by the U.S. military in Iraq for almost a year, in 2004, as prisoner number US9IZ-157911CI, has not been sighted in public since the unveiling of his caliphate.

At a press conference on Tuesday, Army Colonel Ryan Dillon, a spokesman for the U.S.-led coalition supporting the campaign against ISIS, said, “Over all, ISIS is losing in every way. We’ve devastated their networks, targeted and eliminated their leaders at all levels. We’ve degraded their ability to finance their operations, cutting oil revenues by ninety per cent. Their flow of foreign recruits has gone from about fifteen hundred fighters a month down to near zero today. ISIS in Iraq and Syria are all but isolated in their quickly shrinking territory.” Brett McGurk, the Special Presidential Envoy for the Global Coalition to Counter ISIS at the State Department, tweeted that an estimated six thousand fighters had died in the battle for Raqqa.

Yet the organization is not dead. Nor are all its leaders. Hundreds of fighters have fled south to regroup in the lawless borderlands of the Euphrates River Valley between Syria and Iraq. Their zealotry will endure, in different forms and perhaps under different banners. ISIS also claims some three dozen wilayats, or provinces, spread from Algeria to the Philippines—across North Africa, the Middle East, South Asia, and Southeast Asia—that have, at various times, pledged loyalty to the caliphate. Some are dormant. Others are small. All have been deadly.

The National Consortium for the Study of Terrorism and Responses to Terrorism (START) collects data on ISIS bombings, beheadings, and other slaughters. Last year, the group’s most violent province was in Libya, where ISIS fighters conducted a hundred and eighty-three attacks, killing more than three hundred people. In Egypt, the Sinai province carried out a hundred and fifty attacks; more than three hundred and seventy people were killed. In Afghanistan, ISIS’s Khorasan province killed more than eight hundred people last year, in more than a hundred attacks.

Data may not be the most important barometer of the group’s strength, however. “The issue is not where they’re strongest in numbers but where they can destabilize the fastest,” Bill Braniff, the executive director of START, based at the University of Maryland, told me. That’s why burgeoning ISIS attacks in Libya, Egypt, and Afghanistan are more worrisome than the death tolls may indicate. The sociopolitical factors behind the emergence of extremist groups, such as ISIS and Al Qaeda, are important, too.

“When we use an organization as our unit of analysis, we can conclude that there is an end to the threat,” Braniff said. “But if we look at movements that have thrived over time—despite the fact that numerous organizations have come into and out of a movement—we can come to different conclusions. If we look at ISIS, it’s the end of [the] caliphate. But, if you look at the movement, have any of underlying drivers that produced ISIS been mitigated? The answer is no.”

In other words, the current caliphate may have collapsed, but serious dangers lie ahead, because the tensions and drivers that produced ISIS loom even larger today than when it emerged.

“Only a fool would call this a victory,” Hassan Hassan, a co-author of the best-selling book “ISIS: Inside the Army of Terror,” told me. “It’s only the expulsion of ISIS fighters from a wasteland. It’s not a victory, not only because of the destruction. It’s also not a victory because there’s a shameless lack of a political track to supplement the military track. That’s the Achilles heel of Operation Inherent Resolve. They don’t have a political vision about what will happen after ISIS.”

Operation Inherent Resolve is the U.S.-led coalition of sixty-nine nations and four partner organizations that has orchestrated the military campaign against ISIS and provided air power in both Syria and Iraq. Since 2014, its lone goal has been to end the caliphate, not to solve the broader problems that gave rise to ISIS, especially in Syria. The United States, under both Democratic and Republican Presidents, has resisted getting militarily involved in Syria’s grisly six-year civil war.

The U.S. air strikes in Raqqa have taken a devastating toll on the city’s civilian population and physical infrastructure as well as on ISIS. The civilian death toll from air strikes is more than a thousand, according to Syrian activists and international monitors, while much of the northern part of the city has been destroyed. More than two hundred thousand Raqqa residents have fled; many now have little to return to.

Ironically, Raqqa was a place where the United States provided early aid to help build political opposition to the regime of President Bashar al-Assad after the Arab Uprising, in 2011. The U.S. provided fire trucks, ambulances, garbage trucks, generators, and other infrastructure for the local council that emerged to provide alternative rule. When ISIS swept in, in 2014, it commandeered the American-funded equipment. Much of it is believed to have been destroyed by U.S. air strikes. Raqqa will be starting almost from scratch in rebuilding, politically and physically, at a time when Syria is still engulfed in a civil war.

“You need to turn these areas into something better than ISIS, better than what people have seen over the past three years. That’s on the micro level,” Hassan told me. “On the macro level, regardless of what the U.S. says, there’s no appetite to do something to resolve the Syrian conflict, with Assad—the core problem.”

Unlike Mosul, which returned to Iraqi sovereignty automatically after ISIS was defeated, Raqqa will be contested. U.S. officials insist that the local population—particularly Sunni Muslims—does not want to be subjected to the rule of the Assad dynasty, which is Alawite. Legally, however, Raqqa is still part of Syria, and Assad is likely to be backed in any claim to the area by his powerful Russian, Iranian, and Lebanese allies.

So the ISIS caliphate may have faced an ignominious defeat, but the Syrian quagmire is far from over. And that may eventually fuel the flames of new dissent, angry new forms of opposition, and, potentially, other manifestations of extremism.