From Afgantsy: The Russians in Afghanistan 1979-89, by Rodric Braithwaite (Oxford U. Press, 2011), Kindle Loc. 793-810, 980-992:
The legal basis for any Soviet military intervention was shaky. Under the UN Charter, a country could ask for external assistance if it had been the victim of aggression. But there had been no such aggression. What was going on was an internal struggle, a fight within the revolution, of one group of the population against another.
Andropov weighed in forcefully. If Soviet forces went in, they would find themselves fighting against the people, suppressing the people, firing upon the people. The Soviet Union would look like aggressors. That was unacceptable. Kosygin and Ustinov agreed. Ustinov went on to report that the Soviet military were already doing some prudent contingency planning. Two divisions were being formed in the Turkestan Military District and another in the Central Asian Military District. Three regiments could be sent into Afghanistan at short notice. The 105th Airborne Division and a regiment of motorised infantry could be sent at twenty-four hours’ notice. Ustinov asked for permission to deploy troops to the Afghan frontier and carry out tactical exercises there to underline that Soviet forces were at high readiness. He was, he nevertheless reassured his listeners, as much against the idea of sending troops into Afghanistan as everyone else. Anyway, the Afghans had ten divisions of troops, and that should be quite enough to deal with the rebels.
As for the Afghans’ demand for Soviet troops, the more the Soviet leaders thought about it, the less they liked it. No one had entirely ruled it out. But when they put the arguments to Brezhnev, he made it clear that he was opposed to intervention, remarking sourly that the Afghan army was falling to bits and that the Afghans expected the Soviets to fight their war for them.
And so the final conclusion was that the Soviet Union should send military supplies and some small units to ‘assist the Afghan army to overcome its difficulties’. Five hundred specialists from the Ministry of Defence and the KGB would reinforce the five hundred and fifty who were already in Afghanistan. The Russians would supply 100,000 tons of grain, increase the price paid for Afghan gas, and waive interest payments on existing loans. They would protest to the Pakistani government about its interference in Afghanistan’s internal affairs. Two divisions should go down to the border. But no Soviet troops should be sent to Afghanistan itself.
The KGB had long experience of dealing with Afghanistan, many covert contacts there, and its own ideas of how things should be handled: it was in many ways the lead department. It had invested much of its capital in the Parcham faction, and tended to reflect their views, even though these were a comparatively small proportion of the membership of the PDPA – fifteen hundred out of fifteen thousand.
The rest of the membership was from Khalq. That was also the faction to which most of the Communist officers in the army belonged, men whom Amin had made a special effort to cultivate. The result was a growing contradiction between the views of the KGB, who came to favour intervention and the replacement of Amin by their man, the Parcham leader Babrak Karmal, and the views of the Soviet military, who were prepared to live with Amin because they believed that the main thing was to retain the support of the Khalq officers in the army, many of whom had been trained in the Soviet Union and had good professional relations with their Soviet military colleagues. These disagreements were exacerbated by poor personal relations between senior KGB and army officers, and by rivalries between the KGB and the army’s own intelligence organisation, the GRU.
All this had an increasingly negative effect on the formulation and execution of policy, including the decision to invade Afghanistan in the first place, and the management of policy in the nine years after the invasion took place. Afghan government leaders naturally took advantage of these differences to play one faction off against the other.