Foreign involvement in the Soviet–Afghan War

During the Soviet–Afghan War, there was a large amount of foreign involvement. The Afghan mujahidin were backed primarily by Pakistan, the United States, Saudi Arabia, and the United Kingdom making it a Cold War proxy war. Pakistani forces trained the mujahidin rebels while the U.S. and Saudi Arabia offered the greatest financial support. However, private donors and religious charities throughout the Muslim world—particularly in the Persian Gulf—raised considerably more funds for the Afghan rebels than any foreign government; Jason Burke recounts that "as little as 25 per cent of the money for the Afghan jihad was actually supplied directly by states." Saudi Arabia was heavily involved in the war effort and matched the United States' contributions dollar-for-dollar in public funds. Saudi Arabia also gathered an enormous amount of money for the Afghan mujahidin in private donations that amounted to about $20 million per month at their peak. Other countries that supported the Mujahideen were Egypt, China, West Germany, France, Turkey, Japan and even Israel,   Iran on the other hand only supported the Shia Mujahideen, namely the Persian speaking Shiite Hazaras in a limited way. One of these groups was the Tehran Eight, a political union of Afghan Shi'a. They were supplied predominately by the Islamic Revolutionary Guard Corps, but Iran's support for the Hazaras nevertheless frustrated efforts for a united Mujahidin front.

On the other hand, the Soviets were supported with military personnel from Bulgaria, Cuba, Czechoslovakia, East Germany and Vietnam were present in Afghanistan throughout the war, according to a report. Prior to invasion, the Warsaw Pact member states were not consulted. Eastern European troops neither participated in the initial invasion nor, aside from limited advisory missions, took a direct role in the hostilities. In the end, the Soviets would have nothing more than limited political support from the Warsaw Pact countries. Romania went further and broke with its Warsaw Pact allies and abstained when the UN General Assembly voted on a resolution calling for the immediate and unconditional withdrawal of Soviet troops. North Korea also refused to endorse the invasion partly because China was supporting the Mujahideen, so they had to create a fine political balance between them and the Soviets. The allies of the Soviet Union that gave support to the intervention were Angola, East Germany, Vietnam and India.

Pakistan
Shortly after the invasion, Pakistani president Muhammad Zia-ul-Haq chaired a meeting of his military government. At this meeting, Zia asked the Chief of Army Staff General Khalid Mahmud Arif and the Chairman of the Joint Chiefs of Staff Admiral Muhammad Shariff to lead a specialized civil-military team to formulate a geo-strategy to counter the Soviet aggression. At this meeting, the Director-General of the ISI at that time, Lieutenant-General Akhtar Abdur Rahman advocated for an idea of covert operation in Afghanistan by arming the Islamic extremist. As for Pakistan, the Soviet war with Islamist mujahideen was viewed as retaliation for the Soviet Union's long unconditional support of regional rival, India, notably during the 1965 and the 1971 wars, which led to the loss of Pakistani territory to the new state of Bangladesh.

After the Soviet deployment, Pakistan's military ruler General Muhammad Zia-ul-Haq started accepting financial aid from the Western powers to aid the Mujahidin. In 1981, following the election of US President Ronald Reagan, aid for the Mujahidin through Zia's Pakistan significantly increased, mostly due to the efforts of Texas Congressman Charlie Wilson and CIA officer Gust Avrakotos.

The Pakistan Navy were involved in the covert war coordinating foreign weapons being funnelled into Afghanistan. Some of the navy's high-ranking admirals were responsible for storing those weapons in their depots.

ISI allocated the highest percentage of covert aid to warlord Gulbuddin Hekmatyar leader of the Hezb-e-Islami faction. This was based on his record as an effective anti-Soviet military commander in Afghanistan. The other reason was that Hekmatyar and his men had "almost no grassroots support and no military base inside Afghanistan", and thus more "dependent on Zia-ul-Haq's protection and financial largesse" than other Mujahiden factions. In retaliation for Pakistan's assistance to the insurgents, the KHAD Afghan security service, under leader Mohammad Najibullah, carried out (according to the Mitrokhin Archives and other sources) a large number of operations against Pakistan. In 1987, 127 incidents resulted in 234 deaths in Pakistan. In April 1988, an ammunition depot outside the Pakistani capital of Islamabad was blown up killing 100 and injuring more than 1000 people. The KHAD and KGB were suspected in the perpetration of these acts. Soviet fighters and Democratic Republic of Afghanistan Air Force bombers occasionally bombed Pakistani villages along the Pakistani-Afghan border. The target of Soviet and Afghan fighters and bombers were Afghan refugees camps on Pakistan side of the border. These attacks are known to have caused at least 300 civilian deaths and extensive damage. Sometimes they got involved in shootings with the Pakistani jets defending the airspace.

Pakistan actively trained rebels the mujahidin rebels, which resulted in Afghan communist leaders ordering airstrikes in Pakistan at rebel targets. Many secular Pakistanis outside of the government were worried about fundamentalists guerrillas in Afghanistan, such as Hekmatyar, receiving such a high amount of aid, would lead to bolster conservative Islamic forces in Pakistan and its military.

Pakistan also provided volunteers who went to Afghanistan in order to fight, their numbers estimated at around 40,000 by General Mirza Aslam Beg, a former chief of the Pakistan Army.

Pakistan took in millions of Afghan refugees (mostly Pashtun) fleeing the Soviet occupation. Although the refugees were controlled within Pakistan's largest province, Balochistan under then-martial law ruler General Rahimuddin Khan, the influx of so many refugees – believed to be the largest refugee population in the world – spread into several other regions.

All of this had a heavy impact on Pakistan and its effects continue to this day. Pakistan, through its support for the Mujahidin, played a significant role in the eventual withdrawal of Soviet military personnel from Afghanistan.

United States
In the late 1970s, Pakistani intelligence officials began privately lobbying the U.S. and its allies to send material assistance to the Islamist rebels. Pakistani President Muhammad Zia-ul-Haq's ties with the U.S. had been strained during Jimmy Carter's presidency due to Pakistan's nuclear program. Carter told National Security Adviser Zbigniew Brzezinski and Secretary of State Cyrus Vance as early as January 1979 that it was vital to "repair our relationships with Pakistan" in light of the unrest in Iran.

Carter insisted that this "Soviet aggression" could not be viewed as an isolated event of limited geographical importance but had to be contested as a potential threat to US influence in the Persian Gulf region. The U.S. was also worried about the USSR gaining access to the Indian Ocean by coming to an arrangement with Pakistan. The Soviet air base outside of Kandahar was only thirty minutes flying time by strike aircraft or naval bomber to the Persian Gulf. It "became the heart of the southernmost concentration of Soviet soldier" in the 300-year history of Russian expansion in central Asia.

Brzezinski, known for his hardline policies on the Soviet Union, became convinced by mid-1979 that the Soviets were going to invade Afghanistan regardless of U.S. policy due to the Carter administration's failure to respond aggressively to Soviet activity in Africa. Despite the risk of unintended consequences, support for the Mujahiden could be an effective way to prevent Soviet aggression beyond Afghanistan (particularly in Brzezinski's native Poland). In July 1979, Carter signed two presidential findings permitting the CIA to spend $695,000 on non-military assistance (e.g., "cash, medical equipment, and radio transmitters") and on a propaganda campaign targeting the Soviet-backed leadership of the DRA, which (in the words of Steve Coll) "seemed at the time a small beginning." Pakistan's Inter-Services Intelligence (ISI) was used as an intermediary for most of these activities to disguise the sources of support for the resistance in a program called Operation Cyclone.

The Director of Central Intelligence (DCI) Stansfield Turner and the CIA's Directorate of Operations (DO) contemplated sending lethal arms from U.S. stocks to the mujahidin as early as late August 1979, but this idea was ultimately not implemented until after the Soviet invasion in December. The first shipment of U.S. weapons intended for the Mujahidin reached Pakistan on 10 January 1980.

Democratic Congressman Charlie Wilson became obsessed with the Afghan cause. Wilson collaborate with Israeli defense engineers to create and transport man-portable anti-aircraft guns to Pakistan. In 1982 he visited the Pakistani leadership, and was taken to a major Pakistan-based Afghan refugee camp to see first hand the conditions and the Soviet atrocities. After his visit he was able to leverage his position on the House Committee on Appropriations to encourage other Democratic congressmen to vote for CIA Afghan war money. Wilson teamed with CIA manager Gust Avrakotos and formed a team of a few dozen insiders who greatly enhanced support for the Mujahideen. With Ronald Reagan as president he then greatly expanded the program as part of the Reagan Doctrine of aiding anti-Soviet resistance movements abroad. To execute this policy, Reagan deployed CIA Special Activities Division paramilitary officers to equip the Mujahidin forces against the Soviet Army. Avrakotos hired Michael G. Vickers, the CIA's regional head who had a close relationship with Wilson and became a key architect of the strategy. The program funding was increased yearly due to lobbying by prominent U.S. politicians and government officials, such as Wilson, Gordon J. Humphrey, Fred Iklé, and William J. Casey. Under the Reagan administration, U.S. support for the Afghan Mujahiden evolved into a centerpiece of U.S. foreign policy, called the Reagan Doctrine, in which the U.S. provided military and other support to anti-communist resistance movements in Afghanistan, Angola, and Nicaragua.

The CIA gave the majority of their weapons and finances to Gulbuddin Hekmatyar's Hezb-e Islami Gulbuddin who also received the lion's share of aid from the Saudis. There was recurrent contact between the CIA and Afghan commanders, especially by agent Howard Hart, and Director of Central Intelligence William J. Casey personally visited training camps on several occasions. There was also direct Pentagon and State Department involvement which led to several major Mujahideen being welcomed to the White House for a conference in October 1985. Gulbuddin Hekmatyar declined the opportunity to meet with Ronald Reagan, but Mohammad Yunus Khalis and Abdul Haq were hosted by the president. CIA agents are also known to have given direct cash payments to Jalaluddin Haqqani.

The arms included FIM-43 Redeye and 9K32 Strela-2 shoulder-fired, antiaircraft weapons that they initially used against Soviet helicopters. Michael Pillsbury, a Pentagon official, and Vincent Cannistraro pushed the CIA to supply the Stinger missile to the rebels. This was first supplied in 1986; Wilson's good contact with Zia was instrumental in the final go-ahead for the Stinger introduction. The first Hind helicopter was brought down later that year. The CIA eventually supplied nearly 500 Stingers (some sources claim 1,500–2,000) to the Mujahideen in Afghanistan, and 250 launchers. The impact of the Stinger on the outcome of the war is contested, nevertheless some saw it more of a "force multiplier" and a morale booster.

Overall financially the U.S. offered two packages of economic assistance and military sales to support Pakistan's role in the war against the Soviet troops in Afghanistan. By the war's end more than $20 billion in U.S. funds were funnelled through Pakistan. In total, the combined U.S., Saudi, and Chinese aid to the mujahideen is valued at between $6–12 billion. Controversially $600 million went to Hekmatyar's Hezb-i-Islami party which had the dubious distinction of never winning a significant battle during the war. They also killed significant numbers of Mujahideen from other parties, and eventually took a virulently anti-Western line. Cyclone nevertheless was one of the CIA's longest and most expensive covert operations.

The full significance of the U.S. sending aid to the Mujahideen prior to the intervention is debated among scholars. Some assert that it directly, and even deliberately, provoked the Soviets to send in troops. According to Coll's dissenting analysis, however: "Contemporary memos—particularly those written in the first days after the Soviet invasion—make clear that while Brzezinski was determined to confront the Soviets in Afghanistan through covert action, he was also very worried the Soviets would prevail. ... Given this evidence and the enormous political and security costs that the invasion imposed on the Carter administration, any claim that Brzezinski lured the Soviets into Afghanistan warrants deep skepticism." A 2020 review of declassified U.S. documents by Conor Tobin in the journal Diplomatic History found that "a Soviet military intervention was neither sought nor desired by the Carter administration ... The small-scale covert program that developed in response to the increasing Soviet influence was part of a contingency plan if the Soviets did intervene militarily, as Washington would be in a better position to make it difficult for them to consolidate their position, but not designed to induce an intervention." Historian Elisabeth Leake adds, "the original provision was certainly inadequate to force a Soviet armed intervention. Instead it adhered to broader US practices of providing limited covert support to anti-communist forces worldwide".

The US attempted to buy back the Stinger missiles, with a $55 million program launched in 1990 to buy back around 300 missiles (US$183,300 each).

United Kingdom
Throughout the war, Britain played a significant role in support of the US and acted in concert with the U.S. government. While the US provided far more in financial and material terms to the Afghan resistance, the UK played more of a direct combat role – in particular the Special Air Service — supporting resistance groups in practical manners. This turned out to be Whitehall's most extensive covert operation since the Second World War.

Unlike the U.S., British aid to the Afghan resistance began before the Soviet invasion was actually launched, working with chosen Afghani forces during the Afghan government's close ties to the Soviet Union in the late seventies. Within three weeks of the invasion this was stepped up – cabinet secretary, Sir Robert Armstrong sent a note to Prime Minister Margaret Thatcher, Secretary of State Peter Carrington and "C", the head of MI6 arguing the case for military aid to "encourage and support resistance". Support was approved by the British government who then authorised MI6 to conduct operations in the first year of the Soviet occupation, coordinated by MI6 officers in Islamabad in liaison with the CIA and the ISI.

Thatcher visited Pakistan in October 1981 and met President Zia-ul-Haq, toured the refugee camps close to the Afghan border and then gave a speech telling the people that the hearts of the free world were with them and promised aid. The Kremlin responded to the whole incident by blasting Thatcher's "provocation aimed at stirring up anti-Soviet hysteria." Five years later two prominent Mujahideen, Gulbuddin Hekmatyar and Abdul Haq, met Thatcher in Downing Street.

MI6 helped the CIA by activating long-established British networks of contacts in Pakistan. MI6 supported the hardline Islamic group Jamiat-e Islami commanded by Ahmad Shah Massoud commander in the Panjshir Valley. With comparatively little support from Pakistan's ISI and the CIA the British were the primary means of support for Massoud. Despite the CIA's doubts on him he nevertheless became a key MI6 ally and would become an effective fighter. They sent an annual mission of two of their officers as well as military instructors to Massoud and his fighters. They stayed for three weeks or more in the mountains moving supplies to Massoud under the noses of the Pakistanis who insisted on maintaining control. The team's most important contribution was help with organisation and communication via radio equipment. The Cheltenham-based GCHQ intercepted and translated Soviet battle plan communications which was then relayed to the Afghan resistance. MI6 also helped to retrieve crashed Soviet helicopters from Afghanistan – parts of which were carried on mules.

In the Spring of 1986, Whitehall sent weapons clandestinely to some units of the Mujahideen, and made sure their origins were open to speculation. The most notable of these was the Blowpipe missile launchers. These had proved a failure in the Falklands War and had been mothballed by the British army, but were available on the international arms market. Around fifty Launchers and 300 Missiles were delivered and the system nevertheless proved ineffective; thirteen missiles were fired for no hits and it was eventually supplanted by the US Stinger missile. The mujahideen were also sent hundreds of thousands of old British army small arms, mostly Lee Enfield rifles, some of which were purchased from old Indian Army stocks. They also included limpet mines which proved the most successful, destroying Soviet barges on their side of the Amu River.

In 1983 the Special Air Service were sent in to Pakistan and worked alongside their SSG, whose commandos guided guerrilla operations in Afghanistan in the hope officers could impart their learned expertise directly to the Afghans. Britain also directly trained Afghan forces, much of which was contracted out to private security firms, a policy cleared by the British Government. The main company was Keenie Meenie Services (KMS Ltd) led by former SAS officers. In 1985 they helped train Afghans in sabotage, reconnaissance, attack planning, arson, how to use explosive devices and heavy artillery such as mortars. One of these men was a key trainer, a former senior officer in the royal Afghan army, Brigadier General Rahmatullah Safi – he trained as many as 8,000 men. As well as sending Afghan commando units to secret British bases in Oman to train; KMS even sent them to Britain. Disguised as tourists, selected junior commanders in the Mujahideen were trained in three week cycles in Scotland, northern and southern England on SAS training grounds.

The UK's role in the conflict entailed direct military involvement not only in Afghanistan, but the Central Asian republics of the Soviet Union. MI6 organised and executed "scores" of psyop attacks in Tajikistan and Uzbekistan, on Soviet troop supplies which flowed from these areas. These were the first direct Western attacks on the Soviet Union since the 1950s. MI6 also funded the spread of radical and anti-Soviet Islamic literature in the Soviet republics.

China
During the Sino-Soviet split, strained relations between China and the USSR resulted in bloody border clashes and mutual backing for the opponent's enemies. China and Afghanistan had neutral relations with each other during the King's rule. When the pro-Soviet Afghan Communists seized power in Afghanistan in 1978, relations between China and the Afghan communists quickly turned hostile. The Afghan pro-Soviet communists supported China's then-enemy Vietnam and blamed China for supporting Afghan anti-communist militants. China responded to the Soviet war in Afghanistan by supporting the Mujahideen and ramping up their military presence near Afghanistan in Xinjiang. China acquired military equipment from America to defend itself from Soviet attack. At the same time relations with the United States had cooled considerably that by 1980 Washington had begun to supply China with a variety of weapons. They even reached an agreement of two joint tracking and listening stations in Xinjiang.

China may have given support to Tajik and Kazakh insurgents even before the 1978 coup. But the Chinese also requested before the Soviet intervention that Pakistan not permit Chinese arms it had received to be sent to the Afghan guerrillas.

The Chinese People's Liberation Army provided training, arms organisation and financial support. Anti-aircraft missiles, rocket launchers and machine guns, valued at hundreds of millions, were given to the Mujahideen by the Chinese. Throughout the war Chinese military advisers and army troops trained upwards of several thousand Mujahideen inside Xinjiang and along the Pakistani border. Overall, Chinese aid exceeded $400 million.

Czechoslovakia
The Czechoslovak Socialist Republic reportedly supported Soviet actions in Afghanistan. According to some sources, Czechoslovakia's involvement in Afghanistan increased in the early 1980s and became second only to the Soviet Union in providing aid to the Afghan communist regime. Czechoslovakia also trained Afghan communist soldiers and security personnel.

East Germany
Throughout the Soviet–Afghan War, the German Democratic Republic (East Germany) supported the Soviet military campaign as well as the communist government of Afghanistan. East Germany was one of the first and only nations to publicly endorse the Soviet invasion in 1979. However, the East German leadership feared this would cost the country in terms of diplomatic rapport with Western nations, which almost uniformly opposed the invasion. Erich Honecker, then newly appointed chairman of East Germany's ruling State Council, supported the war in public while he lamented the possible jeopardizing of relations with the West over Afghanistan in private. Nevertheless, under Honecker's direction, a number of East German military and security advisers were deployed to Afghanistan, where they were directly embedded in the Afghan regime's intelligence agencies. The presence of East German advisers was first leaked to the Western press by two former Afghan military intelligence officers who defected to Pakistan in 1982; although unverifiable at the time, their accounts were later substantiated by ex-Stasi sources after German reunification.

In 1986 alone, up to 1,000 Afghan military, militia, and internal security personnel were being trained in East Germany. East Germany is also believed to have hosted Mohammad Najibullah for about four weeks. The Stasi worked in concert with the KGB and Naijubullah personally to infiltrate advocacy and funding networks for the Afghan resistance in western Europe.

India
India, a close ally of the Soviet Union, supported the Soviet invasion of Afghanistan and by the end of the hostilities, offered to provide humanitarian assistance to the Afghan communist government. India did not condemn the Soviet intervention in Afghanistan as India was excessively dependent on the Soviet Union for its military and security, and it has been said that "the failure of the Indian government to publicly condemn the invasion, its support of the Soviet puppet regime of Kabul, and its hostile vision of the resistance have created major stumbling blocks in Afghan-Indian relations." India also opposed a UN resolution condemning the intervention.

Vietnam
Vietnam supported the Soviet position over Afghanistan, and Vietnamese troops were reportedly fighting the mujahidin in Afghanistan.