Operations in Afghanistan, particularly when combined with Iraq, created a lot of challenges for the military. It ate up funds. It exhausted military personnel. It divided factions of the country, as wars so often do.

But it also sucked the oxygen out the room. And it forced the U.S. to turn its attention away from the rest of the world, at a time when technology erupted.

With all eyes on counterterrorism efforts, missile defense dimmed as a focus. I don’t believe anybody in the Pentagon or within the services underestimated the threat, but North Korea was then, as it is now, irrational. Today that only amplifies the danger, particularly as North Korean leadership has become louder and made good on certain threats. But then it seemed instead to be more reason to not take the North Korean threat so seriously. At least not just yet.

Now consider electronic warfare. While Afghanistan brought great progress in unmanned – how drones can be used not only for surveillance and reconnaissance but also for combat operations – progress in EW ground to a near halt. Army leadership has acknowledged that while Russia was investing all sorts of energy into electronic warfare the U.S. was focused on Afghanistan.

And now we see China likely to eclipse America as the dominant force in artificial intelligence, says Google’s top exec Eric Schmidt. By his estimation, China will have caught up by 2020. by 2025, China will be better.

Priorities always shift during wartime. It’s impossible to continue investing in perceived or future threats in the same way that you might during peacetime. And perhaps the distraction that came during the last 15 years would be less of a concern if not for the unfortunate timing. These technologies, which before were pie-in-the-sky concepts, now define the future of warfare. We’ve fallen behind.

It would be wrong to describe Operation Enduring Freedom as traditional warfighting. It has not been that. Al Qaeda and the Taliban were unlike any adversary the U.S. military had encountered before. And soldiers and airmen have learned plenty.

But will our next operation resemble Enduring Freedom? When you consider the adversaries of today, that seems incredibly unlikely. Jamming capabilities that can take out communications systems; directed energy or anti-radiation weapons that obliterate combat capability; cyberattacks that either infiltrate military platforms or target domestic critical infrastructure – those scenarios encapsulate the future of warfare. And the R&D that ensures the U.S. is not only capable of such tactics but also able to defend against them is not happening. Not enough. We’re left to catch up, all amid talk by the Trump administration of the next iteration of an Afghanistan strategy.

Schmidt called for a “Sputnik moment” to focus efforts toward a definitive technological edge. He was talking about AI. But for the sake of global security, we just may have to think a whole lot bigger.