LONDON - In her brilliant book, "The Uses and Abuses of History" the historian Margaret Macmillan tells a story about two Americans discussing the atrocities of September 11, 2001. One draws an analogy with Pearl Harbor, Japan's attack on the US in 1941. His friend has no idea as to what this means. "You know," the first man replies, "It was when the Vietnamese bombed the American fleet and started the Vietnam War."
Historical memory is not always quite as bad as this. But international politics and diplomacy are riddled with examples of bad and ill-considered precedents being used to justify foreign policy decisions, invariably leading to catastrophe.
Munich - the 1938 meeting between Adolf Hitler, Édouard Daladier, Neville Chamberlain, and Benito Mussolini - is a frequent witness summoned to court by politicians trying to argue the case for foreign adventures. Britain's disastrous 1956 invasion of Egypt was talked about as though Gamal Nasser was a throw-back to the fascist dictators of the 1930's. If he were to be appeased as they had been, the results would be catastrophic in the Middle East.
Munich was also produced as a justification for the Vietnam War and President Bush's war of choice in Iraq. 1930's appeasement - a word that elides diplomatic engagement and the rejection of military options - was said to remind us of what would happen if South Vietnam was not defended and Iraq not invaded. We know what happened in both countries.
But analogies are not always wrong, and those that were wrong in the past could prove correct today. One of the arguments for the Vietnam War was the so-called domino theory. If South Vietnam was to fall to the Communists, other countries in South-East Asia would tumble before Communist insurgency.
Things turned out very different. Vietnam proved to be the end not the beginning of the line. Pol Pot's wicked regime murdered millions in Cambodia until Vietnam intervened.
Elsewhere in the region capitalism, promoted by the opening of markets, triggered growth and promoted stability. Globalisation produced its own domino effect. The dominoes toppled; GDP rose; millions were lifted out of poverty; literacy rates soared; child mortality figures fell.
Maybe, if not there and if not then, dominoes are more relevant to foreign and security policy today.
In America and Europe at the moment, many people are calling for the withdrawal of NATO forces from Afghanistan. We are told that NATO and the West cannot build a nation there and that the goals that have been set for establishing democracy and prosperity are unattainable.
NATO soldiers die in vain. Sooner or later the Taliban will sweep to power again, at liberty as happened before to throw acid in women's faces. It is vanity to think that anything can be done to prevent this. Better to cut and run than stay and die, and who is to say that the result will embolden Taliban terrorists? They do not necessarily share the same aims as Al Qaeda.
There have certainly been mistakes in Afghanistan. After the overthrow of the Taliban regime, the West did not commit enough troops to extend the national government in Kabul's authority over the whole country. The Bush administration had turned its attention to the preparations for the Iraq war.
Development has been slow. The build-up of the Afghan army and police has lagged. The poppy crop has grown. Sometimes the military response to insurgency has been too tough; sometimes too light. The West has courted trouble in appearing to isolate the Pashtun.
So the West can do better. There is no doubt about that. But the case for quitting is bad and touches on Pakistan's future as well as Afghanistan's. Leave Afghanistan to the Taliban, hoping against hope that they will become better-behaved global citizens, and what is the effect likely to be on Pakistan? Here come the dominoes - wrong in Vietnam but not necessarily in the South Asian sub-continent.
Afghanistan is NATO's great test. The Alliance has promised to see the job through. So if it abandons the job now, leaving the country to poverty, prejudice, and poppies, what then will happen?
Why should anyone in Pakistan believe that the West is serious in wanting to sustain that country as a Muslim democratic state? Would such a decision help turn the tide against the Taliban? Would it encourage the middle-class professional and urban workers in Pakistan, disgusted by the excesses of the extremists, to dig in and see off fundamentalism? Would it strengthen the more moderate elements in politics and the military? You can count on us, the West would be saying, but don't look next door to Afghanistan, where you will see that you can't rely on us.
If Pakistan, nuclear weapons and all, was to fall to the extremists, the consequences in terms of encouraging the export of terrorism would be dire. Think about Kashmir. Think about India. How would India's government view the future if Pakistan falls into the hands of fundamentalists?
So the West should see the job through in Afghanistan - do it better but do it. Sometimes the dominoes do topple over, one by one. That is not a prospect that anyone should welcome in South Asia.