The Khojas of Kashgar name a Sufi lineage, which became a ruling dynasty in eastern Turkestan or present-day Xinjiang in western China. Founded by the Samarkandi spiritual master Ahmad Kāsānī (d. 1542), a member of the Naqshbandiyya Sufi order strongly implicated in politics, the lineage divided into two competing branches, one led by Ishāq Khoja (d. 1599) and the other by Āfāq Khoja (d. 1694). Both leaders were influential at the court in Yarkand and engaged in frequent proselytizing missions among Turkic, Mongol, Tibetan, and Chinese populations. Yet, only Āfāq Khoja and his group of followers, the Āfāqiyya, with the support of Zunghar Mongols, created a kind of theocracy whose religious capital was Kashgar, and which was based on Sufi organization, practice, and ideology. Venerated as Sufi saints (īshān), the Khojas embodied a politico-religious form of Islamic sanctity (walāya) while promoting a doctrine of mystical renunciation. Paradoxically, although the regime did not survive internecine conflicts and the Qing conquest in 1759, the Khojas of Kashgar, including the Ishāqiyya sublineage, continued to be very active in the long run. They conducted insurrections throughout the Tarim basin and created short-lived enclaves until their complete neutralization in 1866 with the forced exile of the last great Khoja, Buzurg Khān Töre (d. 1869). In Xinjiang, the Khojas have remained venerated figures of the past until now, although collective memory kept a contradictory picture of them, oscillating between holy heroes and feudal oppressors. Descendants of the exiled Khojas in eastern Uzbekistan and southern Kazakhstan formed communities that still preserve relics and oral as well as written traditions.