More than 17 years after the US invasion of Afghanistan, Washington and the Taliban appear closer than ever to some sort of agreement that could bring the insurgents to the table for peace talks.
However with the withdrawal of US troops seen as part of the deal, fears are rising about what an American exit could mean for Afghanistan, with security forces taking staggering losses, the government facing election upheaval, and civilians paying a disproportionate price after nearly two decades of bloodshed.
Here is a rundown of the status of the talks and what can be expected in the future.
What has happened so far?
The US and Taliban representatives have held several rounds of negotiations in recent months, part of a diplomatic push to get the insurgents to agree to peace talks.
The latest session ended on Saturday in Qatar after six straight days of negotiations — the longest consecutive sit-down between the two sides to date.
Perspective: How Pakistan can help with the Afghan peace process
Saudi Arabia, the United Arab Emirates and Pakistan — the only countries to recognise the Taliban regime of the late 1990s — have also all participated in the talks, but the Afghan government has complained of being cut out of them.
The militants are negotiating from a position of strength: they have the upper hand on the battlefield, and US President Donald Trump's reported eagerness to start withdrawing troops from Afghanistan is weighing heavy on the discussions.
What is the goal of the talks?
Ostensibly to find a way to bring the Taliban to peace negotiations with the government in Kabul to end the Afghan conflict.
Doing so could require movement on longstanding demands from both sides.
For the Taliban, that includes a timetable for the withdrawal of foreign forces in Afghanistan, while the US is seeking promises that Afghanistan will not be used again as a base for militants to launch attacks on foreign countries.
In Review: Inside the CIA's secret war in Afghanistan
Other issues include a potential ceasefire, a prisoners exchange, and ways to bring the Taliban into the political mainstream without undermining the legitimacy of the elected government in Kabul.
The Taliban is widely believed to want a return to power in Afghanistan and to reimpose sharia law, although there is some uncertainty over whether they might loosen their hardline stance after a US exit.
What have they decided?
Nothing yet. But it is believed the US and Taliban have come closer to an agreement than ever before. For now, the two sides have agreed to keep talking.
US special envoy Zalmay Khalilzad, heading the initiative for Washington, appeared upbeat, saying on Saturday that the talks were “more productive than they have been in the past. We made significant progress on vital issues”.
Perspective: The US and Afghan crisis
But he added: “Nothing is agreed until everything is agreed, and 'everything' must include an intra-Afghan dialogue and comprehensive ceasefire.”
The Taliban also cited progress, though spokesman Zabihullah Mujahid said reports of an 18-month withdrawal plan and a ceasefire are “not true”.
What happens next?
Khalilzad has said he is returning to Kabul for consultations, and is likely hold a range of meetings with the Afghan government.
The Taliban have said they are planning to “share details of the meetings and receive guidance” from their leaders before moving forward, and vowed to resume “similar future meetings”.
Know more: Endgame in Afghanistan
More talks are expected soon, but neither side has given any clarity on when, or when a deal might be announced.
Even if one is reached in the near future, it will only be the beginning of a peace process. A withdrawal would need to be managed carefully to prevent the collapse of Afghan security forces — and any negotiations between the Taliban and the Kabul government could take months, if not years.
What does it mean for future peace?
“There are too many unknowns... this is just a beginning,” International Crisis Group analyst Borhan Osman told AFP. “Nobody should underestimate the complexity and delicacy of the way forward from here.”
The major sticking point remains the Taliban's flat refusal to speak with the Afghan government, whom the insurgents brand as “puppets” of the West.
Even if the US and Taliban can agree a way to bring the militants to the table with Kabul, any specifics will be the subject of “thorny negotiations, in a long battle of wills among more stakeholders than the Taliban and the US”, Osman warned.
Last year Afghan President Ashraf Ghani offered a peace plan which encompassed a ceasefire and called for bringing the Taliban into the political mainstream.
However the Taliban's response was lukewarm and experts said they had no reason to expect that stance to change now.
“The Taliban will not agree to a power-sharing deal,” Afghan analyst Nazar Mohammad Mutmaeen told AFP.
Some observers noted that the Taliban appear to have slightly moderated their stance on some issues — such as allowing a three-day ceasefire last year, and making marginal concessions on women's rights.
However the US and NATO are likely to call for an agreement in accordance with democratic principles, something the Taliban are unlikely to agree to, and it is unclear how far Ghani would be willing or able to go to accommodate them — or how Washington could bend the Taliban to their will without a military presence in Afghanistan.
A US exit without some sort of rapport between the Taliban and Kabul could be disastrous.
Afghan security forces — already taking what experts have described as “unsustainable” losses — could break down along ethnic lines, unleashing an even bloodier civil war or even ushering in the return of a Taliban regime.