The US signed a landmark deal with the Taliban on Saturday, laying out a timetable for a full troop withdrawal from Afghanistan within 14 months as it seeks an exit from its longest war.
The agreement is expected to lead to a dialogue between the Taliban and the Kabul government that, if successful, could ultimately see an end to the grinding 18-year conflict.
Taliban fighter-turned-dealmaker Mullah Baradar signed the accord alongside Washington's chief negotiator Zalmay Khalilzad, in a conference room in a luxury hotel in the Qatari capital.
The pair then shook hands, as people in the room shouted "Allahu Akbar" (God is greatest).
US Secretary of State Mike Pompeo looked on as the two inked the deal, and alluded to the difficult work that remains to be done.
"I know there will be a temptation to declare victory, but victory for Afghans will only be achieved when they can live in peace and prosper," he said.
More than $1 trillion spent
The Taliban swept to power in 1996 with a hard-line interpretation of Islamic sharia law, banning women from working, closing girls' schools, and forbidding music and other entertainment.
Since the US-led invasion that ousted them after the September 11, 2001 attacks, America has spent more than $1 trillion on fighting and rebuilding in the country.
About 2 400 US soldiers have been killed, along with unknown tens of thousands of Afghan troops, Taliban fighters and Afghan civilians.
"We're seizing the best opportunity for peace in a generation," Pompeo told a press conference.
US President Donald Trump, who has promised to finish America's "endless wars", urged the Afghan people to embrace the chance for a new future.
"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," he said on the eve of the signing.
The Taliban's chief negotiator Sher Mohammad Abbas Stanikzai hailed another "day of victory" in Afghanistan's long history of repelling foreign powers.
"This is the kind of day that our ancestors celebrated after they defeated the British and the Soviets," he said as he and other jubilant Taliban members took part in a march in Qatar, in a video shared by Taliban sources.
The Doha accord was drafted over a tempestuous year of dialogue marked by the abrupt cancellation of the effort by Trump in September.
But the position of the Afghan government, which has been excluded from direct US-Taliban talks, remains unclear and the country is gripped by a fresh political crisis amid contested election results.
The signing comes after a week-long, partial truce that has mostly held across Afghanistan, aimed at building confidence between the warring parties and showing the Taliban can control their forces.
The US, which currently has between 12 000 and 13 000 troops in Afghanistan, will draw that number down to 8 600 within months of the agreement being signed.
If the Taliban abide by the terms of the accord, the US and its partners "will complete withdrawal of all remaining forces from Afghanistan" within 14 months.
The two sides also agreed to swap thousands of prisoners in a "confidence building measure".
And the unprecedented direct negotiations between the Taliban and Afghanistan's government will begin by March 10, likely in Oslo, senior US officials said.