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. Khoja Afaq collaborated with Galdan's Dzungars when the Dzungars conquered the Tarim Basin from 1678-1680 and set up the Afaqi Khojas as puppet client rulers. The Dalai Lama blessed Galdan's conquest of the Tarim Basin and Turfan Basin.