The deal has been signed by US special envoy Zalmay Khalilzad and Taliban political chief Mullah Abdul Ghani Baradar
The United States signed a deal with Taliban insurgents on Saturday that could pave the way toward a full withdrawal of foreign soldiers from Afghanistan and represent a step toward ending the 18-year-war in the nation.
But while the agreement creates a path for the United States to gradually pull out of its longest war, many expect the talks to come between the Afghan sides may be much more complicated.
The deal was signed in the Qatari capital Doha by US special envoy Zalmay Khalilzad and Taliban political chief Mullah Abdul Ghani Baradar, with US Secretary of State Mike Pompeo on hand to witness the ceremony.
US Defense Secretary Mark Esper called the accord a good step but just the beginning.
"Achieving lasting peace in Afghanistan will require patience and compromise among all parties," said Esper, who met Afghan President Ashraf Ghani in Kabul where they announced a joint declaration in parallel to the US-Taliban accord.
The United States said it is committed to reducing the number of its troops in Afghanistan to 8,600 - from the current 13,000 - within 135 days of signing the deal, and working with its allies to proportionally reduce the number of coalition forces in Afghanistan over that period, if the Taliban adhere to their commitments.
A full withdrawal of all US and coalition forces would occur within 14 months of the deal getting signed, if the Taliban hold up their end of the deal, the joint statement said.
"We are working to finally end America’s longest war and bring our troops back home," said US President Donald Trump in a White House statement.
The accord represents a chance to make good on a longstanding promise to get troops out, as he seeks re-election in November. But security experts have also called it a foreign policy gamble that would give the Taliban international legitimacy.
Ghani said he hoped the Doha deal paves the way towards lasting peace, telling a news conference in Kabul:
"The nation is looking forward to a full ceasefire."
The Afghan government said it stood ready to negotiate and conclude a ceasefire with the Taliban, and it affirmed its support for the phased withdrawal of US and coalition forces subject to the Taliban's fulfilment of its commitments.
It also said that it remained committed to preventing militant groups from using its soil to threaten the security of the United States, its allies and other countries.
Separately, Nato pledged to adjust the coalition troop levels in the first phase too, bringing down Nato's numbers to about 12,000 from roughly 16,000 troops at present.
"We went in together in 2001, we are going to adjust (troop levels) together and when the time is right, we are going to leave together, but we are only going to leave when conditions are right," Nato Secretary-General Jens Stoltenberg, who was in Kabul on Saturday, told reporters.
Hope for an end to bloodshed
Hours before the deal, the Taliban ordered all its fighters in Afghanistan "to refrain from any kind of attack for the happiness of the nation."
"The biggest thing is that we hope the US remain committed to their promises during the negotiation and peace deal," said Zabiullah Mujahid, a spokesman for the hardline Islamist group.
For millions of Afghans, the deal represents some hope for an end to years of bloodshed.
"Peace is extremely simple and my country deserves it. Today is the day when maybe we will see a positive change," said Javed Hassan, 38, a school teacher living on the outskirts of Afghan capital, Kabul.
Hassan's children were killed in a bomb blast carried out by the Taliban in 2018. Since then, he has been writing letters to world leaders urging them to end the Afghan war.