The end was closing in on them. Not two months after the U.S. invaded Afghanistan in 2001, the Taliban’s Kandahar stronghold was about to fall to its Northern Alliance antagonists.

The Taliban leader, Mullah Mohammed Omar, commanded his forces in the city to seize “the best opportunity to achieve martyrdom.” But after a week they acquiesced to their new reality. They offered to surrender Kandahar and demobilize, relegating their five-year rule to a few northern and eastern pockets where fighting persisted. “I think we should go home,” announced Mullah Abdul Salam Zaeef, the Taliban spokesman, on Dec. 7.

They had a condition. Omar had to remain in Kandahar, albeit under mutually acceptable supervision. Hamid Karzai, head of the new internationally backed Afghan government, was open to it, provided Omar “distance himself completely from terrorism.” Asked by the Associated Press about the terms of Omar’s quasi-captivity, the new leader said those were “details that we still have to work out.”

Karzai’s American patrons had other ideas. "I do not think there will be a negotiated end to the situation that's unacceptable to the United States," said Donald Rumsfeld, the U.S. secretary of defense.

Could Omar live, as his spokesman had implored, “with dignity”?

“The answer is no,” Rumsfeld said at the Pentagon. “It would not be consistent with what I have said.”

No one will ever know what would have happened if Rumsfeld and the George W. Bush administration had permitted Karzai and Omar to work out a deal—whether it would have held, whether the Taliban would have truly broken with al Qaeda, whether Afghanistan would have known peace. But there is brutal certainty about what happened instead: 2,298 dead U.S. servicemembers and at least 43,000 dead Afghans in a war the U.S. fought for a generation rather than admit it could not win.

“ The Trump administration, in by far its most laudable foreign-policy act, is on the verge of a peace agreement with the Taliban. ”

The Trump administration, in by far its most laudable foreign-policy act, is on the verge of a peace agreement with the Taliban. Official details about the U.S.-Taliban deal, likely to be signed Saturday, are scarce. Nothing about what follows is certain, not even whether it augurs the end of the war: Defense Secretary Mark Esper said last week that the U.S. expects to draw down to 8,600 troops, around the force levels it inherited from the Obama administration, while the Taliban insist the U.S. must withdraw entirely. Arduous negotiations await an Afghan government that is deeply divided internally and was brought into these peace talks reluctantly.

Whatever emerges, Trump—to his credit and to the shame of those Trump critics who consider themselves more responsible stewards of U.S. foreign policy—has shattered the generation-long American political cowardice that inhibited negotiating an end to the war.

At least three times over the past 19 years that the U.S. could have had such a deal, on terms at least as favorable to Washington as the one reached now, and likely better.

The first was the 2001 surrender offer. Another opportunity arose in 2003. The third came amid Obama’s 2010-11 troop surge.

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. 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.

“The outcomes we could have gotten a decade earlier, two decades earlier, would have been far stronger,” lamented retired Army Col. Chris Kolenda, who was part of the failed 2011-12 peace effort and has ever since urged the U.S. to negotiate with the Taliban. “It’s a missed opportunity,” assessed Ali Jalali, the former Afghan interior minister whom the Taliban contacted in 2003 to explore a deal.

“ At least three times over the past 19 years the U.S. could have had such a deal. ”

All of which is another way of saying that America’s fantasies of what it could achieve in the war, even after it became a Washington cliché that the war had no military solution, consigned thousands to needless deaths.

Jalali was a retired Afghan Army colonel, trained by the U.S. and elevated to interior minister in January 2003. Ahmed Rashid, in his 2008 book Descent Into Chaos, describes Jalali as a reformist who operated as a check against corrupt officials and the clique of ex-Northern Alliance figures who dominated the early Karzai era. They doomed what Jalali, in his 2017 book A Military History of Afghanistan, calls the second of the “two major opportunities for a comprehensive peace deal with the Taliban.”

In the spring of 2003, a Taliban emissary discreetly approached Jalali in Kabul—as others did Karzai and military potentate Marshal Mohammed Fahim—to see if a new modus vivendi was possible. The Taliban was in a liminal state. Its leadership was in Pakistan under the protection of Pakistan’a Inter-Services Intelligence (ISI), but its insurgency had yet to fully coalesce. The ISI pressed the Taliban to cross the border back into Afghanistan and fight. Once there, however, its fighters received recruitment feelers from rival extremist factions; if they balked, the rivals would report their locations to U.S. and coalition forces for attack. “There were pressures all around” on the Taliban, Jalali recalled.

Nonetheless, in 2003, the Taliban raised the price for a deal. They wanted immunity from prosecution and coalition attack, something hardly assured in U.S.-patrolled, Northern Alliance-dominated Afghanistan. If so, they would give up their insurgency and become something like a political party in the new internationally-guaranteed regime.

At the Afghan national security council, several figures, including Jalali, argued it was worth exploring. “Their demands were simple and reasonable, but lacked details,” he remembered. But the officials who had spent years fighting the Taliban were no more interested in peace than Rumsfeld was. If Taliban fighters wanted to surrender as individuals, that was to be embraced. Those who didn’t would be crushed by the U.S.-Kabul alliance. After all, they were winning.

“ The Taliban let it be known they were done with Karzai—his government was America’a puppet, so they would only deal with America. ”

“We discussed it for weeks. At the time, it was considered inside Afghanistan that the Taliban was a spent force [and] they cannot be given that kind of concession,” Jalali told The Daily Beast. “Later they said the Taliban can lay down their weapons and surrender. No unconditional immunity. This was the mentality.”

Jalali believes the Americans knew little beyond the broad outlines of the Taliban proffer. They were disengaged from Afghanistan and preoccupied with the invasion of Iraq.

The majority of the Afghan government were the spoilers, even though Jalali said Karzai was, as in 2001, open to a deal. “The political context then was favorable to the Afghan government and coalition forces and unfavorable to the Taliban. Therefore, a settlement was easier to reach, a sustainable one,” Jalali explained. In the end, the Karzai government never sent an official response to the Taliban. The Taliban’s response was to launch in earnest what Jalali calls the Second War of the Taliban.

That war intensified over the coming years. In 2008, it had killed 100 U.S. troops, more than any year thus far, signaling Taliban strength and drawing American alarm.

Newly elected President Barack Obama responded by ordering two rounds of troop escalations—first 23,000 by March and another 30,000 in December—bracketing an embrace of an expansive counterinsurgency seeking to retake land from the Taliban. But the July 2011 date Obama set for the end of the surge outpaced any plan for ending the war.

By late 2010, with the date to end the surge approaching, the Obama team decided to see if a deal with the Taliban was achievable. It was a heavy lift. Both the Taliban and the U.S. were internally divided about the merits of a diplomatic accord.

The Taliban let it be known they were done with Karzai—his government was America’a puppet, so they would only deal with America. As united as the Obama team was in insisting the war had no military solution, it had a harder time envisioning a political solution.

“ Trump initially seemed to follow Obama’s template. ”

Veteran diplomat Richard Holbrooke found himself undermined by military commander David Petraeus, who felt himself undermined by Holbrooke’s diplomacy—which, in his view, relied on his war effort for leverage, anyway. “As long as you don’t talk about ceasefires, then I’ve got no issue with it,” a colleague quoted Petraeus saying in Mark Landler’s book Alter Egos. Petraeus instead sought “reintegration,” a cousin of the insistence on surrender that killed the 2001 and 2003 offers.

“From the standpoint of the U.S. military, throughout that period, [there was] a persistent preference for trying to improve the US/Afghan-government position on the battlefield before negotiating. That’s one thing that got in the way of prioritizing the effort,” said Laurel Miller, a former senior U.S. diplomat focused on Afghanistan.

U.S. outreach to the Taliban, done behind Karzai’s back, did not get the chance to yield anything substantial. It was clear that the Taliban, in a vastly stronger position since they last sought an accord, would have a higher asking price for peace.

Despite Secretary of State Hillary Clinton raising hopes for a deal in a February 2011 speech, Obama’s team had their doubts that their Taliban interlocutor, Tayeb Agha, had sway with Omar, who, as the surge drew to a close, urged Obama to make “important and tough decisions.” They would not get that far.

In 2012, the U.S. and the Taliban reached a preliminary agreement to permit the Taliban to open a political office in Qatar. It was little more than a confidence-building measure, but Karzai was livid and rejected it, something the Obama team, which had untruthfully sworn the peace process would be “Afghan-led,” accepted as final.

Envoy Marc Grossman told Agha that Karzai’s rejection doomed their deal. That was incomprehensible to the Taliban, which understood Karzai as an American stooge. In March, the Taliban announced they were walking away from the talks, blaming the Americans’ “ever-changing position.”

“ It remains to be seen if the Afghans can negotiate peace. ”

Laurel Miller became deputy Afghanistan/Pakistan envoy in 2013 and eventually took over the office, a position she held until June 2017. She said that there were “various efforts” after 2012 to restart the peace process, but nothing took hold, owing both to continued opposition from the U.S. military and the inability to make an arduous, uncertain peace process central to Obama’s final term.

“If you compare the level of political capital and diplomatic muscle invested in negotiating the Iran deal or the opening with Cuba with trying to negotiate peace in Afghanistan, you see the latter pales in comparison, and I say that as someone involved in it,” Miller said.

Trump initially seemed to follow Obama’s template: deep uncertainty about the wisdom of the Afghanistan war coupled with acquiescence to the military’s impulse to escalate. But in 2018, following an initiative by Kolenda and ex-diplomat Robin Raphel revealed by The Daily Beast, U.S. officials again resumed contact with the Taliban.

Soon, Secretary of State Mike Pompeo appointed a Bush-era Afghanistan ambassador, Zalmay Khalilzad, to revive a diplomatic channel in pursuit of negotiating an end to the war. While formally committed to an “Afghan-owned, Afghan-led” process, Khalilzad functionally jettisoned it. The Taliban would not talk to the Kabul government without reaching an assurance with the U.S. first—and this time, Washington decided that it would not defer to its Afghan clients.

The Americans were not exactly dealing from a position of strength. The Taliban, seeing little gain from diplomacy, intensified their war after Obama drew down in 2014. They came to control ever more territory, erasing whatever military initiative was won by Obama’s and Trump’s surges.

All of this dispirited Kolenda, who had been part of the 2011-12 negotiating team. “We had a huge amount of leverage in 2011. The Taliban controlled a fraction of the country [compared to today], but we couldn’t get our act together,” Kolenda remembers. “Lack of vision, internal frictions, the withdrawal timeline, and poor coordination with the Karzai government squandered the opportunity. If we gave [the political] capital then that we gave the effort now, my personal belief is we’d have gotten a better deal then and a better outcome overall.”

It remains to be seen if the Afghans can negotiate peace. Khalilzad’s team has built in an incentive, according to two sources briefed on the terms of the deal: the U.S. will return to Obama-era troop levels over the course of five months, but any end to the U.S. military presence is conditional—though on precisely what remains unclear. But what is compelling to the Taliban is likely horrifying to Afghan President Ashraf Ghani. Ghani, emerging from a mess of an election, has been dragged into a process he distrusts by an American patron he distrusts as well.

Jalali, the former Afghan interior minister, describes himself as “cautiously hopeful.” But he considers the disunity between the U.S. and its Afghan clients to be ominous. “If there is a withdrawal of U.S. forces, if it’s not benchmarked with other elements of peacemaking—Afghan talks, a reduction in violence, the closing of Taliban bases in Pakistan—then the Taliban will just wait out the withdrawal of international forces and try to make separate deals with separate Afghan political groups,” he said.

Several Americans interviewed for this story were reluctant to condemn the earlier failures of the U.S. to negotiate an end to the war. “You can’t coldly judge the rational case for sitting down with these folks. It’s still hard. I do think there were opportunities that should have been taken along the way,” said Annie Pforzheimer, who until March 2019 was the acting deputy assistant secretary of state for Afghanistan after serving as a senior diplomat in Kabul.

But the alternative to the “rational case for sitting down with these folks” has been a war that continued to kill, maim, displace and impoverish thousands long after it became unwinnable. As with Vietnam, America has preferred denial of its loss to facing it forthrightly. It is unable to reconcile its defeat with its cherished conception of its own omnipotence.

All of that speaks to the central reason why the U.S. avoided earlier deals with the Taliban as its leverage disappeared. “Making peace with the Taliban,” says Miller, “is another way of saying we didn’t win the war.”