After the Second World War and the independence of India, Britain declined as an imperial power and the US replaced it.
The Cold War saw both the US and the Soviet Union try to gain influence in Afghanistan. By now Stalinist Russia bore no relation to the revolutionary country of 1917 that had no imperial designs on other states.
During the 1950s and 1960s Afghanistan had one of the highest rates of aid per head in the world. The government remained neutral, emphasised the country’s strategic position, and raked in the cash from all sides.
The Afghan airforce flew Russian MIGs, but the pilots were trained in the US. The government used the planes and army to bomb and shoot Afghan people who took part in a whole series of local rebellions.
A left grew through the 1960s and 1970s but it lacked a base and found itself looking to change from above.
In 1978 a Communist coup led to a civil war. The government carried out some limited measures that benefited women and the poor, but it brutally repressed all opposition.
This pro-Russian government collapsed in 1979 after 18 months in power, and Russian leader Leonid Brezhnev sent in troops. They occupied the country, took over the government and fought a colonial war.
The Russians invaded to ensure that Afghanistan remained friendly to them. Their motives were exactly the same as those of British imperialism and the US today – to protect their imperialist interests.
Russia had four Central Asian republics bordering Afghanistan – what are now the countries of Uzbekistan, Turkmenistan, Tajikistan and Kyrgyzstan. If Afghanistan fell to insurrection, they might follow.
The Soviet invasion was a disaster for the people of Afghanistan. There were eight years of bitter war.
Because the resistance had the support of the people, the Russians could only fight back with repression.
They used bombers, hundreds of thousands of land mines, helicopter gunships and napalm. Roughly a million Afghans died, out of a population of 25 million.
Opium production in Afghanistan took off in 1979 as the whole economy collapsed. The US supported elements of the Afghan resistance in the 1980s to destabilise Russia as part of the Cold War.
The superpowers kept the war going until 1989, when Russian troops were finally forced to leave. Around six million Afghans had been forced to flee to refugee camps in neighbouring Pakistan and Iran.
The US government had poured billions of dollars of military aid in the 1980s and then cut it off in the 1990s after the defeat and collapse of Russia.
It wanted nothing more to do with a country that was no longer any use after the end of the Cold War.
Local powers encouraged civil war and in 1994 the Taliban, which had grown up in the refugee camps, invaded from Pakistan, supported by the US. Pakistani military support and Saudi money followed.
While the country was ravaged by famine and war, the US could not leave Afghanistan alone. In 1998 Bill Clinton bombed the country.
And then after 9/11 the US chose the weakest, least defended and most desperate place to attack – Afghanistan.
Seven years on imperial occupation has further destroyed the lives of the Afghan people, and the Afghans are again resisting an imperial occupation.
Afghan society can only be transformed in the interests of the mass of the people by workers and peasants taking their lives into their own hands.
Achieving this will require the final expulsion of all imperialist forces from the country.
Class struggle toppled apartheid