Doha, Qatar - The US and Taliban are set to sign a peace deal that could signal the end of the US's longest war after nearly two years of protracted negotiations in the Qatari capital, Doha.

Diplomats from Afghanistan, the US, India, Pakistan and other UN member states started gathering on Saturday morning along with Taliban representatives at the Sheraton Hotel in Doha, a five-star resort overlooking the Gulf where the peace deal is expected to be signed.

More:

Late on Friday, US President Trump in a statement urged Afghans to seize the opportunity for peace and "a new future" for their country.

"Nearly 19 years ago, American service members went to Afghanistan to root out the terrorists responsible for the 9/11 attacks. In that time, we have made great progress in Afghanistan, but at great cost to our brave service members, to the American taxpayers, and to the people of Afghanistan.

"When I ran for office, I promised the American people I would begin to bring our troops home, and seek to end this war. We are making substantial progress on that promise," Trump said.

US Secretary of State Mike Pompeo, who has arrived in the Qatari capital, will witness the signing, while Secretary of Defense Mark Esper is expected to issue a joint declaration with the government of Afghanistan in Kabul.

The deal comes a week after a "reduction in violence" (RIV) agreement announced by Washington, which has largely held.

Over the past week, at least 19 security forces and four civilians have been killed - a marked decrease compared with previous weeks - fatalities the Afghan government attributed to the Taliban.

'The result of a precursor phase'

It is hoped that Saturday's signing will unlock intra-Afghan talks between the Taliban and Afghan stakeholders, including the country's West-backed government, to decide the future course of the country.

Calling the deal a pre-agreement, analysts said the real challenge in establishing lasting peace will lie in the talks - the details of which remain unclear.

"It is important to note that the agreement that will likely be signed on February 29 between the Taliban and the US is not a peace deal," Andrew Watkins, senior analyst on Afghanistan at the International Crisis Group, told Al Jazeera.

200221052054522

"Instead, this is the result of a precursor phase of the Afghan peace process, one that was necessary to bring the Taliban to the table with the Afghan government and political leadership for a substantive dialogue."

Watkins noted that the Afghan government and Taliban should map out important questions on the country's future in their negotiations, rather than the US and Taliban.

The stage is set and players are in town for another attempt at signing a historic agreement between US forces and the #Taliban.#Qatar has hosted dozens of meetings since 2013 but Peace remains elusive in #Afghanistan nearly two decades after US invasion.

The view from #Doha 1/n pic.twitter.com/ieKp70cNnu — Osama Bin Javaid (@osamabinjavaid) February 28, 2020

"The US-Taliban deal should be seen as having provided a window, or opportunity, for a political settlement and peaceful end to the conflict. But so much work towards that end remains," he said.

Those talks, analysts and government officials say, could take months due to divisions between President Ashraf Ghani and Chief Executive Abdullah Abdullah over key issues.

Last week, Abdullah contested the results of the presidential elections after incumbent President Ghani was declared the winner. Any future political process in the country would be challenging unless the two rivals resolve their differences.

Both had planned separate inaugurations slated for Thursday but deferred them on US advice over concerns it would jeopardise the signing of the peace deal.

The two leaders were brought together to form a National Unity Government (NUG) in the wake of the 2014 elections, which were marred by irregularities.

"President Ghani is not ready for another NUG format, though he is under pressure for an inclusive administration. Ghani does not want a divided leadership," Bashir Safi, former adviser to the Afghan government, told Al Jazeera.

"As far as Abdullah Abdullah is concerned, he wants an upper decision-making hand and someone to be asked in every matter," he said, referring to the post of chief executive that Abdullah negotiated for himself in 2014.

Has the Taliban won?

The Taliban have long demanded the withdrawal of foreign troops, calling them an "occupation" force, and blaming them for the almost two decades of war.

In marathon negotiations between US officials and Taliban representatives in Doha, which began in 2018, the US has sought guarantees from the Taliban that in exchange for the withdrawal of foreign troops, Afghan soil would not be used for attacks on US interests.

The Taliban have been waging an armed rebellion since 2001 when the US toppled the armed group from power in a military invasion.

200222080820953

Taliban members deem the agreement a victory but analysts say all sides, including the Afghan government, have made serious compromises.

"The Taliban has been remarkably consistent in its public messaging, that directed towards its own members as well as externally. A 'victory' narrative is a critical part of that messaging, and is part of what binds the identity of such a large, diverse group together," Watkins told Al Jazeera.

"In reality, all sides (including the Afghan government, although it has not been a direct party to this deal) have made serious compromises.

"If we can take the [Trump] at his word that he wished to draw down military presence in Afghanistan, then the Americans have obtained concessions and created space for peace by offering something that might have happened anyway. That isn't quite a loss.

"And the Taliban agreed to sit with representatives from the Afghan government well before the final foreign soldier has left Afghan soil, which was once a key claim in their victory narrative - the group has conceded here, and elsewhere," he said.

Mohammad Shafiq Hamdam, former deputy adviser to President Ghani and senior adviser for NATO in Afghanistan, reiterated the importance of compromise from all parties in a bid to end the conflict.

"Peace does not come for free. Some things must be compromised to reach a deal," he said.

Looking ahead, the Taliban and Afghan leaders, including from the government, are expected to meet within 10 to 15 days of Saturday's signing.

They are expected to negotiate a post-war framework and discuss issues including a permanent ceasefire, the rights of women and minorities, and governance.

"In 2017, the longest-serving NATO commander in Afghanistan, General John Nicholson, described the war under his command a 'stalemate' and Sirajuddin Haqqani the deputy leader of the Taliban, confirmed in his op-ed for the New York Times last week that the Taliban had had enough, writing: 'Everyone is tired of war,'" Hamdam said. "[It] has exhausted everyone."