Kashgar
When the Chagatai realm broke apart, Kashgar fell to the Dughlat amirs, hereditary lords of the western Tarim, who in 1347 raised Tughlugh Timur to the khanship and soon followed him into Islam. Their lands were battered from outside: Timur's armies ravaged Kashgar in 1389–90, and his grandson Ulugh Beg held the city for a time. The Dughlats returned, and the last great one among them, Mirza Abu Bakr, ruled the oases from Yarkand until the Moghul khan Sultan Said drove him out in 1514.
Real power then passed to holy men. Two rival Sufi lineages, the White Mountain and Black Mountain khojas, divided the towns between them, and in 1680 the White Mountain leader Afaq Khoja brought the Dzungar Galdan into the Tarim; the Dzungars then ruled through the khojas as their puppets. The Qīng destroyed the Dzungars and took Kashgar in 1759, settling a Manchu garrison beside it, but the khojas' heirs kept coming back from exile, and when Jahangir Khoja seized the city in the 1820s the Qīng needed until 1828 to win it back.