WASHINGTON (AFP) - The United States is optimistic about reaching a peace accord with the Taleban, but it still faces security challenges and the risk of militant threats based in Afghanistan, analysts say.
From the withdrawal of US troops to the disarming of insurgents, the path to peace after more than 18 years of war is strewn with difficulties.
The Taleban controlled the country when Al-Qaeda, based in the southern city of Kandahar, attacked the United States on Sept 11, 2001.
Another major attack on US interests by militants based in Afghanistan would be a major blow to US efforts to present its longest war as an overall victory.
President Donald Trump appears to be sharply aware of the risks, branding Afghanistan as "the Harvard of terrorists." He has vowed to leave a strong US intelligence presence in the country to thwart attempts to use it again as a base for staging global attacks.
Under questioning by lawmakers on Wednesday (Feb 26), General Mark Milley, the chairman of the Joint Chiefs of Staff, acknowledged the risks even as he expressed support for a peace accord.
"I support signing a peace agreement with the Taleban, fully recognising what the Taleban is all about," he said, adding sardonically: "I would not support sharing intelligence with them."
The accord with the Taleban, which will be signed on Saturday in Doha, commits Washington to withdraw part of the 12,000 to 13,000 US troops by the end of the summer.
Initially, 8,600 will remain, and any further withdrawal will be linked to inter-Afghan political progress.
Military sources point to last year's pull-out of US troops from Syria as a model.
But a US withdrawal from Afghanistan would be a larger undertaking, and the military sources say it has to be gradual and discreet to protect forces on the ground.
The goal is to avoid making the remaining US military personnel a target for the Taleban or jihadists from Al-Qaeda or the Islamic State in Iraq and Syria (ISIS), according to the military sources, who spoke on condition of anonymity.
But the situation could unravel if US forces withdraw before a political accord between the Taleban and the Afghan government is in place, warned Carter Malkasian, a former adviser to the Joint Chiefs of Staff.
"Once we leave, the Taleban could judge that the balance of forces has changed and that they now want to renege on the agreement," he warned during a recent conference at the Council on Foreign Relations.
Since the accord is based on Taleban security guarantees, the insurgents will have to keep their forces under control, added Michele Flournoy, a former under secretary of defence for policy.
There is always "the potential for spoilers on the Taleban side," she said.
The Soviet Union's humiliating withdrawal from Afghanistan in 1989 after 10 years of war underlines the historical dangers for the United States.
A further present-day complication is that the Afghan administration is in disarray, with President Ashraf Ghani declaring himself the winner of a new term in elections but his chief rival rejecting the results and vowing to form his own government.
The biggest challenge will be reintegrating Taleban fighters, many of whom have only ever known war, into Afghan society.
A lasting peace deal will "require that they amalgamate Taleban with the Afghan armed forces," James Dobbins, a former Afghanistan advisor in the Bush and Obama administrations, told AFP. "Those are not simple things to do."
In a recent report, the Special Inspector General for Afghanistan Reconstruction (SIGAR), John Sopko, stressed that reintegration of fighters "is a complex, long-term process, as old as war itself."
He warned that the US must fund a massive a reconstruction program in Afghanistan or 60,000 Taleban fighters "expecting a peace dividend, may return to violent and predatory behaviour."