The US and the Taliban have signed an agreement aimed at paving the way towards peace in Afghanistan after more than 18 years of conflict.
The US and its Nato allies have agreed to withdraw all their troops from the country within 14 months if the militants uphold the deal.
US Secretary of State Mike Pompeo and Taliban leaders attended the signing ceremony in Doha in Qatar.
Talks between the Afghan government and the Taliban are due to follow.
Under the agreement signed in Doha, 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 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.
How did US-Taliban talks come about?
Since 2011, Qatar has hosted Taliban leaders who have moved there to discuss peace in Afghanistan. It has been a chequered process. A Taliban office was opened in 2013, and closed the same year amid rows over flags. Other attempts at talks stalled.
In December 2018, the militants announced they would meet US officials to try to find a "roadmap to peace". But the hard-line Islamist group continued to refuse to hold official talks with the Afghan government, whom they dismissed as American "puppets".
Following nine rounds of US-Taliban talks in Qatar, the two sides seemed close to an agreement.
Washington's top negotiator announced last September that the US would withdraw 5,400 troops from Afghanistan within 20 weeks as part of a deal agreed "in principle" with Taliban militants.
Days later, Mr Trump said the talks were "dead", after the group killed a US soldier. But within weeks the two sides resumed discussions behind the scenes.
A week ago the Taliban agreed to a "reduction of violence" - although Afghan officials say at least 22 soldiers and 14 civilians have been killed in Taliban attacks over that period.
What's the background to the Afghan war?
It began when the US launched air strikes one month following the 11 September 2001 attacks and after the Taliban had refused to hand over the man behind them, Osama bin Laden.
The US was joined by an international coalition and the Taliban were quickly removed from power. However, they turned into an insurgent force and continued deadly attacks, destabilising subsequent Afghan governments.
The international coalition ended its combat mission in 2014, staying only to train Afghan forces. But the US continued its own, scaled-back combat operation, including air strikes.
The Taliban has however continued to gain momentum and last year the BBC found they were active across 70% of Afghanistan.
Nearly 3,500 members of the international coalition forces have died in Afghanistan since the 2001 invasion.
The figures for Afghan civilians, militants and government forces are more difficult to quantify. In a February 2019 report, the UN said that more than 32,000 civilians had died. The Watson Institute at Brown University says 58,000 security personnel and 42,000 opposition combatants have been killed.
Who are the Taliban?
The Taliban, or "students" in the Pashto language, emerged in the chaos that followed the withdrawal of Soviet troops in 1989.
They took Kabul in 1996 and were in charge of most of the country within two years, practising their own austere version of Sharia, or Islamic law.
Before being removed from power they banned TV, music and cinema, enforced strict dress codes, severely curtailed female education and introduced brutal punishments.
Mullah Omar continued to lead the Taliban after they were ousted. He died in 2013 although the Taliban did not confirm it for two years.
The Taliban are now led by Mawlawi Hibatullah Akhundzada.