President Donald Trump said he wanted US troops home from Afghanistan by Christmas, speeding up the timeline for ending America's longest war. "We should have the small remaining number of our BRAVE Men and Women serving in Afghanistan home by Christmas!" Mr Trump said on Twitter. In a February 29 agreement reached with the Taliban in Qatar, the United States promised to pull out all its troops by mid-2021 in return for insurgents' promises not to allow Afghanistan to be used by extremists – the original reason for the 2001 US invasion. After intense US cajoling, the Afghan government and Taliban last month opened peace talks in Doha, although negotiations have quickly deadlocked. Mr Trump's promise comes only weeks before US elections in which the president, trailing in the polls, has sought to show that he is making good on his promise to draw a close to "endless wars". After 19 years of US military operations his stance enjoys broad support at home including from his Democratic rival Joe Biden, who during his time as vice president had pushed to curtail US involvement in Afghanistan. Asked last month whether he backed Mr Trump's plans to withdraw troops from Afghanistan and Iraq, Mr Biden said: "Yes, I do. As long as he has a plan to figure out how he's going to deal with ISIS", the ultra-violent movement that has been active in both countries. The US first intervened in Afghanistan following the September 11, 2001 attacks and dislodged the Taliban regime, which had welcomed Al Qaeda. But in the years since the resurgent militants have launched a fresh battle to topple the US-backed government in Kabul, with civilians bearing the brunt of spiralling violence since Nato combat troops withdrew in 2014. The former Taliban regime imposed an ultraconservative religious ruling on Afghanistan that banned music and education for girls. The Doha talks have quickly deadlocked over the Taliban's insistence that negotiations adhere to a strict Sunni school of jurisprudence, a step the government says would discriminate against Shiites and other minorities. Speaking earlier on Wednesday, the veteran US diplomat who negotiated with the Taliban, Zalmay Khalilzad, nonetheless voiced guarded hope for the talks. "The overwhelming majority of the Afghans would like to see an end to the conflict," Mr Khalilzad, speaking by video, told a forum of the University of Chicago's Pearson Institute. "I believe that the Taliban are quite serious about the negotiations. Many thought that they wouldn't sit across the table from the Afghan government – that all they wanted was an agreement for the withdrawal of US forces. But they are now sitting across the table." Mr Trump has already reduced US forces in Afghanistan to about 8,600 and the Taliban has stood by promises not to attack western troops – even as the militants continue their bloody campaign against government forces. "The level of violence is too high as far as we're concerned," Mr Khalilzad said, although he asserted that Afghan civilian and military casualties had declined in the first half of 2020. Afghan President Ashraf Ghani, who visited Doha on Tuesday, called on the Taliban to "have courage" and declare a national ceasefire. The Trump administration has pressed Mr Ghani's government to release about 5,000 Taliban prisoners, a condition of the militants to start talks.