The Turkic Muslim sedentary people of the Tarim Basin were originally ruled by the Chagatai Khanate while the nomadic Oirat Dzungar Buddhists in Dzungaria ruled over the Dzungar Khanate.
Khoja Afaq asked the 5th Dalai Lama when he fled to Lhasa to help his Afaqi faction take control of the Tarim Basin (Kashgaria).