"IT cam wi’ a lass and it will gang wi’ a lass,” King James V said on his death bed, foreseeing the end of the Stuart dynasty.

Nato intervention in Afghanistan came with an atrocity in the Twin Towers and ended with an atrocity in the streets of Kabul. Should it really take the carnage and death of 13 US service people, three British civilians and more than 170 Afghans to illustrate that Isis-K and the Taliban are not one and the same thing?

Daesh is a death cult beyond reason or negotiation. That does not seem to be the view the American administration has of the Taliban, given it have been negotiating with them for years.

The Taliban government of the 1990s was a bloody disaster, brutal, repressive and totally contemptible in its treatment of women. We don’t know if the “new” Taliban will be different in substance. The jury is still out. But there is no doubt that the west will have to engage with them.

There are two reasons for confronting that reality and here firstly let me agree with Boris Johnson who, only two years into his premiership, has finally said something semi-sensible. On Sunday he argued that recognition of the new government, the unfreezing of Afghan assets and international assistance depend on their actions in not being a safe haven for international terrorism and in their treatment of women.

The National:

The hope must be that targeted and conditional aid and support will achieve far more for Afghanistan, and Afghan women in particular, than 20 years of an endless cycle of bombs, bullets, missiles or IEDs ever could.

The second reason is equally powerful and the argument was made controversially at the weekend by Pakistan’s national security adviser Moeed Yusuf. He pointed out the self interest in positive engagement. If the international community stands by and watches the collapse of Afghanistan into a failed state, all sorts of nasties will crawl out from under the stones. It would create all over again the circumstances that drove Taliban mark one into the deadly embrace of Al-Qaeda. That, as they say, is a real and present danger.

READ MORE: David Pratt: Kabul Airport attack was reminder other dangerous forces exist in Afghanistan

Former Labour minister Lord Hutton, when asked what were the achievements after the long years of intervention, immediately cited a 20-year pause in terror based in Afghanistan. This rationale rather ignores the 200,000 Afghan, Pakistani and coalition dead and the shift of the “war on terror” to Iraq and Daesh terror across so many other countries.

A failed state in Afghanistan will spill over instability into all of the states of Central Asia through floods of refugees. This is not an area of the world where instability is in short supply. And preventing this will be no easy task. The Afghan banking system is in a state of collapse. Public servants are not being paid. The economy is still largely agrarian, but the biggest growth sector in 20 years of the coalition propping up venal governments has been the opium crop blossoming to become perhaps a quarter of the entire economy.

This is ironic, given that stopping it was one of the original justifications for staying in Afghanistan after the initial mission was over.

Now that the occupying force has left, regional, ethnic and tribal rivalries may re-emerge in the victorious forces. Afghanistan in some areas has no sense of loyalty beyond tribe.

THUS the attempt by the Taliban to accommodate in the emerging administration of former president Karzai and other defeated combatants. The new government which will be formed in days will give an early indication if they have succeeded in establishing a genuine coalition. The reality, after 45 years of desultory conflict, is grim. Pointing out these abroad truths from home in this column has caused a fair stushie online.

It is astonishing the number of trolls who believe they can parade their supposed support for the Muslim women of Afghanistan by piling on a Muslim woman in Scotland. But the anxiety of some to deride and name call does not change reality. And the biggest reality is the uncertain future of people in Afghanistan.

So what is our policy beyond the desperate evacuation of those to whom we owe the obligation of comradeship in war? That at best will have secured the lives and hopes of some thousands.

READ MORE: Tasmina Ahmed-Sheikh: Tony Blair’s back – and we should not be listening

But what is to be done to help the 38 million people who remain in Afghanistan? They will not be helped by allowing the country to go to rack and ruin. They won’t be helped by fermenting yet another civil war. They won’t be helped by pretending the Taliban are not in charge.

They might be helped by accepting reality, and focusing aid and support in a way that stabilises the economy. By all means target the aid and make it conditional on progress, but let us not turn our backs on Afghanistan.

Let us offer to train another army by all means – an army of medics to help the sick and vaccinate the population, an army of engineers to sort out the irrigation and let a range of crops flourish, an army of teachers to educate women and men equally, and more than a small percentage of the elite.

In the 19th century, Russia and Britain played out the “Great Game” in Afghanistan. It took British armies twice into Afghanistan and on both occasions they found the going in much easier than the coming out. Indeed, the most decisive of the Afghan wars in terms of outcome was the third one, when Afghanistan turned the tables and invaded British India in 1919.

Today a new game is being played, with the main protagonists now the USA and China. Just as in the 19th century, the aim is to ensure that the rival power does not achieve any strategic advantage by holding Afghanistan as a key to Central Asia. But holding it comes at great cost to the occupier. After the chastening experience of the last 20 years, perhaps a new policy response will emerge.

But let us hope that whatever follows will finally put the interests of the Afghan people first and geopolitics second.