ending the Central Asian states danger from the Dzungar menace. Uighur Muslims like Emin Khoja from Turfan revolted against their Dzungar Buddhist rulers and pledged allegiance to Qing China to deliver them from Dzungar Buddhist rule. The Qing crushed and annihilated the Dzungars in the Dzungar genocide. The Dzungar Buddhists brought back the Aqtaghliq Afaqi Khoja Burhan-ud-din and his brother Khan Khoja and installed them as puppet rulers in Kashgar. During the Qing's war against the Dzungars, Burhan-ud-din and his brother Khan Khoja then pledged allegiance to Qing China in exchange for delivering them from Dzungar rule. However, after the Qing defeated the Dzungars, the Afaqi Khoja brothers Burhan-ud-din and Khan Khoja reneged on the deal with the Qing, declared independence and revolted against the Qing. The Qing and loyal Uighurs like Emin Khoja crushed the revolt and drove Burhan-ud-din and Khan Khoja to Badakhshan. The Qing armies reached far in Central Asia and came to the outskirts of Tashkent while the Kazakh rulers made their submissions as vassals to the Qing. The Afaqi brothers died in Badakhshan and the ruler Sultan Shah delivered their bodies to the Qing. Ahmad Shah Durrani accused Sultan Shah of having caused the Afaqi brothers to die. Durrani dispatched troops to Kokand after rumours that the Qing dynasty planned to launch an expedition to Samarkand, but the alleged expedition never happened and Ahmad Shah subsequently withdrew his forces when his attempt at an anti-Qing alliance among Central Asian states failed. Durrani then sent envoys to Beijing to discuss the situation regarding the Afaqi Khojas. Death and legacy Ahmad Shah may have suffered a wound on his nose during a horse-riding accident in Kabul in 1768, or he may have developed the injury due to a flying brick when the Harimandir Sahib was destroyed with gunpowder, which gradually worsened and spread to other parts of his face, including his left eye. Following the advise of his physicians, he would spend part of the summer in the cooler climate of the Margha plain in the Toba Achakzai range during the last few years of his life. He died of his illness on 4 June 1772 (2 Rabi' al-Awwal 1186) in Maruf, Toba Achakzai, east of Kandahar. He was buried in the city of Kandahar adjacent to the Shrine of the Cloak, where a large mausoleum was built. It has been described in the following way: In