From Afgantsy: The Russians in Afghanistan 1979-89, by Rodric Braithwaite (Oxford U. Press, 2011), Kindle Loc. 1386-1394, 2000-2025:
In 1968 the Soviet Union had deployed eighteen divisions, backed by eight Warsaw Pact divisions – some five hundred thousand men – to invade Czechoslovakia, a country with a much more forgiving terrain and no tradition of armed resistance to foreigners; a country moreover where, unlike Afghanistan, there was not already a civil war in progress. The government and the KGB initially believed that the job could be done with some 35–40,000 soldiers. The generals naturally wanted more. During the planning phase, under pressure from General Magometov in Kabul and others, the number was increased, and the force which crossed the frontier at the end of December consisted of some eighty thousand soldiers. Even this was nothing like the number that the soldiers believed would be necessary: Russian military experts later calculated that they would have needed between thirty and thirty-five divisions to stabilise the situation in Afghanistan, close the frontiers, secure the cities, road networks, and passes, and eliminate the possibility of armed resistance.
The task before the 40th Army and its commanders as they swept into Afghanistan may have seemed simple, clear, and limited. The Russians had intervened to put an end to the vicious feuding within the PDPA, and to force a radical change in the extreme and brutally counterproductive policies of the Communist government. The aim was not to take over or occupy the country. It was to secure the towns and the roads between them, and to withdraw as soon as the Afghan government and its armed forces were in a state to take over the responsibility for themselves.
This may have looked like a strategy, but it turned out to be little more than an impractical aspiration. The Russians understood well enough that the problems of Afghanistan could only be solved by political means: Andropov had after all argued right at the beginning that the regime could not be sustained with Soviet bayonets. But they also hoped that the Afghan people would in the end welcome the benefits they promised to bring: stable government, law and order, health, agricultural reform, development, education for women as well as men.
They discovered instead that most Afghans preferred their own ways, and were not going to change them at the behest of a bunch of godless foreigners and home-grown infidels. The Russians did not, and could not, address this fundamental strategic issue. The vicious civil war which greeted them had started well before they arrived and continued for seven years after they left, until it ended with the victory of the Taliban in 1996. It was a war in which loyalties were fluid and divided. Individuals and whole groups switched sides in both directions, or negotiated with one another for a ceasefire or a trade deal when the opportunity arose. Fighting and bloodshed erupted within each of the Afghan parties to the war as leaders and groupings struggled for advantage. The Russians found themselves fighting the worst kind of war, a war against an insurgency which they had not expected and for which they were not equipped or trained. All sides behaved with great brutality. There were executions, torture, and the indiscriminate destruction of civilians, their villages, and their livelihood on all sides. Like others who had entered Afghanistan before and since, the Russians were appalled at the violence and effectiveness of the opposition which faced them almost immediately and which made a mockery of their hopes.
One day, both the Russians and the Afghans knew, the Soviets would go home. The Afghans would have to go on living in the country and with one another, long after the last Russian had left. Even those Afghans who supported the Kabul government and acquiesced in the Soviet presence, or perhaps even welcomed it, had always to calculate where they would find themselves once the Soviets had departed.
And there was another fundamental weakness in the strategic thinking of the Soviet government. They had underestimated – maybe they had not even considered – the eventual unwillingness of their own people to sustain a long and apparently pointless war in a far-off country. They were never of course faced by the massive popular movement in America which opposed the war in Vietnam. But a growing disillusion inside and outside government sapped the will of the leadership to continue a war that was brutal, costly, and pointless.
These two misjudgements were sufficient to nullify the military successes of the 40th Army.