Iraqis carry the coffin of a victim who was kidnapped and executed by the Islamic State during a funeral procession in Karbala, Iraq, on June 28. (Furqan Al-Aaraji/EPA-EFE/Shutterstock)

Joshua A. Geltzer, senior director for counterterrorism at the National Security Council from 2015 to 2017, is executive director of Georgetown Law’s Institute for Constitutional Advocacy and Protection and a fellow at New America. Nicholas J. Rasmussen, director of the National Counterterrorism Center from 2014 to 2017, leads the counterterrorism programs at the McCain Institute for International Leadership and is professor of practice at Arizona State University’s Sandra Day O’Connor College of Law.

For all the haze obscuring President Trump’s real foreign policy agenda, one element is increasingly clear: He wants to get past terrorism and focus on other national security challenges.

As former counterterrorism officials, we sympathize with the sentiment, given the range of other serious threats facing America, from nuclear proliferation to global pandemics to climate change to Russian malign activity (even if Trump has trouble acknowledging the last two). But indulging that impulse to move on from terrorism is a recipe for aggravating the very terrorist threats that Trump hopes to leave behind.

Trump may be erratic on many aspects of national security but, when it comes to terrorism, he has been consistent in characterizing it as a problem he’d like over and done with. Trump’s National Security Strategy devoted just two of its 55 pages to a focus on terrorism. Similarly, his new National Defense Strategy explains that “inter-state strategic competition, not terrorism, is now the primary concern in U.S. national security.”

We see this reflected in foreign policy already. Trump has expressed eagerness to withdraw U.S. troops from Syria, even as the terrorist threat posed by the Islamic State and other groups there persists. The same could be said of Trump’s approach to Afghanistan, where he clearly has little interest in sustaining counterterrorism efforts, as evidenced by his criticism of U.S. military commanders and his grudging acceptance of a continued U.S. military presence.

Instead, Trump is more interested in spending time and political capital on what has been called his “great power” doctrine — jockeying with China, cozying up to Russia, antagonizing Iran, cutting deals with North Korea and so on.

Trump isn’t alone. Both his predecessors had this impulse, too. The George W. Bush administration did not at the outset prioritize U.S. counterterrorism efforts against the emerging al-Qaeda threat, despite some degree of warning from the intelligence community. The Bush team initially brought much greater focus, expertise and interest to matters involving China and Russia, but 9/11 swiftly made terrorism the Bush administration’s preeminent challenge.

President Barack Obama similarly grappled extensively with the disconnect between the relatively small number of American deaths inflicted by terrorism and the public’s demand for extensive counterterrorism measures. He delivered on a campaign promise to reduce America’s military presence in Iraq and emphasized his administration’s “pivot to Asia.” But the rise of the Islamic State dragged the United States back into Iraq as well as into Syria, forcing Obama to acknowledge that the campaign will be “a generational struggle.”

We understand the desire to “wrap up” counterterrorism problems. But rushing to focus on other challenges only increases the chances that terrorism yet again displaces everything else. Thousands of Islamic State fighters remain in Syria. And al-Qaeda and its affiliates continue to pose threats from Syria to Yemen to Somalia. For Trump to hurriedly withdraw forces from these places would invite the same sort of resurgent threat we saw in Iraq, where the lingering remnants of al-Qaeda revived themselves into the Islamic State.

The unfortunate reality is that the terrorism challenge will likely persist for the foreseeable future — and certainly longer than any administration’s time horizon. There may, of course, be spikes and lulls in the tempo of attacks, but the basic threat appears unlikely to disappear anytime soon, despite the important recent successes on the battlefield against the Islamic State.

Presidents must stop asking when they can be “done” with counterterrorism. Instead, they must focus on identifying the sustainable investments the United States needs for an ongoing defense and to go on the offensive whenever we need to neutralize a particularly grave threat. Only this approach can realistically keep Americans safe from terrorism while allowing presidents to focus on the growing storm of other national security issues.

Those sustainable investments need to come in several areas. First, the United States must continue to devote the resources necessary to maintain our military’s unparalleled capability to find, fix and finish terrorists around the world who pose an imminent threat to U.S. citizens. We should also continue to invest in explosive-detection technologies and perhaps in artificial intelligence or machine learning technologies that can secure our homeland.

Finally, we must continue to broaden and deepen our network of military, intelligence and law-enforcement partnerships around the world. This includes investing in the capacity of our partners with shared intelligence, training, technology and equipment. It also includes refusing to abdicate leadership responsibility in the effort to resolve persistent regional conflicts that give sustenance to terrorist groups.

Those are key ingredients that can make for a sustainable approach to counterterrorism. Any other strategy that rushes to get past today’s persistent terrorism threat is a recipe for disaster.