Afghanistan – People's Republic of China relations were mostly warm and friendly during most of the 20th Century but after the Soviet invasion of Afghanistan in 1979, relations severely deteriorated. In the 21st century relations have improved significantly.[citation needed]

During the Tang dynasty parts of Afghanistan were under the control of China's Protectorate General to Pacify the West. In 659, Soghd and Ferghana, along with cities like Tashkent, Samarkand, Balkh, Herat, and Kabul, became part of the protectorate under Emperor Gaozong.[2] Afghanistan's Herat and Uzbekistan's Bukhara and Samarkand became part of the Tang protectorate.[3][4] The defeat of the Western Turks and the defeat of the Sassanids by the Arabs had facilitated the Chinese expansion under Emperor Gaozong into Herat, northeastern Iran and Afghanistan (Tukharistan), Bukhara, Samarkand, Tashkent, and Soghdiana, which previously belonged to the western Turks.[5]

Chinese Muslims fought against Japan in World War II. In order to gain backing for China in Muslim countries, Egypt, Syria, and Turkey was visited by Hui Muslim 馬賦良[6] Ma Fuliang and Uyghur Muslim Isa Yusuf Alptekin in 1939.[7] The Hindu leaders Tagore and Gandhi and Muslim Jinnah both discussed the war with the Chinese Muslim delegation under Ma Fuliang while in Turkey İsmet İnönü met with the Chinese Muslim delegation.[8] Newspapers in China reported the visit.[9] Ma Fuliang and Isa were working for Zhu Jiahua.[10]

The bombardment of Chinese Muslims by the warplanes of the Japanese was reported in the newspapers of Syria. Afghanistan, Iran, Iraq, Syria, and Lebanon were all toured by the delegation. The Foreign Minister, Prime Minister, and President of Turkey met with the Chinese Muslim delegation after they came via Egypt in May 1939. Gandhi and Jinnah met with the Hui Ma Fuliang and Uyghur Isa Alptekin as they denounced Japan.[11]

On November 22, 1963, China and Afghanistan signed in Beijing the Boundary Treaty between the People's Republic of China and the Kingdom of Afghanistan. This treaty settled the territorial dispute over the Afghan-controlled Wakhan on the border between Badakhshan Province in Afghanistan and the Xinjiang Uyghur Autonomous Region in China.[12] The China-Afghanistan border is 92.45 kilometers long.[13]

On December 27, 1979, Soviet troops were deployed in Afghanistan. On December 30, Chinese government made announcement condemning the Soviet military invasion, and refused to recognize the Soviet-backed Karmal government. The official relationship was stopped, and the Chinese embassy was degraded to representative office, and only dealt with consular and visa issues.[13]

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 anticommunist militants. China responded to the Soviet war in Afghanistan by supporting the Afghan mujahideen and ramping up their military presence near Afghanistan in Xinjiang. China acquired military equipment from America to defend itself from Soviet attack.[14]

The Chinese People's Liberation Army trained and supported the Afghan mujahideen during the war. The training camps were moved from Pakistan into China itself. Anti-aircraft missiles, rocket launchers and machine guns, valued at hundreds of millions, were given to the mujahideen by the Chinese. Chinese military advisors and army troops were present with the Mujahidin during training.[15] All this was done to undermine the Soviet Union's version of communism, and to prevent the USSR from attempting to encircle China.

In September 2018, Afghanistan's Ambassador to China, Janan Mosazai, announced that China will train Afghan soldiers in China, joining plane crews already training in China.[16]

After the fall of the Taliban regime after the United States intervention in 2001, relations between China and Afghanistan had greatly improved and were reestablished. In December 2001, China sent to Afghanistan a working team of the Ministry of Foreign Affairs, which attended the Afghan Interim Administration's foundation ceremony and sent a message of congratulations to President Hamid Karzai.

In January 2002, President Karzai visited China, and met respectively with Chinese PresidentJiang Zemin and Premier Zhu Rongji. The two sides exchanged the notes of China providing 30 million yuan of emergent material aid and US$1 million in cash to Afghanistan. President Jiang Zemin announced that China would provide US$150 million-worth of assistance to Afghanistan for its reconstruction. The 30 million yuan of emergent material aid had been delivered to Kabul by the end of March 2002. The Chinese Embassy in Afghanistan was reopened on February 6.

In May 2002, Chinese Foreign Minister Tang Jiaxuan visited Afghanistan. During the visit, the Chinese Foreign Minister met with Hamid Karzai, Chairman of the Interim Administration of Afghanistan and ex-King Zahir, and held talks with his counterpart Mr. Abdullah Abdullah. The two sides signed the Agreement on Economic and Technical Cooperation of US$30 million Chinese aid to Afghanistan. In November, Afghan Foreign Minister Abdullah Abdullah visited China. During his visit, the Chinese and Afghan sides exchanged the notes of China providing US$1 million of material aid to Afghanistan. In December, China, together with the other 5 neighboring countries of Afghanistan signed Kabul Declaration on Good Neighborly Relations, reaffirming its commitment to respect the sovereignty and territorial integrity of Afghanistan and to continuously support Afghanistan's peace process and reconstruction.

In February 2003, President Karzai passed through China twice. In May, the Vice President of Afghan Islamic Transitional Government Nematullah Sharhrani paid a working visit to China. During the visit he held talks with Chinese Vice PresidentZeng Qinghong and met with NPC Chairman Wu Bangguo and Premier Wen Jiabao. The two sides signed three cooperative documents including the Agreement of Economic and Technical Cooperation, under which the Chinese Government provides US$15 million grant to the Afghan Government.

Since 2010, China has increased its economic aid and investment in Afghanistan, notably with announcement by Metallurgical Corporation of China (MCC) pledging $3.5 billion to develop Aynak Copper mines.[21] China has the potential to make important contributions to Afghan stability. State-owned Chinese corporations are uniquely risk-tolerant and can help pave the way for future investments. The Chinese also enjoy a more positive relationship with Afghans, making their investments less likely to be targeted for attack by insurgents. These investments can stimulate economic growth that aid money alone cannot.

^Aneja, Atul (January 10, 2018). "China to fund base in Afghanistan". The Hindu. Fergana News Agency (FNA) has quoted Gen. Dawlat Waziri of the Afghan Defence Ministry as saying that China will provide financial support to build the base, whose precise location inside Badakshan, in northern Afghanistan, is yet to the determined. Gen. Waziri said that the Chinese side would cover all material and technical expenses for this base — weaponry, uniforms for soldiers, military equipment and everything else necessary for its functioning.