DOHA, Qatar — The United States signed a deal with the Taliban on Saturday that sets the stage to end America’s longest war — the nearly two-decade-old conflict in Afghanistan that began after the Sept. 11 attacks, killed tens of thousands of people, vexed three White House administrations and left mistrust and uncertainty on all sides.
The agreement lays out a timetable for the final withdrawal of United States troops from Afghanistan, the impoverished Central Asian country once unfamiliar to many Americans that now symbolizes endless conflict, foreign entanglements and a potential stage for terrorist plots.
The war in Afghanistan in some ways echoes the American experience in Vietnam. In both, a superpower bet heavily on brute strength and the lives of its young, then walked away with seemingly little to show.
American efforts to instill a democratic system in the country, and to improve opportunities for women and minorities, are at risk if the Taliban, which banned girls from schools and women from public life, become dominant again. Corruption is still rampant, the country’s institutions are feeble, and the economy is heavily dependent on American and other international aid.
The signing of the agreement in Doha, Qatar, which followed more than a year of stop-and-start negotiations and conspicuously excluded the American-backed Afghanistan government, is not a final peace deal and could still unravel.
But it is seen as a step toward negotiating a more sweeping agreement that some hope could eventually end the insurgency of the Taliban, the militant movement that once ruled Afghanistan under a severe Islamic code.
The war cost $2 trillion and took the lives of more than 3,500 American and coalition troops and tens of thousands of Afghans since the U.S. invasion in aftermath of the Sept. 11 attacks, which were plotted by Al Qaeda leaders under the protection of the Taliban.
The withdrawal of American troops — about 12,000 are still in Afghanistan — is dependent on the Taliban’s fulfillment of major commitments that have been obstacles for years, including its severance of ties with international terrorist groups such as Al Qaeda.
The agreement signed Saturday also hinges on more difficult negotiations to come between the Taliban and the Afghan government over the country’s future. Officials hope those talks will produce a power-sharing arrangement and lasting cease-fire, but both ideas have been anathema to the Taliban in the past.
“The future of Afghanistan is for Afghans to determine,” said Secretary of State Mike Pompeo, in Doha for the ceremony. “The U.S.-Taliban deal creates the conditions for Afghans to do just that.”
The Trump administration has framed the deal as the long-awaited promise made to war-weary Americans, for whom the Afghan war has defined a generation of loss and trauma but has yielded no victory.
At the height of the war, more than 100,000 American troops occupied Afghanistan, as did tens of thousands from about 40 nations in the United States-led NATO coalition.
The war has gone on so long — the first allied warplane and cruise missiles struck on Oct. 7, 2001, and American boots hit the ground in numbers on Oct. 19 — that many young Afghan soldiers and their coalition partners have no memory of its onset.
“If the Taliban and the government of Afghanistan live up to these commitments, we will have a powerful path forward to end the war in Afghanistan and bring our troops home,” President Trump said on Friday ahead of the signing of the deal.
“These commitments represent an important step to a lasting peace in a new Afghanistan, free from Al Qaeda, ISIS, and any other terrorist group that would seek to bring us harm.”
From the start of the talks, late in 2018, Afghan officials were troubled that the Taliban had blocked them from participating. They worried that Mr. Trump would abruptly withdraw troops from Afghanistan without securing any of the conditions they saw as crucial, including a reduction in violence and a Taliban promise to negotiate in good faith with the government.
The chief American envoy, Zalmay Khalilzad, signed on behalf of the United States. Mullah Abdul Ghani Baradar, a current Taliban deputy and a figure from the original Taliban government, signed for the Taliban. The two shook hands as the room erupted in cheers.
During the signing, another senior American official, Defense Secretary Mark T. Esper, was with Afghan officials in Kabul. They issued a joint declaration asserting the United States’ commitment to continue funding and supporting the Afghan military. And Mr. Esper emphasized that if the Taliban did not honor their pledges, “the United States would not hesitate to nullify the agreement.”
Afghan officials expressed cautious hope. At the Kabul meeting, President Ashraf Ghani called for a moment of silence for those killed in the past 18 years and said, “Today can be a day of overcoming the past.”
The best-case prospect laid out by the deal signed on Saturday could go far beyond America’s disengagement. It raised the hope of ending a conflict that began more than 20 years before the United States invasion, when the Soviet Union’s forces invaded the country and the United States began supporting the guerrilla resistance against them.
But behind the hope lies a web of contradictions.
The United States, which struggled to help secure better rights for women and minorities and instill a democratic system and institutions in Afghanistan, has struck a deal with an insurgency that has never renounced its desire for a government and justice system rooted in a severe interpretation of Islam.
Though the Taliban get their primary wish granted by this agreement — the withdrawal of American troops — they have made no firm commitments to protect civil rights for people they brutally repressed when in power.
Among the Taliban, the reality of bringing the world’s strongest military power to the point of withdrawal has widely been seen as a victory.
“This is the hotel that tomorrow will turn into a historic hotel,” the Taliban’s multimedia chief posted on Twitter on Friday with a picture of the Sheraton in Doha, site of the signing. “From here, the defeat of the arrogance of the White House in the face of the white turban will be announced.”
But at the signing ceremony, Mr. Pompeo warned the Taliban to moderate their celebration. “I know there will be a temptation to declare victory,” he said. “But victory for Afghans can only be achieved if they can live in peace and prosper.”
Even some Afghan soldiers came to see American troops as invaders, with some turning their guns on their American and NATO partners. More than 150 American and NATO troops have been killed in such “green-on-blue” attacks, including two American service members gunned down this month.
The deal provides a conditional schedule for the withdrawal of the remaining American troops. In the first phase, about 5,000 are to leave Afghanistan in 135 days. The withdrawal of the rest, expected to be completed within 14 months, will depend on the Taliban keeping its end of the bargain.
The insurgents have pledged to keep international terrorist networks such as Al Qaeda from using Afghanistan as a base for attacks.
But at the same time, a dominant faction of the Taliban, the Haqqani network, is still listed as a terrorist organization for waging a campaign of suicide bombings in Afghan cities. The network’s leader, Sirajuddin Haqqani, is the Taliban’s deputy leader and military commander.
The United States committed to working to release 5,000 Taliban prisoners, who are held by the Afghan government, and 1,000 from the Afghan side by March 10, before the Afghan sides are expected to sit down for direct negotiations. The United States will also review sanctions it has imposed on Taliban members and start diplomatic efforts with the United Nations to remove the penalties.
A more durable cease-fire was not an explicit part of the U.S.-Taliban deal. That is to come in the direct talks between Afghan officials and the insurgency, officials say.
While American diplomats had pushed for a cease-fire, they settled for what they called a “reduction in violence” and tested it over seven days before the signing. Officials said attacks had dropped by as much as 80 percent during that period. The hope was that the reduction could extend into the next phase, until the two Afghan sides could agree to a more comprehensive cease-fire.
In recent years, Afghan soldiers and police have borne the brunt of the fighting, at a heavy cost in casualties and trauma, while the Taliban have gained ground.
Mr. Khalilzad, the veteran diplomat leading the American peace efforts and himself a native of Afghanistan, long insisted that the United States was not simply seeking a withdrawal agreement, but “a peace agreement that enables withdrawal.”
One Western official compared the American withdrawal plan to the speed of a truck backing out of a driveway: it depends on conditions.
The Taliban’s willingness to enter negotiations with other Afghans, including the government, over a political settlement has offered both hope and fear to the Afghan people.
The hope is that some kind of lasting peace can be reached. The fear is that the most difficult work lies ahead, and that the Taliban will be emboldened by the American withdrawal announcement after years of insurgent gains on the battlefield against the badly bloodied Afghan security forces.
The nearly two decades of war have been devastating in human and economic terms, though exact numbers are in many cases hard to come by.
Much of the peace negotiations happened in a year of record violence from both sides. In just the last quarter of 2019, the Taliban carried out 8,204 attacks, the highest for that period over the past decade. The United States dropped 7,423 bombs and missiles during the year, a record since the Air Force began recording the data in 2006.
In the past five years, more than 50,000 members of the Afghan security forces have been killed, and tens of thousands wounded. The Taliban’s losses are harder to verify, but their casualty rate is believed to be comparable. Out of about 3,550 NATO coalition deaths in Afghanistan, nearly 2,400 have been Americans.
Retaliation against Al Qaeda and its allies among the Taliban was the catalyst that drove the American invasion. But it has been a dawning sense of futility that has driven efforts to find a way out.
The Obama administration tried to seek a political settlement with the Taliban years ago, shortly after increasing troops in Afghanistan by tens of thousands, hoping to stabilize the government’s hold and bleed the insurgency until it was driven to negotiate. With Germany’s help, the administration opened back-channel contacts with the insurgents as early as 2010.
But those efforts remained at the level of trust-building measures, like the exchange of Sgt. Bowe Bergdahl, the last known American military prisoner of war, for several senior Taliban officials being held at the American detention facility at Guantánamo Bay in Cuba.
Officials who were involved in those efforts say the civilian and military sides of the United States government disagreed then about the need for a political solution, with the military refusing to accept that force could not win the war.
Thomas Gibbons-Neff contributed reporting from Kabul, Afghanistan.