On February 15, 1989, I was on duty in the White House Situation Room as a Soviet general retreated across a bridge from Afghanistan into the USSR, ending the Soviet intervention in Afghanistan. While the aides and officials in the Situation Room 30 years ago traded high fives and toasted “victory” in their decade-long campaign, they had no clue that the poorly done, partial agreements that had “ended” the war in Afghanistan had instead set in motion forces that resulted in more tragedies and continue to bring us threats today.

That troop pullout was the final step in a series of peace talks in the late 1980s among the USSR, the US, Pakistan, the Afghan mujahedeen and others. But those talks, at the insistence of the mujahedeen and Pakistan, never included the then-Afghan government and did not include any representatives of the vast majority of Afghans. Nor did the talks cover key issues for a real peace such as creating a stable political system, building a working economy, and ensuring social justice and accountability.

“ According to a recent Asia Foundation survey, 82 percent of Afghans have no sympathy for the Taliban and 90 percent say they fear it. ”

That faux peace, as we now too sadly know, did not end violence in Afghanistan. Rather, it led to a vicious civil war, the rise of the cruel Taliban regime, massive abuse of women, hundreds of thousands of casualties, millions more refugees and an Afghanistan that continues to suffer from violence. For the rest of the world, that poorly done peace accord unleashed chaotic forces that led to the emergence of al Qaeda and its offshoots such as ISIS and Boko Haram, dealing destruction and terror from New York to Indonesia.

On February 25 in Qatar, a U.S. team led by Ambassador Zalmay Khalilzad convened the latest in a series of talks with the Taliban aimed at ending the war in Afghanistan, or at least the U.S direct role in that conflict. At the insistence of the Taliban, the talks do not include the Afghan government or any representatives of the more than 90 percent of Afghans who oppose and fear the Taliban, giving today’s talks an eerie similarity to those that failed 30 years before.

After a round of peace talks earlier this year with the Taliban, Ambassador Khalilzad, who was a key diplomatic adviser to the U.S. team in the 1980s talks, announced that the U.S and the Taliban had arrived at a “framework” agreement for withdrawal of U.S. troops and a Taliban assurance they no would no longer support terrorist groups.

Khalilzad has stated that some form of “intra-Afghan talks” and a ceasefire should also be part of an agreement and that “nothing is agreed until everything is agreed.” But those assurances are being met with doubt by many Afghans who remember the way the U.S. abandoned Afghanistan after the defeat of the Soviets and the way the U.S. turned much of Afghanistan over to abusive warlords in 2001 when the U.S. sought a quick “victory” in Afghanistan before shifting to its major target, Iraq.

The Soviet withdrawal in 1989 did not lead to peace nor did the U.S. abandonment of Afghanistan in the 1990s make the U.S. more secure. Likewise, a bad peace today is likely to lead to even greater disasters. Already in Afghanistan young people and ethnic and religious minorities are forming armed groups, seeking weapons and preparing to defend themselves if the Taliban return under the guise of peace.

Without the presence of the Afghan government at the peace talks, without a voice for the vast majority of Afghans, these talks will lead to an unfair, unbalanced “peace” agreement that will quickly unravel and cause Afghanistan to descend into chaos once more, but in an even more unstable and dangerous surrounding environment. If not ISIS or al Qaeda, some other new force is likely to emerge with even greater capability to harm the U.S.

To forestall this, it is vital that the U.S. stop allowing the Taliban to set the terms for the talks. The Afghan government must be present at the talks now and that Afghan government presence must be accompanied by empowered representatives of women, young people and minorities.

But the U.S. is so far placing its faith in an illegitimate, non-state actor, which has been funded by narcotics trafficking and other illicit activities and which is feared by most Afghans.

According to a recent Asia Foundation survey, 82 percent of Afghans have no sympathy for the Taliban and 90 percent say they fear it. The harsh, backward rule of the Taliban before 2001, which continues in areas the Taliban control today, still weighs on Afghan minds. Even some who supported the Taliban lost their confidence when the group brazenly lied for nearly three years about the death of their leader Mullah Omar.

If U.S. negotiators continue on this current path—driven mostly, it seems by a dangerous over-eagerness to wash our hands of Afghanistan—there will be a reckoning. It could take months or even years. But our rush to to leave, to claim a hollow victory and to send our dedicated troops home will be paid for by the blood of Afghans at first, but in the future by the sufferings of many others. And Afghanistan will likely lose the many remarkable social, democratic and economic gains of the last 17 years.

If the U.S. follows the path the Soviets took and hides behind a fig leaf of saying that the future of Afghanistan is up to the Afghans themselves, without a role for others, we are ignoring that it was the U.S. that, in 2001, brought back into power the same corrupt warlords who created the civil war that enabled the Taliban’s rise.

Those warlords joined former Afghan President Hamid Karzai, a harsh critic of the U.S., in meeting the Taliban in Moscow only a few weeks ago, again with no representatives of the Afghan government or Afghan youth present. If this is what Afghan leadership will look like in the future, we are headed for danger and chaos.

As the U.S. learned from a hasty exit from Iraq that helped bring about the rise of ISIS, acting from a short-term perspective can require us to go back in to fix our mistakes. The current trajectory of the Doha talks with the Taliban risks intensifying security threats to the U.S. and, over the long-term, is likely to be far more costly than acting deliberately now, working with the Afghan people and government to construct an enduring peace.

The United States invested dearly over the last 17 years to help educate and empower Afghan women, nurture the country along a path to democracy, build and sustain an independent media, and plant seeds of economic prosperity. It will be a stroke of epic hypocrisy for the U.S. to leave Afghanistan now, when the country needs us as a backbone of security and stability—especially if the terms of our departure facilitate a Taliban return to power.