After 19 years of war, representatives from both the Afghan government and the Taliban say they've reached a breakthrough agreement -- a preliminary deal to press on with peace talks. It's the first written agreement between the two sides in the conflict, and is a big step toward moving on more substantive issues, such as negotiations for a possible ceasefire. And has been welcomed by the United Nations and Washington. The agreement comes after months of talks in Doha which were backed by the United States-- while the two sides are still at war. U.S. Special Representative for Afghan Reconciliation Zalmay Khalilzad said that the two sides had agreed on a "three-page agreement codifying rules and procedures for their negotiations on a political roadmap and a comprehensive ceasefire." Taliban insurgents refused to agree to a ceasefire in the early stages of talks. Despite being ousted from power during the 2001 U.S. invasion, Taliban still have control over wide areas of the country. Under a February deal, foreign forces are to leave Afghanistan by May 2021 in exchange for counter-terrorism guarantees from the Taliban. U.S. President Donald Trump has looked to speed up the withdrawal, despite criticism, saying he wanted to see all American soldiers home by Christmas to end America's longest war. The Trump administration has since announced that there would be a sharp drawdown by January, but at least 2,500 troops would remain.