The war is usually divided into four distinct phases. The first lasted from December 1979 to February 1980, and covered the initial deployment of the Soviet forces throughout the country.
The original Rules of Engagement permitted the Soviet soldiers only to return fire if attacked, or to liberate Soviet advisers captured by the insurgents. But casualties began to mount from the very start. The first ambush took place soon after the soldiers had arrived. In mid-January an Afghan artillery unit mutinied and its three Soviet advisers were unpleasantly murdered. The Afghans asked the Russians for help. About a hundred Afghans were killed, for the loss of two Soviet soldiers.
A major demonstration broke out in Kabul on 21 February: some three hundred thousand people are said to have come on to the streets, shouting anti-government and anti-Soviet slogans. The demonstrations continued the following day, the largest protest ever seen in the capital provoked, the Russians believed, by agents from outside the country, including an alleged CIA officer, Robert Lee. The demonstrators filled the main roads and the squares, and marched on the Arg, where Karmal was now in residence. Administrative buildings were besieged, the Soviet Embassy was bombarded, and several Soviet citizens were killed. Shops were looted, cars were destroyed, and a major hotel was set on fire. Casualties began to rise among the civilian population. General Tukharinov, the commander of the 40th Army, was ordered to block the main approaches to the city and the demonstrations were brought under control.
But it was a turning point. Moscow ordered the 40th Army to ‘begin active operations together with the Afghan army to defeat the detachments of the armed opposition.’ The Russians launched their first major operation in Kunar province, on the frontier with Pakistan, in March. Even during this first period the 40th Army lost 245 soldiers, an average of 123 a month.
Soviet columns were already being attacked on the main supply roads from the Soviet Union. In response the Russians set up a system of mutually supporting guard posts (zastavas) at regular intervals along the main roads, around the major cities and around airports, observing the movements of the mujahedin, watching over electric power stations and pipelines, escorting convoys, and if necessary calling in an air or artillery strike as backup. There were 862 of them spread throughout the country, manned by over twenty thousand men, a substantial proportion of the 40th Army’s strength.
These guard posts where among the most distinctive features of the war. Some were very small – no more than a dozen soldiers. The men in these tiny garrisons might remain there, unrelieved, for as long as eighteen months. Some were perched in inaccessible places, on heights overlooking Afghan villages or supply routes, where they could only be supplied by helicopter. They were regularly attacked: in the eight months between January and August 1987 three zastava commanders and seventy-two men were killed; and 283 were wounded. But none of these zastavas was ever captured; they survived, not so much by force of arms, which in the long run would have been impossible, but because their little garrisons took care to be on reasonable terms with the people in the surrounding villages.
But life in a zastava was a monotonous and exhausting business. Poor food and water, little entertainment apart from the obligatory Lenin room and perhaps a television, and the ever present threat of disease or an enemy attack wore them down morally, physically, and psychologically. They survived, where Western soldiers might not have done perhaps, some of them said, because most of them came from hard lives and cramped quarters back in their own homes in the Soviet Union. The enforced intimacy in a small guard post for months at a time was no worse than the enforced intimacy of life in a communal flat.
General Valentin Varennikov, a veteran of Stalingrad and a ruthless, wilful, and controversial figure, had by now succeeded Sokolov as Head of the Ministry of Defence’s Operational Group. He visited one zastava perched on the top of a mountain close to Kabul, which was part of the city’s outer defences. ‘[T]he helicopter made one and then another circle above the zastava and then cautiously began to lower itself with one wheel of the chassis on to the tiny landing strip, which was about 1.5m by 4m. When the wheel touched the stone, the three of us jumped out and the helicopter flew off…
‘The territory of the zastava was shaped like an irregular rectangle. On three sides it was surrounded by a solid wall of sandbags brought in by helicopter. There was no fourth wall, because it was here the helicopter would touch down with one “foot” on the land. There were two heavy DShK machine guns at either end of this square, which was about six square metres in area. Steps led down to a little square below. Here there was a 120mm mortar, with a mountain of shells piled up beside it, and a shelter from the weather.
‘From the little square, a path ran downwards at about 45°, a set of steps hacked out of the granite rock, on both sides of which was stretched a stout rope instead of banisters. At the bottom there was another little square, about the same size as the one above. Here there was another heavy machine gun and this was where the tiny garrison – 12 men in all – had their living: a place to relax, a kitchen, somewhere to wash and so on, the furniture – chairs, tables, sleeping places – all made out of ammunition boxes.’
The second phase of the war lasted from March 1980 to April 1985. Both sides learned to improve their tactics. After getting a bloody nose in direct confrontations with the Russians, the mujahedin adopted the classic tactics of the guerrilla: hit and run, ambush, booby trap. In the summer of 1980 a band based only four miles from Kabul succeeded in bombarding the headquarters of the 40th Army in Amin’s old palace, now repaired after the damage that had been done to it during the fighting in December. With the launching of the first large-scale operation in the Pandsher Valley in April 1980 the Soviet Union stepped deep into the quagmire. Other major operations followed, on a scale which the Soviet army had not experienced since the Second World War. In August the Reconnaissance Battalion of the 201st Motor-rifle Division was ambushed on the border with Tajikistan at Kishim and lost forty-five men. Delegations from the Soviet Union began to arrive to see for themselves what was going on. So did the first concert parties to entertain the troops. It was in this phase that the Soviets suffered most of their casualties: 9,175 killed, an average of 148 a month.
The third phase lasted from May 1985 to the end of 1986. Gorbachev began active negotiations to bring the soldiers home and there was a deliberate effort to reduce casualties in what was becoming an increasingly unpopular war. The Soviet forces sought to confine themselves to air and artillery operations in support of the Afghan forces, although motor-rifle units were primarily used to back up the operations and the fighting morale of their Afghan allies. The special forces – the SpetsNaz and reconnaissance units – concentrated on attempting to prevent supplies of weapons and ammunition reaching the rebels from abroad. But even these support operations could involve very serious and costly fighting: 2,745 soldiers were killed during this period, an average of 137 a month – a decline, but not a substantial one. The Soviet withdrawal began during this third phase, when six Soviet regiments were brought home in the summer of 1986; a net reduction of fifteen thousand troops.
It was in this phase that mujahedin cross-border raids into the Soviet Union instigated by the Pakistanis reached their height. These did little damage. But the Americans worried that they might provoke a disproportionate Soviet response. Indeed when a raiding party penetrated more than twelve miles north of the Amu Darya river and struck a factory with rockets in April 1987, the Soviet Ambassador in Islamabad stormed into the Foreign Ministry to warn that further attacks would have severe consequences, and the raids were called off.
The fourth and final phase of the war began in November 1986 with the installation by the Russians of a new Afghan president, Mohamed Najibullah, to replace Babrak Karmal. With active Russian support, Najibullah launched a Policy of National Reconciliation, which was intended to reach out to moderate non-Communist political and religious leaders, while building up the Afghan army and security forces so that Soviet military support could eventually be dispensed with.
The Soviet forces continued to support the operations of the Afghan army. But the Soviet commanders were now determined to keep their casualties to a minimum and made greater use of long-range bombers flying secret missions from the Soviet Union, missions which for cover purposes were attributed to the Afghan air force. In one incident near the end of the war, a heavy bomb dropped from a long-range bomber landed close to an Afghan military headquarters, and another killed several dozen civilians. Fragments of the bomb were discovered in the wreckage, the Afghans complained, and the Soviets set up a commission of inquiry. But the incident was hushed up and no one was punished. The bombers attempted to suppress mujahedin positions in the areas around Faisabad, Jalalabad and Kandahar which the 40th Army had already abandoned. They ineffectively attacked the mujahedin rocket batteries which were now shelling Kabul with greatly increased frequency. In the very last weeks of the war they bombarded Masud’s positions in the Pandsher Valley. The purpose of this so-called Operation Typhoon was political rather than military.
But most of the energies of the 40th Army were confined to preparing and then executing their final withdrawal from the country in February 1989. The withdrawal took place in two stages, between May and August 1988 and between November and February 1989. It was accomplished with the same logistical skill that the Russians had shown when they first entered the country. During this period 2,262 soldiers were killed, an average of eighty-seven a month.
The withdrawal was not seriously opposed by the rebels, who by then were much more concerned with jostling for power in the new Afghanistan. The resulting civil war was, at least for Kabul, more destructive than anything that had happened during the Soviet war.
General Lyakhovski, the indefatigable Russian chronicler of the war, paints a devastating picture of the 40th Army’s performance. Until the middle of 1980, he says, the troops were hidebound by orthodoxy, sticking close to their armoured vehicles in the valley roads. Later their performance improved, but even so many problems remained unsolved. Units were understrength, and the need to remain alert against mujahedin attacks by day or night led to physical exhaustion and low morale. The soldiers lacked stamina. They were poorly trained. Their personal equipment was inadequate. Junior commanders were careless about security and intelligence, and tactically inept, so that even when they got them at a disadvantage, the rebels were too often able to break out. Lyakhovski’s devastating conclusion was that the Soviet Union’s comparative failure in Afghanistan, its first war since the Second World War, demonstrated its weakness, robbed it of confidence in its own strength, and dispelled the myth of its military invincibility.
This is not entirely fair. Despite the criticisms levelled against the soldiers of the 40th Army, the best of them became formidable fighting men, respected and feared by their enemy. The troops from the elite parachute and special services units were increasingly well trained and equipped to fight their elusive enemy. Edward Girardet, who spent much time with the mujahedin, reported, ‘The special troops are swift, silent and deadly. Swooping down in a single December  raid, they slaughtered 82 guerrillas and wounded 60 more.’ A mujahedin commander, Amin Wardak, described the ambush: ‘They attacked at night in a narrow gorge. At first, we didn’t know we were being shot at because of the silencers. Then our people began falling.’
The 40th Army was unique in its composition. ‘Never before in the history of the Soviet armed forces,’ said its last commander, General Gromov, ‘had an army had its own air force. It was particularly well supplied with special forces units – eight battalions in all, alongside the highly trained air assault and reconnaissance units.’ It was unique, too, in the task it was set. Unlike some Western armies, no other Soviet army was ever asked to fight an extended counter-insurgency war in a foreign country. The 40th Army was disbanded as soon as the war was over. It had won all its major battles and never lost a post to the enemy: a record which consoled its commanders. But it was never able to deliver the political success which the leaders of the country had hoped for.