page_title: Tarim Basin
section_title: Turkic-Islamic Kara-Khanid conquest of Iranic Saka Buddhist Khotan
hierarchical_section_title: Tarim Basin / History / Islamisation of the Tarim Basin / Turkic-Islamic Kara-Khanid conquest of Iranic Saka Buddhist Khotan
caption_attribution_description: Polski: Cmentarz muzłumański w Kaszgarze
context_page_description: The Tarim Basin is an endorheic basin in northwest China occupying an area of about 1,020,000 km². Located in China's Xinjiang region, it is sometimes used synonymously to refer to the southern half of the province, or Nanjiang, as opposed to the northern half of the province known as Dzungaria or Beijiang. Its northern boundary is the Tian Shan mountain range and its southern boundary is the Kunlun Mountains on the edge of the Tibetan Plateau. The Taklamakan Desert dominates much of the basin. The historical Uyghur name for the Tarim Basin is Altishahr, which means 'six cities' in Uyghur.
context_section_description: In the tenth century, the Buddhist Iranic Saka Kingdom of Khotan was the only city-state that was not conquered yet by the Turkic Uyghur (Buddhist) and the Turkic Qarakhanid (Muslim) states. The Buddhist entitites of Dunhuang and Khotan had a tight-knit partnership, with intermarriage between Dunhuang and Khotan's rulers and Dunhuang's Mogao grottos and Buddhist temples being funded and sponsored by the Khotan royals, whose likenesses were drawn in the Mogao grottoes. Halfway in the 10th century Khotan came under attack by the Qarakhanid ruler Musa,  a long war ensued between the Turkic Karakhanid and Buddhist Khotan which eventually ended in the conquest of Khotan by Kashgar by the Karakhanid leader Yusuf Qadir Khan around 1006.
  Accounts of the Muslim Karakhanid war against the Khotanese Buddhists are given in  Taẕkirah of the Four Sacrificed Imams written sometime in the period from 1700-1849 which told the story of four imams from Mada'in city (possibly in modern-day Iraq) who travelled to help the Islamic conquest of Khotan, Yarkand, and Kashgar by Yusuf Qadir Khan, the Qarakhanid leader. The "infidels" were defeated and driven towards Khotan by Yusuf Qadir Khan and the four Imams, but the Imams were assassinated by the Buddhists prior to the last Muslim victory.  After Yusuf Qadir Khan's conquest of new land in Altishahr towards the east, he adopted the title "King of the East and China".
  In 1006, the Muslim Kara-Khanid ruler Yusuf Kadir (Qadir) Khan of Kashgar conquered Khotan, ending Khotan's existence as an independent state. The Islamic conquest of Khotan led to alarm in the east and Dunhuang's Cave 17, which contained Khotanese literary works, was closed shut possibly after its caretakers heard that Khotan's Buddhist buildings were razed by the Muslims, the Buddhist religion had suddenly ceased to exist in Khotan. The Karakhanid Turkic Muslim writer Mahmud al-Kashgari recorded a short Turkic language poem about the conquest:
  
  
   
  English translation:
  We came down on them like a flood,
  
  We went out among their cities,
  
  We tore down the idol-temples,
  
  We shat on the Buddha's head!
   
  In Turkic:
  kälginläyü aqtïmïz
  
  kändlär üzä čïqtïmïz
  
  furxan ävin yïqtïmïz
  
  burxan üzä sïčtïmïz
caption: An Islamic cemetery outside the Afaq Khoja Mausoleum in Kashgar
exif: {}