The US and the Taliban have signed an “agreement for bringing peace” to Afghanistan after more than 18 years of conflict.
The US and Nato allies have agreed to withdraw all troops within 14 months if the militants uphold the deal.
President Trump said it had been a “long and hard journey” in Afghanistan. “It’s time after all these years to bring our people back home,” he said.
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.
Speaking at the White House, Mr Trump said the Taliban had been trying to reach an agreement with the US for a long time.
He said 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,” Mr Trump added. “If bad things happen, we’ll go back with a force like no-one’s ever seen.”
The US invaded Afghanistan weeks after the September 2001 attacks in New York by the Afghanistan-based al-Qaeda group.
More than 2,400 US troops have been killed during the conflict. About 12,000 are still stationed in the country. President Trump has promised to put an end to the conflict.