 For almost one hundred years, the Āfāqi Khojas waged numerous military campaigns as a part of the Āfāqī Khoja Holy War in an effort to retake Altishahr from the Qing.The Qing tried to consolidate their authority by settling Chinese emigrants, together with a Manchu Qing garrison.The Qing put the whole region under the rule of a General of Ili, headquartered at the fort of Huiyuan (the so-called "Manchu Kuldja", or Yili), west of Ghulja (Yining).