In extending an olive branch to the Taliban at an international conference in Afghanistan’s capital Kabul on Wednesday, President Ashraf Ghani has boosted the prospects for peace in his battle-scarred country. These are admittedly pretty dim; but Mr Ghani’s offer to work with the Taliban as a nascent political party – with the promise to provide passports to the group’s representatives and open an office for them in Kabul – was a generous one. There are good reasons to be sceptical about whether the gesture will be met in the same spirit. The Taliban have historically viewed Kabul as a puppet regime and spurned negotiations, calling instead for direct talks with Washington. This position was reiterated by the Taliban on the eve of the conference.

Yet underlying Kabul’s and the Taliban’s position is that neither view a military solution as possible – though both have sought to gain the upper hand through force before coming to the table. US president Donald Trump has ramped up the fighting talk, and given the generals in the field the freedom to make major battlefield decisions without civilian approval. It was a strategy designed to bomb the Taliban to the negotiating table. The problem was that the Taliban bombed back. On 29 January, the group detonated a car bomb disguised as an ambulance and killed scores in Kabul. This endless cycle of blood cannot continue. Recognition of this in Afghanistan would be a good thing.

For America, the war in Afghanistan is now almost 17 years old and is officially the longest in its history. True, the fighting in Vietnam went on longer, but since war was never declared it is classed as a conflict. Unlike Vietnam, the battle in Afghanistan has not come to define America. Yet today there are US soldiers in Afghanistan who were just out of their “diapers” when the war started. The Taliban, meanwhile, is gaining ground – and controls almost half the country’s districts. There are at least 10,000 US troops in Afghanistan, and a few hundred British ones in a Nato force numbering a few thousand more. If America could not defeat the Taliban with 100,000 soldiers, how it could do so with barely a fifth of that number? The US admission that the solution is ultimately political, not military, is welcome.

Dealing with a murderous outfit such as the Taliban is morally unappealing, but unavoidable. They are also unreliable partners, arguing that all other Afghans should be shut out of talks they would have with the US. This would match the error the US previously made in excluding the Taliban, who can legitimately claim some popular support. Mr Ghani’s elected government is recognised by every nation in the world. Snubbing him would reveal the Taliban as more interested in prestige than peace. On average, 66 civilians die each week in this conflict. While the great powers might be prepared to fight in a war without end, surely the nation’s self-styled patriots – who want better lives for all Afghans – are not.