[citation needed] The origins of the border date from the mid-19th century, when the Russian Empire expanded into Central Asia and was able to establish its control over the Lake Zaysan region.
After the fall of the rebellion and the reconquest of Xinjiang by Zuo Zongtang, the border between the Russian and the Qing empires in the Ili River basin was further slightly readjusted, in Russia's favour, by the Treaty of Saint Petersburg (1881) and a series of later protocols.
[2] The southernmost section of the frontier (i.e. roughly the southern half of the modern China–Tajikistan border) remained undemarcated, owing partly to the ongoing rivalry between Britain and Russia for dominance in Central Asia known as the Great Game; eventually the two agreed that Afghanistan would remain an independent buffer state between them, with Afghanistan's Wakhan Corridor being created in 1895.
During Joseph Stalin's collectivization and sedentarization policies beginning with the First Five-Year Plan and resulting in the Kazakh famine, large numbers of nomads from Soviet Central Asia fled across the border to Xinjiang.
[citation needed] After Kazakhstan became an independent country, it negotiated a border treaty with China, which was signed in Almaty on April 26, 1994, and ratified by Kazakh President Nursultan Nazarbayev on June 15, 1995.