 The Dzungar Khanate then conquered the Tarim Basin in 1680, setting up the Afaqi Khoja as their puppet ruler.Khoja Afaq asked the 5th Dalai Lama when he fled to Lhasa to help his Afaqi faction take control of the Tarim Basin (Kashgaria).The Dzungar leader Galdan was then asked by the Dalai Lama to restore Khoja Afaq as ruler of Kashgararia.