Originally, there were four parties involved in the Afghan conflict which are mainly responsible for the debacle in the Af-Pak region. Firstly, the former Soviet Union which invaded Afghanistan in December 1979. Secondly, Pakistan’s security agencies which nurtured the Afghan so-called “mujahideen” (freedom fighters) on the behest of Washington.
Thirdly, Saudi Arabia and the rest of oil-rich Gulf states which generously funded the jihadists to promote their Wahhabi-Salafi ideology. And last but not the least, the Western capitals which funded, provided weapons and internationally legitimized the erstwhile ‘freedom fighters’ to use them against a competing ideology, global communism, which posed a threat to the Western corporate interests all over the world.
Regarding the objectives of the Soviet invasion of Afghanistan in December 1979, the then American envoy to Kabul, Adolph “Spike” Dubs, was assassinated on 14 Feb 1979, the same day that Iranian revolutionaries stormed the US embassy in Tehran.
According to recently declassified documents  of the White House, CIA and State Department as reported by Tim Weiner for The Washington Post, the CIA was aiding Afghan jihadists before the Soviets invaded in 1979. The then American President Jimmy Carter signed the CIA directive to arm the Afghan jihadists in July 1979, whereas the former Soviet Union invaded Afghanistan in December the same year.
That the CIA was arming the Afghan jihadists six months before the Soviets invaded Afghanistan has been proven by the State Department’s declassified documents and admitted by The Washington Post, which is owned by Jeff Bezos, the owner of Amazon. The Washington Post has a history of working in close collaboration with the CIA as Bezos won a $600 million contract  in 2013 to host the CIA’s database on the Amazon’s web-hosting service.
Fact of the matter, however, is that the nexus between the CIA, Pakistan’s security agencies and the Gulf states to train and arm the Afghan jihadists against the former Soviet Union was formed several years earlier.
During the late 1970s, Pakistan’s then-Prime Minister Zulfikar Ali Bhutto began aiding the Afghan Islamists against Sardar Daud’s government, who had toppled his first cousin King Zahir Shah in a palace coup in 1973 and had proclaimed himself the president of Afghanistan.
Sardar Daud was a Pashtun nationalist and laid claim to Pakistan’s northwestern Pashtun-majority province. Pakistan’s security establishment was wary of his irredentist claims and used Islamists to weaken his rule in Afghanistan. He was eventually assassinated in 1978 as a result of the Saur Revolution led by the Afghan communists.
Pakistan’s support to the Islamists with the Saudi petro-dollars and Washington’s blessings, however, kindled the fires of Islamic insurgencies in the entire region comprising Afghanistan, Pakistan and the Soviet Central Asian States.
The former Soviet Union was wary that its 40 million Muslims were susceptible to radicalism, because Islamic radicalism was infiltrating across the border into the Central Asian States from Afghanistan. Therefore, the Soviet Union invaded Afghanistan in December 1979 in support of the Afghan communists to forestall the likelihood of Islamic insurgencies spreading to the Central Asian States bordering Afghanistan.
Even the American President Donald Trump recently admitted : “The reason Russia invaded Afghanistan was because terrorists were going into Russia; they were right to be there.” Incidentally, Trump also implied the reason why Soviet Union collapsed was due to the economic burden of the Soviet-Afghan War, as he was making a point about the withdrawal of American forces from Syria and Afghanistan.
Notwithstanding, in the Soviet-Afghan War between the global capitalist and global communist blocs, Saudi Arabia and the rest of Gulf’s petro-monarchies took the side of the global capitalist bloc because the former Soviet Union and Central Asian states produce more energy and consume less. Thus, the Soviet-led bloc was a net exporter of energy whereas the Western capitalist bloc was a net importer.
It suited the economic interests of the oil-rich Gulf Cooperation Council (GCC) countries to maintain and strengthen a supplier-consumer relationship with the Western capitalist bloc. Now, the BRICS countries are equally hungry for the Middle East’s energy, but it’s a recent development. During the Cold War, an alliance with the industrialized Western nations suited the economic interests of the Gulf countries.
Why did Pakistan choose to join this unholy alliance against the global Left? In order to understand this, we need to take a cursory look at the history of Pakistan. During the British colonial rule before the independence of the subcontinent in 1947, Pakistan’s leadership used to have a patron-client relationship with the British imperialists.
The Indian leadership also used to have that relationship with the British imperialists, but in the case of Pakistan, there was an additional aggravating factor involved: the numerical weakness of the Indian Muslims and their consequent dependence on the British imperialists against the permanent numerical majority of the Hindus.
It’s not that the Hindu leaders were not afflicted with the colonial mentality, but in the case of Pakistani leaders, the myth of invincibility and infallibility of the West was cherished even more. That’s why Pakistan’s first Prime Minister Liaquat Ali Khan declined the request of a state visit from the former Soviet Union and went on a state visit to Washington instead.
It wasn’t just the colonial mentality of Pakistan’s leaders but certain geopolitical considerations also played into their thinking for forming a strategic alliance with the Western bloc. Immediately after the independence, India annexed the Muslim-majority state of Kashmir in violation of the agreed-upon Partition Principle that allocated the Muslim-majority provinces of the British India to Pakistan and the Hindu-majority regions to India.
Then in the 1950s, India took advantage of the Kashmiri territory, as the riverheads of Pakistani rivers are located in Kashmir, and diverted the waters of Pakistani rivers to irrigate India’s western provinces. The whole of Bahawalpur region in southern Punjab turned barren overnight and the agricultural economy of the nascent state of Pakistan suffered a tremendous blow.
With the involvement of the World Bank and the Tennessee Valley Authority of the US, Pakistan and India signed the Indus Waters Treaty in 1960, which allocated exclusive rights for the use of three eastern rivers to India, and some rights such as the right to build hydroelectric projects over the western Pakistani rivers, Jhelum and Chenab, as well.
All these incidents and Pakistan’s relative weakness vis-à-vis India made it even more dependent on the Western military and developmental aid. That’s why it joined the Washington-led, anti-communist SEATO and CENTO alliances in the region during the 1950s.
So much so that when an American U-2 spy plane was shot down in May 1960 by the Soviet Air Defense Forces while performing photographic aerial reconnaissance deep into Soviet territory, Pakistan’s then-President Ayub Khan openly acknowledged that the spy plane had flown from the American airbase in Pakistan’s northwestern metropolis, Peshawar.
When Pakistan had forged such a close alliance with Washington, it became impossible for it to stay neutral when the former Soviet Union invaded Afghanistan in 1979. Regarding the motives of the belligerents involved, the Americans wanted to take revenge for their defeat at the hands of communists in Vietnam, the Gulf countries had forged close economic ties with the Western bloc and Pakistan was dependent on the Western military aid, hence it didn’t have a choice but to toe Washington’s policy in Afghanistan.
In the end, the Soviet-Afghan War proved to be a “bear trap” and the former Soviet Union was eventually defeated and was subsequently dissolved in December 1991. It did not collapse because of the Afghan Jihad but that was an important factor contributing to the dissolution of the Soviet Union.
Regardless, more than twenty years before the declassification of the State Department documents as mentioned in the aforementioned Washington Post report, in the 1998 interview  to the alternative news outlet The Counter Punch Magazine, former National Security Advisor to President Jimmy Carter, Zbigniew Brzezinski, confessed that the president signed the directive to provide secret aid to the Afghan jihadists in July 1979, whereas the Soviet Army invaded Afghanistan six months later in December 1979.
Here is a poignant excerpt from the interview: The interviewer puts the question: “And neither do you regret having supported the Islamic jihadists, having given arms and advice to future terrorists?” Brzezinski replies: “What is most important to the history of the world? The Taliban or the collapse of the Soviet empire? Some stirred-up Moslems or the liberation of Central Europe and the end of the Cold War?”
Despite the crass insensitivity, one must give credit to Zbigniew Brzezinski that at least he had the courage to speak the unembellished truth. It’s worth noting, however, that the aforementioned interview was recorded in 1998. After the 9/11 terror attack, no Western policymaker can now dare to be as blunt and forthright as Brzezinski.