The Tang dynasty withdrew its control of the region in the Protectorate General to Pacify the West and the Four Garrisons of Anxi after the An Lushan Rebellion, after which the Turkic peoples and the other native inhabitants living in the area gradually converted to Islam following the Muslim conquest of Central Asia.
[citation needed] Protected by the Taklamakan Desert from steppe nomads, elements of Tocharian culture survived until the 7th century, when the arrival of Turkic immigrants from the collapsing Uyghur Khaganate of modern-day Mongolia began to absorb the Tocharians to form the modern-day Uyghur ethnic group.
The Saka Kings were still culturally-influenced by the Buddhist homeland of Northern India, with their rulers adopting Sanskrit names and titles.
[citation needed] The rulers of Khotan grew anxious of hostilities with Turkish khanates, as evidenced by the Mogao grottoes, were they commissioned painting number of divine figures along with themselves.
[28] Many of the Muslim soldiers who died fighting the region's Buddhist kingdoms are regarded as martyrs (shehit), and are visited by pilgrims at shrines called mazar.
Written sometime in the period from 1700 to 1849, the Eastern Turkic language (modern Uyghur) Taẕkirah of the Four Sacrificed Imams provides an account of the Muslim Kara-Khanid war against the Khotanese Buddhists.
[35] Contemporary poems and attitudes are recorded in the dictionary of the Turkic lexicographer Mahmud al-Kashgari and in the text Hudud al-'Alam.
[36][37][38][39] The antagonistic attitude towards Dharmic religions is striking in comparison to several earlier Islamic texts that portrayed Buddhism in a more charitable light, such as the works of Yahya ibn Khalid.
Travellers passing through the area in 1420 remarked on the rich Buddhist temples, and only after 1450 were substantial numbers of mosques reported.
[46] In the early 16th century, the Chagatai ruler Mansur Khan attacked Qara Del, a Mongolian-ruled and Uighur-populated Buddhist Kingdom east of Turfan, invading and forcibly converting the population to Islam.
[47][verification needed] It was reported that between Khitay and Khotan the Sarigh Uyghur tribes who were "impious" resided, and they were targeted for ghazat (holy war) by Mansur Khan following 1516.
[citation needed] Residents of area previously ruled by Qocho failed to retain memory of the region's religious history and believed that the murals in the Bezeklik Thousand Buddha Caves were built by the Dzungars.