In 1871, during the Dungan Revolt, Russia occupied the Ili country, the upper valley of the river that runs into Lake Balkhash, with Kulja. Saint Petersburg said it was protecting its subjects, not annexing. By 1877 Qing authority had returned to Xinjiang. Chonghou was sent to negotiate. In September 1879 he concluded the Treaty of Livadia: Russia would keep the Tekes valley, at the south-west end of Ili, and the passes into the Tarim; China would pay five million rubles and grant trade concessions. Back in Peking in January 1880, he was arrested and sentenced to death for treason.

The new ambassador was Zeng Jize, a marquis, son of Zeng Guofan. Russia refused to talk until Chonghou was freed; the European powers backed Saint Petersburg. In August 1880 Chonghou was released and talks resumed. For Russia: Nikolai Girs, head of Asiatic affairs at the foreign ministry, and Evgeny Bützow, envoy at the Qing court.

The treaty was signed on 24 February 1881, New Style, in Saint Petersburg — 12 February on the Julian calendar. Two copies, in Russian, Chinese and French; for interpretation, French is the governing text. Ratifications, also in Petersburg, within six months. The signatures: Girs, Zeng, Bützow.

Article I: the Russian emperor consents to restore Chinese authority in the Ili region, occupied since 1871; the western part, drawn in Article VII, remains with Russia, for the settlement of residents who choose Russian subjecthood. Article II: the Qing will shield the inhabitants, of whatever tribe or faith, from liability for acts during the disorders. Article III: they may stay or move to Russia, and will be asked before the troops withdraw.

Article VI and the protocol: nine million metal rubles — occupation costs, property claims, aid to families of the killed. Payment, within two years of the exchange of ratifications, in sterling, to Baring Brothers in London: one million four hundred and thirty-one thousand six hundred and sixty-four pounds, two shillings, in six equal instalments. Article VIII adjusts the border east of Lake Zaysan. Article X widens the consular net: besides Kulja, Tarbagatai, Kashgar and Urga, consulates at Suzhou (Jiuquan) and Turpan; later, as trade required, Kobdo, Uliastai, Hami, Urumqi, Gucheng. Article XII reaffirms duty-free trade in Mongolia and Xinjiang.

It was ratified on time. Russia evacuated the province in March 1883. A final protocol, on 31 October 1883, closed remaining border snags. The line in Article VII is now the frontier between Kazakhstan and China. Thousands of Dungan (Hui) and Taranchi (Uyghur) families moved onto Russian soil, in south-eastern Kazakhstan and northern Kyrgyzstan; some went back, most stayed.

At Livadia, Russia kept more. At Petersburg it gave back most of the valley. Russian ministers such as Dmitry Milyutin and, later, Brusilov saw a step backward. On the Qing side the talks were read as a diplomatic victory on land, where the navy remained weak. The Russian text, from the collected treaties of 1856–1917, is published by Moscow State University.

Sources: Treaty of Saint Petersburg (1881); Moscow State University, Договор об Илийском крае.