By Paul Reynolds
World affairs correspondent, BBC News website
History points to countless failed ventures in Afghanistan
In the 19th century, Afghanistan was the scene of the "Great Game" played between the British and Russian empires on the doorstep of India.
In the 20th, it was a battleground where Soviet communism was checked and defeated.
In the 21st century, it has become one of the testing grounds on which the battle between Western and fundamentalist Islamic ideas of government is being fought out.
The latest battle was one that many had thought was all over as far as Afghanistan was concerned. Perhaps they had not read their history properly. It is rarely "all over" in Afghanistan.
They did at least have some reason for their optimism. After the Taleban government was toppled following the 11 September attacks, because of its support for Osama Bin Laden, a new government was elected and hundreds of thousands of refugees were able to go home.
So-called "reconstruction teams" led by various Nato countries were despatched around the country to rebuild roads and public buildings.
Afghanistan, it was said, would not be left alone again.
But another operation was also going on, which got coverage only from time to time, usually when something went wrong.
This was a fight led by US troops against those Taleban and al-Qaeda forces that had not been dispersed post-2001.
It is this fight that British (and other Nato soldiers, including the Canadians who have taken more casualties than the British) troops have now joined, rather against their public expectations. They were supposed simply to support the reconstruction teams and the extension of Afghan government rule into the less controllable provinces of the south and east.
Instead they have had to fight.
Fighting never stopped
The over-optimistic view taken by the British authorities was expressed by the then Defence Secretary John Reid when British troops were sent in a few weeks ago.
"We hope we will leave Afghanistan without firing a single shot," he said.
The fighting had never really stopped. The Taleban have made a comeback, not enough to threaten the government of Hamid Karzai, but enough to threaten his rule in some of the remoter parts of the country.
The question now is whether the counter-attack led by Western forces will make things worse or will suppress what in the 19th Century would have been regarded as a tribal rebellion.
The 19th Century is not particularly useful if you are looking for lessons to be learned from previous British encounters with the Afghans.
In the First Afghan War of 1839-42 (or 1838 if you go back to when the troops set off from the Punjab), the British did manage to put a compliant ruler on the Afghan throne as a buffer against Russian influence, but it then all went disastrously wrong.
It ended when a British column of soldiers and camp followers some 16,000 strong was massacred as they tried to withdraw. One of the few survivors (some claim he was the only one) was a doctor, William Brydon.
The Second Afghan War (1878-80) was not much more successful. A British invasion did manage to put another helpful ruler in power but he abdicated following a rebellion and the British were forced out.
They did however leave behind another ruler, Abdur Rahman Khan, who accepted British influence to keep Afghanistan as a buffer state and yet who was strong enough lay the foundations of the modern state.
The Russians did not fare any better in the attempt to support a communist government in Afghanistan in the late 20th century. That adventure ended in withdrawal and the defeat in Afghanistan came to be part of the wider collapse of communism.
Of course, the argument today is that it is all different now. There is a democratically elected government in Kabul, it is stated, and the Western troops are only there to help and even then in small numbers.
We are not talking of the tens of thousands of British troops that invaded in 1878 or the Russians in late 1979.
But there is one lesson from all foreign interventions in Afghanistan. It might look easy but it isn't.
That does not mean to say this effort will fail. It does mean that it will be hard.