KABUL (REUTERS) - Afghan President Ashraf Ghani had no more than 20 minutes to study a draft accord between the United States and the Taleban on pulling thousands of US troops out of his country, but upcoming elections could put him back at the heart of talks to end decades of war.
What he read in the draft outlining the now-collapsed deal left Mr Ghani and his officials - who were shut out of the talks by the Taleban refusal to negotiate with what they considered an illegitimate "puppet" regime - badly shaken and resentful, said a senior Kabul official close to the Afghan leader.
"Doesn't this look like surrender to the Taleban?" Mr Ghani asked Mr Zalmay Khalilzad, the veteran Afghan-born diplomat who led negotiations for Washington, at a meeting the two held immediately afterwards, according to the source who was present.
The Islamist militant group that ruled Afghanistan for five years has killed thousands of Afghan soldiers and civilians since it was toppled by US-led forces in 2001, and the attacks have continued throughout its negotiations with Washington.
In response to Mr Ghani's doubts, the Afghan official said Mr Khalilzad replied: "This is the best deal we will ever have."
The US State Department declined to comment on the meeting. Mr Khalilzad was unavailable for comment.
It was not the Afghan government's misgivings that sank the deal - US President Donald Trump abruptly cancelled secret talks with the Taleban at his Camp David retreat that were planned for Sept 8 and has since said the talks are "dead".
But for the Afghan government, that may be an opportunity get back in the game and shape the future direction of the peace process.
A presidential election, which the Taleban and even many Western officials had wanted to cancel to focus on sealing the peace accord, is now expected to go ahead on Sept 28.
Mr Ghani is favourite to win, leaving him well-placed to claim a popular mandate to set the terms of any new agreement with the Taleban.
"Now, the management of the peace process, its planning and implementation is the sole duty of the government of Afghanistan," Mr Ghani told an election rally last week. "I will implement that."
The Taleban has vowed to violently disrupt the election and on Tuesday killed nearly 50 people in twin suicide bombings, one targeting a Ghani election rally.
Afghan officials say the view in Kabul was that the US deal offered too many concessions to the Taleban while getting nothing in return, and left the Afghan government, supposedly America's ally, swinging in the wind.
The disagreement illustrates the deep split that developed between the US and the government over any peace deal and underlines how hard it has been for them to present a united front in dealing with Taleban negotiators.
The deal's collapse has also damaged the credibility of Mr Khalilzad, say Afghan officials and Western diplomats in Kabul who have been following the talks closely.
His future is now in doubt and it is still unclear whether talks can be revived.
The State Department declined to respond to requests for comment on Reuters' questions concerning the future of the talks and the criticisms of the draft deal.
The commander of US forces in Afghanistan has said the Taleban "overplayed their hand" in the negotiations and that the pace of US military operations was likely to pick up.
Mr Trump's decision to fire his hawkish national security adviser Mr John Bolton has added a further complication, and some in Washington fear the election will make it harder for talks to be revived before next year's US presidential election.
If talks are resumed, Mr Ghani's officials say Mr Khalilzad's format of holding separate negotiations with the Taleban as a preliminary step to later talks between Afghan participants in the conflict cannot be repeated.
Instead, the government will press for a sequence that would see a ceasefire followed by direct talks with the Taleban, leading to credible security guarantees. Only then would US troops be withdrawn.
"The government needs to be on board if there is a deal in the future," the Afghan official said.
Under the draft accord, some 5,000 American troops would be withdrawn in exchange for assurances that Afghanistan would not be used as a base for militant attacks against the US and its allies. That would leave roughly 9,000 stationed there.
But the senior Afghan official said many of the details of what would happen once the withdrawal took place were unclear.
"There was no concrete discussion, nothing, no discussion at all," the senior Afghan official said.
From Mr Ghani's point of view, Taleban assurances that they would not allow militant groups such as Al-Qaeda to operate in Afghanistan were worthless, given the formal oaths of loyalty that bind them.
Al-Qaeda chief Ayman al-Zawahri pledged allegiance to Taleban leader Mullah Haibatullah Akhundzada in 2016.
At the same time, intelligence reports showed Taleban field commanders confident of victory and eager to fight on.
While Mr Khalilzad spoke with clarity about plans to withdraw thousands of US troops, the senior Afghan official said the fate of future "intra-Afghan" talks that would decide a final peace settlement with the Taleban was less clear.
"It was a major failure of the deal that Khalilzad could not convince the Taleban to enter into direct negotiation with the Afghan government," the Afghan official said.