So, as we look to 2019, it’s important to stay focused on landing a body blow against the Islamic State’s remnants in Iraq and Syria. That includes eradicating the last vestiges of the group’s network of fighters, supporting resurgent governance in the areas the group once held, developing sustainable intelligence sources and law enforcement options for the group’s terrorist network, and increasing the pressure against the group in what remains a virtual safe haven: the internet.

Defeating the Islamic State, at least in Iraq and Syria, begins with eradicating the group’s remaining fighters. (Its fighters elsewhere, such as in Libya and West Africa, will pose a considerable challenge for the foreseeable future, even as important American counterterrorism efforts against them continue.) Finding and targeting the Islamic State’s fighters is a considerable challenge, as they’ve largely been driven into an area of Syria where United States intelligence collection may have fewer inroads, where our main partners on the ground — the Syrian Kurds — have chosen not to follow, and where some local refuge may be available.

The areas successfully cleared of the Islamic State demand continued attention, too. It’s the absence and inadequacies of local governance that often allow terrorists to carve out a foothold in the first place; and the deadly civil war consuming Syria threatens to leave large swaths of the country effectively ungoverned. Working with international partners to provide the resources, training and diplomatic support needed for at least a bare minimum of governance to take root — a Sunni alternative to the horrific brand of governance offered by the Islamic State — is an urgent priority not just for counterterrorism but also for humanitarian reasons. And cutting such resources at this juncture is a dangerous recipe for a resurgent terrorist threat that plays into the Islamic State’s own narratives that only it is capable of governing, as the group indeed tried to do for a time.

The Islamic State has already adapted to its shrinking territorial control by putting in place an underground network that, from the shadows, can inflict destabilizing violence in Syria and Iraq, and potentially throughout the region. This is the same retreat from terrorist insurgency to terrorist network that we saw from Al Qaeda in Iraq; and it demands building U.S., Iraqi, and other partners’ intelligence capabilities to penetrate this network by disrupting its attacks, seizing funds, and detaining those sustaining the network.

Even with diminished territorial holdings, the Islamic State will still be able to radicalize and mobilize followers so long as the group retains a virtual safe haven online. Leading technology companies have stepped up their efforts to contest terrorists’ presence on their platforms, but terrorist groups have adapted, altering their content and regenerating accounts in ways that challenge the companies’ approaches and that connect with would-be followers just long enough to shift those followers into end-to-end encrypted chats to avoid detection. The United States must lead the way by sharing, to the maximum extent classification permits, the latest information on terrorist trends and tactics online with companies so they can use new and emerging tools to contest terrorists’ online foothold.