In December 1979, the Soviet Union expanded its Communist Empire by installing a pro-Soviet government in Afghanistan.
The USSR had already infiltrated Afghanistan, supplying the government with arms and ammunition to aid its battle with the Mujahideen (Muslim rebels supported by Pakistan) and sending in 5,000 Soviet combat troops, which took control of the country.
The USSR gained political influence and by December was able to install a puppet government, arousing the anger of the international community. The West condemned the invasion and sent military aid to the Mujahideen.
The invasion of Afghanistan was widely criticised and lost the USSR many friends. It led to a widespread boycott of the Olympic Games that were held in Moscow.
Afghanistan was a Muslim country and the USSR was criticised by much of the Islamic world.
The Afghan rebels received help from the USA and the invasion encouraged Ronald Reagan to take a tough anti-Soviet stance when he became president in 1980.
The Soviet military action was a failure. The official Afghan army was not strong enough to win alone and once the Soviet forces had become involved it became very difficult to withdraw.
With Soviet help, the Afghan government controlled Kabul, the capital, and other large towns, but the rebels controlled much of the countryside.
More and more Soviet troops were needed to prop up an unpopular government. In the early 1980s, there were about 125,000 Soviet troops in the country.
The situation of the Soviets in Afghanistan was similar to that of the Americans in Vietnam a decade earlier. The 10-year war led to the death of about 15,000 Soviet troops. It also damaged the Soviet economy – one estimate is that the war cost the USSR about $8 billion dollars a year.
As soon as he was in office, Mikhail Gorbachev began to explore ways of ending the war in Afghanistan without destroying the communist government in that country.
In February 1988 he announced publicly that the Soviet army was going to pull out of Afghanistan
The withdrawal began in May 1988, and by February 1989 the last Soviet troops had left.