China came into contact with Kazakhstan as early as the 2nd century BC.
Han dynasty During the
Han dynasty, one of Kazakhstan's ancestors, the
Wusun, practiced
heqin (intermarriage) with the Chinese, marking the beginning of relations. During the rule of
Emperor Wu of Han,
Zhang Qian was the official dispatched to the
Western Regions (西域 xiyu) to help the Wusun against the
Xiongnu (which were also one of the ancestors of modern Kazakhs). Since the Wusun did not want to cooperate with the Xiongnu, they allied with the Han dynasty to defeat the Xiongnu (
Han–Xiongnu War). The
Battle of Zhizhi (郅支之戰) was fought in 36 BC between the
Han dynasty and the
Xiongnu chieftain
Zhizhi Chanyu. Zhizhi was defeated and killed. The battle was probably fought near
Taraz on the
Talas River in eastern Kazakhstan, which makes it one of the westernmost points reached by a
Chinese army (
Protectorate of the Western Regions).
Tang During the
Tang dynasty, China reached apex by
crushing the
Western Turkic Khaganate, which was an ancestral state of the
Kipchaks that would birth the future Kazakh people, and established the
Anxi Protectorate. Later in 751 the
Battle of Talas was fought in the same area as the Battle of Zhizhi, which China lost and slowly weakened Chinese influence in Central Asia, though not until the
An Lushan rebellion were the Western Turks won back their freedom.
Mongols In the 13th century,
Genghis Khan briefly unified the two regions under the
Mongol Empire. However, once the
Mongol Empire divided, the two separate realms were founded: the
Golden Horde under
Jochi would have an immense impact on the development of Kipchaks as a deeply Mongolised Turkic tribe, ultimately gave birth to Kazakh identity in the future; while the
Yuan dynasty ruling China would become one of China's dynasties, though it never shed away its Mongol identity and ultimately fell in 1368 as the only
de-Sinicised Chinese dynasty in the history.
Ming Long before the founding of the Kazakh nation, the
Kazakhs established ties with the Tarim Basin region. In 1456,
Kerei Khan (克烈) and
Janibek Khan (贾尼别克) defected to the
Moghulistan, which controlled the Tarim Basin region.
Esen Buqa II gave the western part of the western border in
Zhetysu to two Kazakh kings. This provided territory for the initial establishment of the
Kazakh Khanate. Since then the two countries have joined forces against enemies and intermarried like the
Uzbek Khanate and
Timurid Empire, but they have also fought each other. It was during this time, the first Kazakh embassy visited China sometime around the 1450s. Under the reign of
Jiajing (1522–1566), the foundations for a flourishing relationship between
Ming China and the
Kazakh Khanate were established, but contacts stopped after 1537, as the Ming dynasty was more focused on internal affairs and less interested in going to war elsewhere.
Qing In the 16th century, a group of
Oirat Mongolians crossed the
Altai Mountains from the
Mongolian Plateau to enter the
Dzungarian basin and then entered the
Kazakh Steppe. In 1640, the Dzungars unified the various tribes of Oirat Mongolia and formed the Dzungar khanate. In 1680 the Dzungars defeated the
Yarkent Khanate in the Tarim Basin region. In the 17th century, the Dzungars defeated the second of three
Zhuz's of the
Kazakh Khanate, causing a huge crisis among Kazakh population, including the infamous
Barefooted Flight. As the Kazakhs and Qing Chinese shared a common enmity with the Dzungars, there was an attempt for an alliance between them, and Qing China actively encouraged rebellion among Kazakh and Kyrgyz subjects under Dzungar control. By 1755, the
Qianlong Emperor sent troops to wipe out the Dzungar
Dawachi regime and ordered the recruitment of the Kazakhs. In 1757, Dzungar nobleman
Amursana fled to
Ablai Khan (阿布赉) after the rebellion failed, which Ablai Khan deliberately let his son-in-law to flee to Russia. In 1864, China and Russia signed the
Treaty of Demarcation of the Northwest Frontier (勘分西北界约记), which ceded part of the territory of China's northwest frontier to Russia, which would later be renamed
Semirechye Oblast. However, due to porous border, movement continued, and some Kazakh tribes moved between China and Russia. The Qing government implemented a 1,000-family system in Kazakh tribes. Kazakhs had to pay taxes and accept direct jurisdiction from the central government. Around the same time, the
Dungan rebellion broke out, causing many
Dungans to flee to what would be Kazakhstan and Kyrgyzstan; the Russians, alongside the local Kazakhs and Kyrgyz, agreed to resettle these people, forming the modern
Dungans across these two states, especially in Kazakhstan.
Republican China During the final years of Tsar's rule, a large amount of Kazakh land was converted into immigrant areas, the number of livestock was greatly reduced, and the nomadic herdsmen's life deteriorated. During the
First World War, the Tsar government recruited Kazakhs for
military service, causing
Kazakhs to rebel and revolt. More than 300,000 Kazakh nomads fled to China to avoid repression. Around the same time,
Joseph Stalin deliberately
starved million of Kazakhs to death, forcing Kazakhs to flee to Xinjiang, only to be again massacred by Han and Hui Chinese warlords, who viewed them with contempt.
Early PRC Kazakhs were recognised as one of China's national minorities after
Mao Zedong proclaimed the foundation of the People's Republic in 1949, but Kazakh livelihood was quickly decimated and undermined during the
Yi–Ta incident and later
Cultural Revolution, which many Kazakhs were killed or fled the country to the Soviet Union. Kazakh living conditions would gradually improve under the lead of
Deng Xiaoping, who ushered an era of economic reforms across the nation. == Political relations ==