On a cold clear day in January 1980, shortly after Soviet troops began pouring into Afghanistan, I set out from Kabul in an old Volga taxi with three colleagues for the Salang Pass, to see how far the Russians had advanced on the road from the Soviet border.
We crossed through the spectacular Salang Tunnel at the height of the pass, a pillared gallery cut into the steep mountainside, and drove several miles towards the town of Bagram on the other side, before turning back as darkness began to fall. Traffic was flowing freely. All along the mountain road we encountered Soviet paratroopers setting up bases, but they waved us through, apart from one officer who detained us for a couple of hours for taking photographs.
Next day in Kabul I teamed up with a reporter from the New York Times to go to a briefing at the US embassy. It was attended by about a dozen newly-arrived American journalists. When I introduced myself a US diplomat asked me to leave as the information was intended solely for the American media. I was escorted out by an intelligence officer who apologetically told me that they hadn't much to say - other than that the Salang Pass had been blocked for several days.
So much for American intelligence in Afghanistan in 1980. I learned later that of the dozen or so officials at the US mission none spoke Russian, the language of the Cold War adversary just then taking charge of transport and communications in Kabul, not to mention Pashtu or Dari, the main languages of Afghanistan.
Little has changed since then. The September 11th attacks revealed a collossal failure by the US intelligence services. In the aftermath the FBI, responsible for counter-terrorism, has been reduced to placing help-wanted ads in US newspapers for translators of Arabic or Pashtu (at $28 an hour).
Applicants must be American citizens who have spent three of the last five years in the US and renounced any dual citizenship.
Bilingualism, considered normal in Afghanistan and most other parts of the world, is not valued in America and sometimes actively discouraged, according to Dennis Barron, professor of English and linguistics at the University of Illinois. In 1998 only 6 per cent of American college students were taking foreign languages, and only 5,505 were taking Arabic, he wrote in a recent article.
Such weaknesses have compromised American intelligence a number of times.
Before the 1993 World Trade Centre bombing, the FBI had tapes, notebooks and phone taps that might have provided warning signs, said Prof Barron, but they couldn't decipher them as they were in Arabic.
Moscow's intelligence in third world countries is usually superior to other powers. Russian diplomats, unlike their counterparts in the US and elsewhere, are often assigned to just one country or region during their careers, and become specialist in language and politics. In central Asia they could also call on Soviet Tajiks and Uzbeks who spoke the minority languages of Afghanistan.
Even so, Moscow's venture in Afghanistan, with all the advantages of language, proximity, overwhelming air power, and a solid core of sympathisers in the Afghan army, ended in a humiliating failure, and this must provide a powerful lesson for other powers.
What propelled the uprising against the 'Shuravi' as the Russians were known, was from the very beginning the old Afghan determination to drive out the foreigner. But it was also fuelled by the same passion which drives the Taliban today, the desire to set up a Moslem state and impose strict Islamic law.
The latter goal was evident long before the Taliban came on the scene 10 years ago, as any journalist visiting that beautiful rugged country was quickly made aware. A few months after reporting the Soviet incursion into Afghanistan, I crossed into Afghanistan from Quetta and spent several days deep inside Zabul province in a rebel camp where 150 heavily armed Mujahedeen from the Hizb-i Islami group were based .
I asked their commander, Zafaruddin Khan, what he was fighting for. "When the Russians are defeated, and they will never succeed as long as there is one Moslem in Afghanistan, then we will have a pure Islamic state here," he said. "All those who are disbelievers, we will not allow them into an Islamic Afghanistan."
When, a few years later, the Americans began to supply Stinger missiles to the Hizb-i Islami and other Afghan groups fighting the Russians, they could have had no illusions that the ultimate goal of their allies, most of whom have likely defected to the Taliban today, was an exclusive Islamic state.
There was another great irony in this. Seven years later, on my last visit to Afghanistan in 1987, I was taken to the remote Afghan outpost of Khost on a trip organised by the Soviet Foreign Ministry. A bustling city of 40,000 people located 140 miles from the capital, Khost had been cut off by Afghan rebels for several years, and the Russians wanted to show us that the siege had been broken by Afghan forces loyal to the pro-Soviet government.
It was a brief and inconclusive victory in a losing war. While we were there, rebels bombarded the airport with rockets from the surrounding mountains. We saw the wreckage of a civilian aircraft brought down by an American Stinger missile.
But what I remember most vividly was a rally staged for our benefit at the bullet-scarred Palace of Culture. It was addressed by 27-year-old Mahbyba, a slim woman with dark hair combed down to her eyelashes, who condemned the imperialists in the West for supplying weapons to the rebels.
As chairwoman of the Women's Council of Khost, Mahbyba described the repression of women under the tribal and Islamic system in frightening terms.
This is what Afghanistan was in for if the Mujahedin rebels were to win, said the young woman. It was an uncomfortable and disturbing moment for the Western listeners there, myself included, who generally sympathised with the struggle to force Soviet troops to leave.
What it brought home to us, and what the Americans may have been unaware of in their Cold War zeal to halt Russian hegemony, was that the people whose defeat they sought in Afghanistan included the most westernised and secular and progressive in the country.
The middle class of Kabul and other urban centres were not wholly supportive of the Russians.
But they were faced with a terrible set of alternatives. Having emerged from decades of feudalism, they knew that if the Islamic rebels won, modernisation of Afghanistan would be set back and the country would become a fundamentalist religious state.
I do not know what became of Mahbyba, but if she is alive in Taliban-controlled Afghanistan today she is certainly suffering the most brutal repression, like all women there.
The intervention of the United States inadvertently ensured that the movement for women's equality in Afghanistan, along with literacy, medicine and the other benefits sought by a self-consciously developing nation, would be crushed - as indeed happened when both Moscow and Washington washed their hands of a ravaged Afghanistan as the Cold War came to an end.
Conor O'Clery is International Business Editor of The Irish Times, and is now based in New York