On October 16, 2001, Army Special Forces entered Afghanistan by helicopter, the first U.S. troops on the ground there since the 9/11 attacks. Since then, thousands of Americans have fought there, and over two thousand have died.

By almost every measure we have little to show for seventeen years of war. We and some of our NATO allies drove the Taliban out of Kabul, Afghanistan’s capital, in November 2001. Since then, the Taliban have maintained the fight. As of October 2017, the government controlled only 56% of Afghanistan, down from 72% in 2015. The Taliban control or are still fighting in about 30% of Afghanistan.

They are able to do so for several reasons. First, because our nation-building strategy is bankrupt and cannot work against an enemy driven by Islamic ideology in a religiously sympathetic population. Second, because of the support the Taliban receive from Russia, Pakistan, and probably China. We know that Russia is sending arms to the Taliban and possibly funds as well. Pakistan — about which more in a minute — is using the Taliban as a proxy force, supporting them with arms and personnel.

This month’s five-day battle for the city of Ghazni in eastern Afghanistan is the most recent measure of our lack of success.

Ghazni is only about 80 miles outside of Kabul. The large Taliban attack on August 10 caught the Afghan government’s forces — and our advisors — by surprise. At least thirty Afghani soldiers and policemen, as well as an estimated 300 Taliban fighters, were killed in the battle and the Taliban were forced to withdraw.

Lt. Col. Martin O’Donnell, spokesman for U.S. forces in Afghanistan, told CBS News that the Taliban’s abandonment of a captured base in Ghazni “…speaks yet again to the fact that the Taliban cannot hold terrain.”

Let’s not pick on O’Donnell. He’s only the messenger for his commanders. His remark only reflects that the Army is still trying to think of how better to win the Battle of the Bulge rather than deal with the strategic and tactical realities of Afghanistan. O’Donnell’s remark betrays a serious failure in strategic and tactical thinking.

It doesn’t matter one bit that the Taliban can’t — or decide not to — hold captured terrain. The Taliban — like the Viet Cong and North Vietnamese before them — win by not losing. They win by demonstrating that they can inflict large casualties on the Afghan government’s forces almost at will. They win by demonstrating, as they did in Ghazni, the Afghan government’s — and our — inability to provide security in every city, village, and hamlet.

Let’s take this analysis to the next logical step. The Taliban aren’t “insurgents,” we are. They espouse the radical Islamic ideology which took root in Afghanistan no later than the first British invasion of Afghanistan in 1839-1842. At every instance since then, from the second British invasion in 1878-1880 through the Soviet invasion from 1979-1989 and including our campaign against the Taliban that began in 2001, outsiders — non-Muslims — have been the natural enemy of the Afghanis.

That’s not to say that the Taliban are loved by the Afghan people. What it does mean is that, as I’ve written so many times before, the center of gravity in our Afghanistan war, just like the war on terror generally, is the enemy’s ideology. We’ve not even begun fighting that ideology, far less defeating it. Pakistan is supporting that ideology because it shares the same ideology that drives the Taliban.

After the battle for Ghazni, a highly reliable source tells me, 126 of the Taliban’s dead were shipped to Pakistan and received there as honored dead. Though we cannot be certain, that fact indicates that those 126 were Pakistanis who Pakistan armed, funded, and placed under Taliban command. (The Afghan government claims that Chechens were among the dead in Ghazni.)

If we draw the necessary conclusion that the Pakistani government is treating the Taliban as a proxy force, President Trump needs to increase the pressure on Pakistan. He has begun, slowly, to pressure Pakistan to stop supporting terrorism. In January he stopped military aid to Pakistan, which cut off about $1.3 billion in funds. In March, Trump sanctioned seven Pakistani companies for engaging in trade of nuclear materials and technology. Earlier this month, the president cut the number of Pakistani officers who can attend military schools in the U.S.

The president needs to up the ante in sanctioning Russia as well. Increased economic sanctions on Russia — tied directly to its support of the Taliban — could damage Russia’s economy significantly.

Trump may not be able to do much more. As I’ve written before, China is in the process of turning Pakistan into a tribute state through its “debt trap” diplomacy. Investing about $62 billion in Pakistani infrastructure, the Chinese have built a strategic presence in Pakistan. Any aid we provide the Pakistanis will only accelerate China’s acquisition of Pakistan.

What to do?

Trump is, like it or not, following the same failed nation-building strategy that entrapped presidents Bush and Obama. It has failed in Iraq and Afghanistan. What we need is a bottom-up revision in our strategy which replaces nation-building with a new strategy that aims to defeat the Taliban’s ideology and prevent Afghanistan from returning to its pre-9/11 stage as a platform for terrorists to mount attacks against us and other Western nations.

After the Taliban attack on Ghazni, it’s clear that our intelligence isn’t sufficient to determine how, where, or when the Taliban will attack. We have to assume that this result is despite the best efforts of the CIA and NSA, including the use of spy satellites, to obtain this information.

It’s much easier said than done, but we should shift our intelligence focus to discovering how Russian arms are being sent to the Taliban, to find Taliban strongholds and the places in which their commanders meet. That is certainly being done, to some degree, but how well that intelligence is turned into action is another question entirely. That will lead to a different kind of surge.

Our ground troops in Afghanistan should be mostly withdrawn and limited to those required to protect the airpower we have there — Air Force and Navy bombers and attack aircraft — which should be tasked to attack those Taliban strongholds and gathering places even if they are in Pakistan. They should operate independently of both the Afghani and Pakistani governments, just as our special forces did in the 2011 raid that killed bin Laden. Special forces need to stay in Afghanistan as well, identifying those targets and killing the Taliban’s leaders wherever they are found.

As the Afghanistan war approaches its seventeenth anniversary, we have to recognize that what we’re doing isn’t working and that it may take many more years — perhaps decades — to make a new and more effective strategy work.

We will be in Afghanistan for the foreseeable future. As much as the president wants to end this war, at this point there’s no path out of it that can end the threat that can come from Afghanistan just like it did on 9/11.

These are the lessons of the Ghazni battle. There is very little chance we will learn and apply them.