Ili (Chinese rendering Yili 伊犁) was the name of a Qing period 清 (1644-1911) garrison in Eastern Turkestan, but also a common term for the northwestern part of what was later to become the province of Xinjiang 新疆 (today an Autonomous Region). The name Ili is seen in Han period 漢 (206 BCE-220 CE) sources as Yilie 伊列, in Tang period 唐 (618-907) sources as Yili 伊麗, and was in the Yuan period 元 (1279-1368) called Yili 亦里 or Yilie 亦列. During the Ming period 明 (1368-1644) the region was called Wala 瓦剌 because it was controlled by the Western Mongol federation of the Oirats. Ili is actually the name of a river crossing the region. Its tributaries originate in the Tianshan Range 天山, and it flows westwards through the Kazakh steppe and sheds its waters into Lake Balkhash.
After the Qing had defeated the Dzungars, the most powerful tribe among the Oirats, they appointed a General of Ili (Yili jiangjun 伊犁將軍) who administrated the whole region north and south of the Tianshan Range and was concurrently Grand Minister Consultant (canzan dachen 參贊大臣). From 1762 on the name Ili actually referred to the territory administered by the General. It corresponded to the lands between Lake Balkhash (in modern Kazakhstan), and the area of the rivers Talas and Chui and Lake Issyk Köl. South of this territory, Kašgar was located, in the northeast the Tarbagatai Range. The western neighbours were the Kazakhs and the sultanate of Kokand.
The territory of Ili was divided into an eastern and a western route (lu 路). The eastern route was covering the upper course of the River Ili and included the city of Huiyuan 惠遠 (modern Huocheng 霍城, Xinjiang), where the seat of the General was located. The cities of Suiding 綏定, Taleqi 塔勒奇, Guangren 廣仁, Zhande 瞻德, Gongchen 拱宸, Huining 惠寧 and Xichun 熙春 were protected by garrisons of Banner troops (manbing 滿兵) or Green Standard troops (lüyingbing 綠營兵) that were supplied by military agro-colonies (tuntian 屯田). Ningyuan 寧遠 was the seat of the Akim Bek 阿奇木伯克, a native ruler who was responsible for the administration of the Uyghurian cities around Aksu. The western route covered the middle and lower course of the River Ili and was not as densely dotted with urban dwellings. It was mainly inhabited by Kazakhs and Buruts (Kirgizes). The main seat was Guangmao 廣袤, where the garrison was likewise supplied from agro-colonies.
In 1851 Huiyuan was opened by the Treaty of Kulja between Qing China and Russia as an international trading post (shangbu 商埠) under the supervision of a Commander (lingshiguan 領事官). The western route was ceded to Russia in the 1864 Treaty of Tarbagatai. In 1870 Russia occupied the western part of Ili in order to enforce the regulations of the treaty. In 1881, Zeng Jize 曾紀澤 (1839-1890) had to sign a treaty that drew up the final course of the border between the Qing and the Tsarist empire: the Treaty of Saint Petersburg. Three years later, the region of Xinjiang with its different military administrations was transformed into a province. In 1887, Ili was made a prefecture (fu 府) subordinated to the ciruit (dao 道) Yi-Ta 伊塔 (i.e. Yili and Tarbahatai) and included two districts (xian 縣), namely Ningyuan and Suiding. The General of Ili resided in Suiding. Like before, he was resonsible for military and civilian matters at once, and also acted as circuit intendant (daoyuan 道員).