Russian troops killed between 500,000 and a million Afghans between 1979 and 1989—and discredited the left for a generation. The opposition Mujahideen groups that drove them out then collapsed into warring factions.
The Taliban came into being in 1994 under the patronage of Pakistani intelligence—and with the quiet support of the US.
Its members came from religious schools around refugee camps in Pakistan.
Despite their harsh interpretation of Islam, they promised law and order, peace and honesty. After 16 years of war and insecurity many Afghans were willing to accept that promise.
Osama Bin Laden emerged as a fighter against the Russians in Afghanistan. The Taliban government allowed Bin Laden to build Al Qaida.
After 9/11 the US demanded that the Taliban hand over Bin Laden—it refused.
The US invaded. It relied on a mixture of bombing, special forces and allies inside the country. But it was stalemate—no one wanted to fight for the Taliban or the Northern Alliance of former Mujahideen that the US had backed.
The US got their military victory by allowing the Taliban to slip away unmolested.
The US installed Hamid Karzai as dictator. He was a CIA agent and had been an official in the Taliban government.
At first most Afghans were prepared to accept the invasion. They hoped for peace and stability. But they lost patience. The occupying troops became more oppressive and insecurity has grown.
The Taliban lead the resistance. They are the only organised force who have been root and branch opposed to the occupation.