The United States is to sign 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-ever war.
President Donald Trump urged the Afghan people to embrace the chance for a new future, saying the deal held out the possibility of ending the 18-year conflict.
"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 event in Doha.
Secretary of State Mike Pompeo arrived in the Qatari capital to witness the signing of the accord, while Defence Secretary Mark Esper was in Kabul for a separate joint declaration with the Afghan government.
The agreement is expected to lead to a dialogue between the Kabul government and the Taliban that, if successful, could ultimately see the Afghan war wind down.
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 United States and its allies will withdraw all their forces from Afghanistan within 14 months if the Taliban abide by the Doha agreement, Washington and Kabul said in a joint statement.
After an initial reduction of troops to 8,600 within 135 days of Saturday's signing, the US and its partners "will complete the withdrawal of their remaining forces from Afghanistan within 14 months... and will withdraw all their forces from remaining bases", the declaration stated.
The Doha accord was drafted over a tempestuous year of dialogue marked by the abrupt cancellation of the effort by Trump in September.
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.
NATO Secretary General Jens Stoltenberg heralded the agreement as a "first step to lasting peace".
"The way to peace is long and hard. We have to be prepared for setbacks, spoilers, there is no easy way to peace but this is an important first step," the Norwegian former prime minister told reporters in Kabul.
- 'Happy and celebrating' -
Since the US-led invasion that ousted the Taliban after the September 11, 2001 attacks, America has spent more than $1 trillion in fighting and rebuilding in Afghanistan.
About 2,400 US soldiers have been killed, along with unknown tens of thousands of Afghan troops, Taliban fighters and Afghan civilians.
The insurgents said they had halted all hostilities Saturday in honour of the agreement.
"Since the deal is being signed today, and our people are happy and celebrating it, we have halted all our military operations across the country," Taliban spokesman Zabihullah Mujahid told AFP.
As many as 30 nations are expected to be represented at Saturday's signing in the Qatari capital.
While Kabul will not be represented at the Doha ceremony, set for 1245 GMT, it will send a six-person taskforce to the Qatari capital to make initial contact with the Taliban political office, established in 2013.
- Blood and treasure -
Any insurgent pledge to guarantee Afghanistan is never again used by jihadist movements such as Al-Qaeda and the Islamic State group to plot attacks abroad will be key to the deal's viability.
The Taliban's sheltering of Al-Qaeda was the main reason for the US invasion following the 9/11 attacks.
The group, which had risen to power in the 1990s in the chaos of civil war, suffered a swift defeat at the hands of the US and its allies. They retreated before re-emerging to lead a deadly insurgency against the new government in Kabul.
After the NATO combat mission ended in December 2014, the bulk of Western forces withdrew from the country, leaving it in an increasingly precarious position.
While Afghans are eager to see an end to the violence, experts say any prospective peace will depend on the outcome of talks between the Taliban and the Kabul government.
But with President Ashraf Ghani and rival Abdullah Abdullah at loggerheads over contested election results, few expect the pair to present a united front, unlike the Taliban, who would then be in a position to take the upper hand in negotiations.