Sort of Monday morning quarterbacking, but via Aaron Sorkin. It didn't hit me in 2007 the way it did when I watched it yesterday. The Soviet Union's history there deserves another movie. And if you try to research the times before the Soviet troops went in, you find a lot of revisionist history on-line.
I have no idea if this source is totally reliable, but I think it more trustworthy than others I came across.
https://www.britannica.com/event/Soviet-invasion-of-Afghanistan
In April 1978 Afghanistans centrist government, headed by Pres. Mohammad Daud Khan, was overthrown by left-wing military officers led by Nur Mohammad Taraki. Power was thereafter shared by two Marxist-Leninist political groups, the Peoples (Khalq) Party and the Banner (Parcham) Partywhich had earlier emerged from a single organization, the Peoples Democratic Party of Afghanistanand had reunited in an uneasy coalition shortly before the coup. The new government, which had little popular support, forged close ties with the Soviet Union, launched ruthless purges of all domestic opposition, and began extensive land and social reforms that were bitterly resented by the devoutly Muslim and largely anticommunist population. Insurgencies arose against the government among both tribal and urban groups, and all of theseknown collectively as the mujahideen (Arabic mujāhidūn, those who engage in jihad)were Islamic in orientation.
These uprisings, along with internal fighting and coups within the government between the Peoples and Banner factions, prompted the Soviets to invade the country on the night of Dec. 24, 1979,