President Donald Trump says it is “time to bring our people back home” after the US signed a deal with the Taliban aimed at bringing peace to Afghanistan.
Mr Trump said 5,000 US troops would leave Afghanistan by May and he would meet Taliban leaders in the near future, without specifying where.
The US and NATO allies have agreed to withdraw all troops within 14 months if the militants uphold the historic deal.
Talks between the Afghan government and the Taliban are due to follow.
Under the agreement, the militants also agreed not to allow al-Qaeda or any other extremist group to operate in the areas they control.
The US invaded Afghanistan weeks after the September 2001 attacks in New York by al-Qaeda, then based in Afghanistan. The Taliban were ousted from power but became an insurgent force that by 2018 was active in more than two-thirds of the country.
More than 2,400 US troops have been killed during the conflict. About 12,000 are still stationed in the country.
What else did Trump say about the deal?
Speaking at the White House, Mr Trump congratulated Secretary of State Mike Pompeo, Defense Secretary Mark Esper and “the people of the United States for having spent so much in terms of blood, in terms of treasure, and treasury.”
He said the Taliban had been trying to reach an agreement with the US for a long time, and that he had faith in the deal because “everyone is tired of war.”
The president added that US troops had been killing terrorists in Afghanistan “by the thousands” and now it was “time for someone else to do that work and it will be the Taliban and it could be surrounding countries”.
“I really believe the Taliban wants to do something to show we’re not all wasting time,” he added. “If bad things happen, we’ll go back with a force like no-one’s ever seen.”
What happened in Doha?
The deal was signed by US special envoy Zalmay Khalilzad and Taliban political chief Mullah Abdul Ghani Baradar with Mr Pompeo as a witness.
In a speech, Mr Pompeo urged the militant group to “keep your promises to cut ties with al-Qaeda”.
Mr Baradar said he hoped Afghanistan could now emerge from four decades of conflict.
“I hope that with the withdrawal of all foreign forces from Afghanistan the Afghan nation under an Islamic regime will take its relief and embark on a new prosperous life,” he said.
Afghanistan’s government did not take part in the US-Taliban talks, but said it was ready to negotiate with the Taliban.
What’s in the agreement?
In addition to withdrawing US and allied troops, the deal also provides for a prisoner swap.
Some 5,000 Taliban prisoners and 1,000 Afghan security force prisoners would be exchanged by 10 March, when talks between the Taliban and the Afghan government are due to start.
The US will also lift sanctions against the Taliban and work with the UN to lift its separate sanctions against the group.
In Kabul, activist Zahra Husseini said she feared the deal could worsen the situation for women in Afghanistan.
“I don’t trust the Taliban, and remember how they suppressed women when they were ruling,” the 28-year-old told AFP.
“Today is a dark day, and as I was watching the deal being signed, I had this bad feeling that it would result in their return to power rather than in peace.”