You may have to send in the troops, but they won't solve the conflict. The most they may do is help persuade the enemy to accept a ceasefire, usually after a significant loss of life and secret, backchannel, talks between the combatants.

Sending in the troops, unleashing bombs, may prevent the enemy from winning the war but they will not bring peace. As British defence chiefs say repeatedly, there can be no military solution to the conflict in Afghanistan. That means talking to terrorists, and as a matter of increasing urgency.

It may be little comfort to the families of soldiers killed in action. But this is what happened in Northern Ireland, with MI6 talking to IRA leaders at the height of the violence. And it will happen, slowly and stutteringly, in Afghanistan.

Comparisons with Northern Ireland were made earlier this week conversations with a group of British experts who recently held private meetings with senior Taliban figures. The Taliban group appeared as pragmatic as the IRA — talking about an "unwinnable war", a ceasefire, and "power sharing", according to their British interlocutors.

General Sir Peter Wall, the head of the British army, told the International Institute for Strategic Studies early this year that "the real fixes [in Afghanistan] are at the political level and these too now show some sign of movement...developments in dialogue with the Taliban being a case in point".

He added: "Progress in this domain is vital if we are to achieve a soft landing by 2014 [when all Nato-led foreign troops will end all ground combat operations]." Prospects for future stability and "the history of deal making in that region" gave some grounds for cautious optimism", said Wall. That was eight months ago.

"Dialogue, not only with the dictators of the world but with the terrorists, is necessary", Dame Eliza Manningham-Buller, the former head of MI5, says in her recent booklet, Securing Freedom, published by Profile Books and based on her BBC Reith lectures last year.

She adds: "My most relevant experience of this is the complex and prolonged talks in Northern Ireland. There are plenty of other examples, including talking to Hezbollah and to Hamas. Talking doesn't mean approval."

In Afghanistan, it seems many more soldiers — and civilians — will be killed before any talks bear fruit, presumably well after the US presidential election in November.

• The British government's concern about a possible Israeli attack on Iran has been underlined by a visit to Jerusalem by a senior UK official reported to be Sir John Sawers, head of MI6, though possibly another security or intelligence adviser.

Israel's Haaretz newspaper quoted an unnamed Israeli source as saying that a high-ranking British special envoy had paid a secret visit to meet Mr Binyamin Netanyahu, the prime minister and defence minister Ehud Barak, to deliver a "stern message" from David Cameron. The source said the envoy warned against "an uncoordinated Israeli strike on Iran at this time" and stressed that Britain believes there is still time for diplomatic measures to work.

The last thing military chiefs in the UK and US is war with Iran, a conflict which would further endanger their troops in Afghanistan and elsewhere in the region — as well as provoke havoc in the Middle East.

General Martin Dempsey, chairman of the US joint chiefs of staff, made the point at a press briefing in London recently. An Israeli attack on Iran, Dempsey said such an attack would "clearly delay but probably not destroy Iran's nuclear programme".

Israeli intelligence and military chiefs have sent a similar message. British defence chiefs echo their concerns — and have the added embarrassment, to say no more, of the likelihood of the US using its bomber base on Diego Garcia, in the British Indian Ocean Territory, in any attack on Iran.