Want smart analysis of the most important news in your inbox every weekday along with other global reads, interesting ideas and opinions to know? Sign up for the Today’s WorldView newsletter.

A few weeks ago, Afghanistan marked the 31st anniversary of the last Soviet soldier leaving the country. Over the weekend, the Trump administration heralded the beginning of the end of the United States’ near two-decade-long military presence in the country. The development came after the United States agreed to a truce with the Taliban, a timetable for future talks between Afghanistan’s warring parties and a tentative plan for pulling out U.S. troops. Afghans and Americans can only hope that the aftermath of these negotiations won’t lead to the same instability and state collapse that ultimately followed the Soviet withdrawal decades ago.

The legacy of the Soviet intervention has always hovered over America’s own “forever” war in Afghanistan, even as top U.S. officials waved away the analogy. Key Taliban officials involved in the talks, including deputy leader Mullah Abdul Ghani Baradar, fought on the side of the U.S.-backed mujahideen in the 1980s against the Soviet occupation. Now, they are preparing once more for a foreign power’s departure.

Over the course of the next five months, the United States may draw down its troop levels in Afghanistan to roughly where they were by the end of the Obama administration. A complete withdrawal could follow within 14 months, U.S. officials indicated. All of this remains contingent on security guarantees from the Taliban that Afghan soil will not be used by terrorists with aims to attack the United States or its allies, as my colleagues reported.

In a news conference Saturday, President Trump suggested that not only would the Taliban be ceasing its hostilities against Afghan forces and their U.S. allies, but also joining the fight against more radical elements in the country, including affiliates of the Islamic State. “They will be killing terrorists,” Trump said, “killing some very bad people. … We very much hope they will be doing what they said.”

After months of tangled diplomacy, now comes the even tougher work of forging a comprehensive pact between the Taliban and the government in Kabul. “The agreement includes a Taliban commitment to start direct negotiations with the Afghan government over a cease-fire and political settlement of the war within 10 days,” explained The Washington Post’s Karen DeYoung. “Those negotiations, tentatively to be held in Norway, are already complicated by political upheaval in Kabul, where President Ashraf Ghani’s recent reelection is under challenge and there are major fights over the composition of a negotiating team.”

And by Sunday, just a day after Trump hailed “successful negotiations,” there were already signs of trouble. Ghani raised objections to the release of 5,000 Taliban fighters held by the government — a Taliban demand that, per the U.S. agreement with the Taliban, is supposed to be met by March 10. Kabul wants to keep the option of releasing the prisoners as part of its own negotiations with the Taliban, which the U.S. move would complicate. Afghan officials also reported that they had received reports of the Taliban abducting Afghan police officers as part of the militants’ own bid to amass leverage ahead of the talks.

There are myriad other concerns with the nature of the American agreement, not least that it could endanger the hard-won gains of women in Afghan politics and civil society.

“How can we expect the Taliban and the warlords to treat us as equals when the lead negotiators have refused to give us a seat at the table?” asked Mary Akrami, Sahar Halaimzai and Rahela Sidiqi, Afghan activists, in a column for USA Today. They lamented that elected Afghan female politicians weren’t included in the U.S.-Taliban talks and warned of the perils posed by Kabul’s current political crisis.

“We know from previous experience that without a seated, elected, inclusive government based on the results of the elections, this peace deal will be little more than a division of power and resources among the Taliban, the warlords and the political strongmen,” they added.

Meanwhile, Trump’s overtures to the Taliban have bucked the trend in bitterly partisan Washington. Numerous Republican hawks bemoaned the administration’s concessions to the militants. And, though organizations that represent the progressive left cautiously welcomed any step to ending a 19-year war, they argued that Trump’s approach was no guarantor of meaningful peace.

Some longtime observers pointed to the missed opportunities of Trump’s predecessors, who balked at earlier openings for talks with the Taliban. “In the early days, the U.S. and its Afghan clients were so triumphant about their apparent victory, and the wounds of 9/11 and the Afghan civil war so fresh, that they sneered at negotiations,” wrote the Daily Beast’s Spencer Ackerman. “Later, when the Taliban insurgency showed the folly of that decision, the U.S. preferred to fight on in the similarly elusive hope that more violence would mean more leverage. Instead, over the course of 19 years, the Taliban simply strengthened their own.”

In December, my colleagues revealed a cache of internal government reports that detailed the depth of cynicism and doubt felt by U.S. officials about their strategy in Afghanistan. It painted a gloomy portrait of an American war effort in an “unwinnable” conflict, tethered to a dysfunctional and corrupt Afghan political apparatus, as well as the sort of imperial delusions that underlay the Soviet Union’s own decade-long imbroglio.

“Afghanistan has bled from wars not of its own making for over 40 years,” wrote Barnett Rubin, a former adviser to U.S. special envoys to Afghanistan, in an essay last week. “An open-ended U.S. military presence without a settlement, or continuing a war with no clear objective or prospect of success, would waste resources and sacrifice innocent lives to fears and misconceptions. War is sometimes a necessity, but it can also become an addiction. It is time to break the habit.”