Gwynne Dyer is a Canadian-born independent journalist whose column is published in more than 175 papers in 45 countries.

A man is sitting in a train somewhere in Europe, tearing sheets of paper into little pieces and throwing them out the window. (It could have been in America too, but passenger trains are pretty scarce there.)

The only other person in the compartment, puzzled by his behaviour, asks him why he’s doing it. “I’m keeping the elephants away,” the man replies, tossing another piece of paper out.

“But there are no elephants here,” the questioner protests. “See, it works,” says the crackpot triumphantly. Western strategic thinking about the alleged ‘terrorist threat’ from Afghanistan has followed a similar logic for the past twenty years.

The final withdrawal of US and other Western troops has strengthened rather than ended that delusional thinking. Retired military officers, civilian defence pundits and senior politicians are now claiming that the ‘international terrorist threat’ is bigger than ever.

A typical example was Frank Gardner, the BBC’s ‘security correspondent’, who lamented the loss of intelligence sources in Afghanistan that were “vital in disclosing the covert activities of al-Qaeda, ISIS-K, and other jihadist militant groups.

Afghan, US and other special forces were then able to swoop in…and close down those bases before they could successfully launch any international attacks.”

Those operations were so successful, Gardner claimed, that “for 20 years there has not been a single transnational attack launched from Afghanistan.”

Where to begin? Maybe with the idea of ‘terrorist bases’ in Afghanistan. There were Taliban groups operating all over the country, and they had to live somewhere, but it was generally in various houses spread throughout a village or town.

They would have cell-phones, and personal weapons and improvised explosive devices would be hidden not far away, but it’s a bit of a stretch to call all this a ‘base’.

The notion that terrorists need ‘bases’ belongs to the James Bond universe, not to the real world. Its constant use in reference to the Afghanistan invasion is an essential device for those who are still trying to justify that misbegotten adventure, but it was never true, not even in 2001.

The 9/11 attacks were mostly planned by Arab members of al-Qaeda living in Germany, with flight training for the pilots on the hijack teams carried out in the United States. Some of the young men who served as ‘muscle’ on those teams spent time in al-Qaeda’s camp in Afghanistan, but that training could have been done anywhere.

The only real purpose of the ‘training’ in Afghanistan was indoctrination in jihad, a function that is now better done on the internet. And the camp was only in Afghanistan because Osama bin Laden was already a hunted man, and the Taliban leader, Mullah Omar, offered him refuge there.

The two men became friends in the 1980s while fighting the Soviet occupation of Afghanistan. There is, however, little reason to believe that bin Laden ever told the Taliban leader about his plan to attack the United States, which was bound to result in a US invasion and the end of Taliban rule.

Now the Taliban are back in power, but the same logic still holds. There are genuine international jihadis in Afghanistan, mainly in the form of ISIS-K members, but they are few in number and are at war with the Taliban, whom they see as sell-outs to the West.

So the final ignominious departure of Western military forces does not signify an increased risk of international terrorist attacks from Afghanistan – and the elephants will still stay away, too

Gwynne Dyer’s new book is ‘The Shortest History of War’.