Although Ak Taghliks had been expelled from Kashgaria by the Qing in the 1760s, they had not abandoned their hopes of reconquering the region, and regularly invaded it from their base in Khanate of Kokand.
Wali Khan followed in the footsteps of his father, Jahangir Khoja, his uncle Yusuf, and cousin Katti Torah, who had all invaded Kashgaria with various success through the first half of the 19th century.
[3] In the West Wali Khan is mostly known for his execution of the German explorer Adolf Schlagintweit in 1857, but his cruelty found many other reflections in the local legends.
[4] In 1865, after Kokand Khanate had been successfully invaded by the Russian and its ruler Alimqul killed, Wali Khan joined a large group of Kokandian officials who decided to try their luck in Kashgaria.
They appeared in Kashgar in September 1865, but had to submit to the fellow Kokandian Yaqub Beg, who had already firmly established himself as the ruler of the city.