The U.S. war in Afghanistan is winding down, and Pakistan has won. The basic outline of the agreement negotiated by U.S. Special Envoy Zalmay Khalilzad is nothing new: The United States withdraws its forces in exchange for a Taliban pledge not to associate with terrorism or allow Afghanistan to be used as a safe-haven for terror groups.

There problems with the agreement are many. Proponents of diplomacy with the Taliban often say that wars can only end through diplomacy. “You don’t make peace with your friends. You have to be willing to engage with your enemies if you expect to create a situation that ends an insurgency,” Secretary of State Hillary Clinton explained. But the agreement outlined by Khalilzad is little different from that which Clinton administration officials struck with the Taliban in the years prior to 9/11: At the time, the Taliban promised to foreswear terrorism and quarantine Al Qaeda leader Osama Bin Laden. The subsequent terrorist attacks in New York and Washington underscored their insincerity. Perhaps the Taliban have changed, but not necessarily for the better, as the uptick in attacks throughout Khalilzad’s negotiations show. In many ways, President Donald Trump and Khalilzad seem to have embraced the John Kerry school of diplomacy, in which desperation for a deal substitutes for bringing leverage to bear and credibly convincing adversaries that failure to bargain will mean for them a far worse fate.

A more fundamental problem is Pakistan. The Taliban would not exist without Pakistani support. While Khalilzad and diplomats shroud negotiations in the idea of bringing peace between Afghan factions, the Taliban negotiators were based in Qatar and answered to leadership in Quetta which in turn took direction from Pakistan’s Inter-Services Intelligence in Islamabad. Once upon a time, Secretary of State Colin Powell spoke about the possibility of negotiating with “moderate Taliban.” He was pilloried at the time but, even if bringing the Taliban into a big tent is now preferable, these were not the Taliban with whom Khalilzad negotiated, but rather their more extreme Pakistan-controlled cousins. Simply put, the Taliban are to Pakistan what Hezbollah is to Iran.

There is also the fundamental problem of legitimacy: The Taliban justify their insurgency and terrorism in the fact that they, and not President Ashraf Ghani’s administration, are the legitimate rulers of Afghanistan. By cutting Ghani’s elected government out of negotiations, Khalilzad played to that Taliban conceit. But the logical problem remains: If the Taliban believe they are legitimate in the eyes of the Afghan public, why not simply put their weapons down and run in the elections? The answer is simple: Most Afghans see the Taliban as foreign puppets and would never cast their ballots for them. Certainly, most Afghan women would not, nor would most Afghan ethnic groups. Americans might think of the Taliban simply as Afghan, but Afghanistan is an ethnic checkerboard, and most Afghans recognize the Taliban as Pashtun supremacists and racists willing to rape and murder minorities.

Trump wants to end a war that costs $30 billion annually. That is admirable. Put aside the fact that there are other strategies that could be brought to bear in order to compel Pakistan to cease terror support. But the basic error in his calculation may be that he has a choice between $30 billion and zero. The open secret—even among those towing Trump’s line—is that the Taliban deal will bring an American exit but not peace. Indeed, the net result could be far greater expense down the road. The Taliban continues to embrace and incorporate Al Qaeda’s philosophy and personnel. The Taliban safe-haven remains and will now expand. Refugee flows brought by renewed civil war can destabilize neighbors. Nor is there an international consensus about what terrorism is, giving the Taliban a semantic loophole through which they could drive a truck bomb. There is a strong possibility that today’s savings could cost the American people exponentially more should a Pakistani regime and their Taliban proxies high on victory decide to expand their fight, Khalilzad’s piece of paper be damned.

Nor does what happen in Afghanistan necessarily stay in Afghanistan. Speaking at the University of Hargeisa in Somaliland earlier this year, students and faculty asked repeatedly whether negotiations with the Taliban would mean that negotiations with Al-Shabab, an Al Qaeda affiliate in Somalia would be next. Even if that is not the plan, every militant group now understands that the way to advance their interests is not through the ballot box but through violence and terrorism. That is a legacy to the Taliban deal which will not be easy to overcome.

Michael Rubin is a resident scholar at the American Enterprise Institute.

Image: Reuters