The Qing freed the Afaqi Khoja leader Burhān al-Dīn Khoja and his brother Jahān Khoja from their imprisonment by the Dzungars, and appointed them to rule as Qing vassals over the Tarim Basin. The Khoja brothers decided to renege on this deal, igniting the revolt of the Altishahr Khojas (1757–1759), and declaring themselves as independent leaders of the Tarim Basin. The Qing and the Turfan leader Emin Khoja crushed their revolt, and Manchu Qing then took control of both Dzungaria and the Tarim Basin by 1759. For almost one hundred years, the Āfāqi Khojas waged numerous military campaigns as a part of the Āfāqī Khoja Holy War in an effort to retake Altishahr from the Qing.