T he agreement signed in Doha is supposed to bring to an end the longest war in America’s history and the decades of bloodshed in which Afghans have fought each other and foreign forces. There is the flickering hope of violence ending among the people in the country, but also the understanding that this does not mean that everlasting peace is about to break out.

The simple fact is that Afghanistan is no longer an arena just between the Taliban and Afghan government and its western allies. Isis and al-Qaeda have arrived in recent years, while historical proxy groups of the Pakistani military like the Haqqani network continue to be active.

Isis and al-Qaeda, whose presence grew after the tide turned against them in Syria and Iraq, are not going to lay down their arms because of a deal between the Taliban and the Americans. If anything, they will present themselves even more as the true jihadis against foreign occupiers. And they are likely to be able to draw from the pool of Taliban fighters who are unhappy with the decision of their leaders to take the path of negotiation.

Nevertheless, the signing of the deal is a landmark event which may yield real benefit. That is certainly the desire, I found, among Afghans when I returned to the country to cover the presidential elections at the end of last year. This wish to end the strife was expressed not just by the public, but government officials, and also some members of the Taliban.

The next stage of the talks will be between the Taliban and the Afghan government who were absent from the meetings in Qatar, something which understandably led to criticism. There have been claims that the country’s elected representatives were being sidelined and concern that they will, at the end, be presented with a fait accompli by the US.

The intra-Afghan talks have been symbolically as well as strategically important. The Taliban has, in the past, refused to hold formal talks with the Afghan government due to their official stance that the administration in Kabul were simply western puppets.

There have, however, been unofficial overtures and the identity of the Taliban signatory to the Doha deal is interesting in the context of these past efforts.

Mullah Abdul Ghani Baradar has been down the path of seeking an end to violence before. Ten years ago he tried to hold ceasefire talks with the government of Hamid Karzai. But he had done so without the knowledge of the Pakistan’s military and intelligence service, ISI. They found out, he was arrested and spent the next eight years in a Pakistani jail.

The fact that Mullah Baradar was released to take part in the talks, supposedly after American pressure, and has credibility in Kabul should, in theory, help the talks with the Afghan government make progress.

There is apprehension among many Afghans that the Taliban will show its true colours if it becomes part of a power-sharing government, seeking to bring back the harsh, fundamentalist doctrine of its previous rule, jeopardising women’s rights and civil liberties.

But senior figures who were prominent in the time of Mullah Omar’s regime and retain contact with the current Taliban leadership claim important changes have taken place in the group’s position. Abdul Hakim Mujahid, who was the sole international face of the Taliban regime at the time of 9/11, has been among a group of elders who had been going to Doha to discuss strategy with the Taliban team.

He told me in Kabul: “I don’t think the Taliban would try to impose the type of rules from the time when I was in the government. Then the system was spiritual rather than political, there was little written down. Don’t forget that was a wartime government. But the Taliban has said at the [Doha] meetings it would not make the same mistakes as it made then.”

Syed Mohammad Akbar Agha, a former Taliban commander who was preparing to travel to Doha from Afghanistan to speak to Taliban officials, said a theocratic state will be established after an agreement.

“Let’s not forget that the Qatar talks were started at the request of the Americans. They didn’t want to face the same consequence the Russians ended up facing, they did not want to be humiliated. There will be elections after the agreement, but the Taliban will at the end want a government like in Iran, they will have Islamic scholars who will monitor the work of the government, it’ll be watched over by a strong shura [a consultative council]”, he said.

Another commander, Maulvi Manzoor, who had returned to Afghanistan after surviving an assassination attempt in Pakistan, warned while speaking from Kandahar: “There are a lot among the Taliban who do not believe in the talks and want to continue fighting. This is a problem that needs to be solved, otherwise they can easily join up with other groups who don’t want peace. What will the Americans do about that?”

Under the agreement the US and its Nato allies will cut troop numbers to 8,600 over the next 135 days. This is expected to include 200 of the 1,100-strong UK contingent currently in the country. Five bases will be closed. All American-led foreign troops will leave the country within 14 months if the Taliban adheres to the agreed conditions. The US wants to keep intelligence units in the country, but this may not be feasible if the Talibs form a future government.

But disengaging from Afghanistan is not easy, as the west found to its cost and at great cost to the Afghans.

The US, UK and their allies armed and trained Afghan Mujahedin to fight Russians and its allied Kabul government and then abandoned the country to lawlessness, Islamist extremism and plotting of terror attacks including 9/11. When the Taliban fell following the American-British invasion, Tony Blair declared: “This time we will not walk away.” But the British and American forces were soon moved to Iraq and the Taliban moved back in from its Pakistani haven to take advantage of the security vacuum.