A peace deal between the United States and its once sworn enemy the Taliban has been sealed at twin ceremonies, in which the US has agreed to withdraw all of its troops from Afghanistan.
US Secretary of State Mike Pompeo met a 31-strong Taliban delegation during a historic moment which they shared a stage in Qatar's capital Doha, after 18 years of fighting.
Mr Pompeo, who called it "a momentous day", gave a list of pointers to the Taliban to follow to ensure success.
"The United States and the taliban have endured decades of hostility and mistrust," he said.
"Previous talks have faltered. This effort only became real for the United States when the Taliban signalled interest in pursuing peace and ending their relationship with al Qaeda and other foreign terrorist groups.
"They also recognise that military victory was impossible."
He said the US would "closely watch" the Taliban's compliance with the agreement and the pace of the US withdrawal from Afghanistan would take place according to "their actions".
The deal - signed by US special envoy Zalmay Khalilzad and Taliban political chief Mullah Abdul Ghani Baradar - agrees the complete withdrawal of US and NATO troops within 14 months.
The US has also agreed to refrain from the use of force against Afghanistan or intervening in its domestic affairs.
It has also committed to seeking annual funds to train, advise and equip Afghan security forces.
Included in the deal:
Complete withdrawal of US and NATO troops from Afghanistan in 14 months
Afghan govt to engage with United Nation Security Council to remove Taliban members from sanctions list by 29 May.
US to reduce troops in Afghanistan to 8,600 within 135 days of - contingent on the Taliban's fulfilment of its commitments under the agreement
US to refrain from use of force against territorial integrity of Afghanistan.
US will not intervene in Afghanistan's domestic affairs
US commits to seek annual funds to train, advice, equip Afghan security forces
Speaking at a parallel ceremony in Kabul, Afghanistan's president Ashraf Ghani said: "All the people of Afghanistan are looking forward to a permanent peace."
He said that "today can be the moment of overcoming the past" and called for a moment of silence "in honour of our mutual fallen heroes".
He went on: "The tragedy of 9/11 brought us together. Mutual sacrifice created human bonds between us. Mutual interest, your security and our freedom, sustains our relationship in mutual respect, which has made us partners."
Calling the relationship "transparent" he said: "Nato and US partners have spared neither blood nor treasure for attaining the goals of the partnership.
We ask you to thank the veterans, especially the gold star families, for their service. Our sacrifice has been immense... children, youth in their prime, and men and women in all ages in all walks of life, whose lives have been taken away by senseless acts of violence in terror and public spaces."
And he said: "We have the political will and the capacity to make peace because of the resilience of our society, the dynamism of our economy and the capability of our state."