the caves. Besides this, a particular site, Melikawat functioned as a major Buddhist center in the Kingdom of Khotan. In the 10th century, Khotan began a struggle with the Kara-Khanid Khanate, a Turkic state. The Kara-Khanid ruler, Sultan Satuq Bughra Khan, had converted to Islam: Some Khotanese Buddhist works were unearthed. The rulers of Khotan were aware of the menace they faced since they arranged for the Mogao grottoes to paint a growing number of divine figures along with themselves. Halfway in the 10th century Khotan came under attack by the Qarakhanid ruler Musa, and in what proved to be a pivotal moment in the Turkification and Islamification of the Tarim Basin, the Karakhanid leader Yusuf Qadir Khan conquered Khotan around 1006. Islamic Khotan Yūsuf Qadr Khān was a brother or cousin of the Muslim ruler of Kashgar and Balasagun, Khotan lost its independence and between 1006 and 1165, became part of the Kara-Khanid Khanate. Later it fell to the Kara-Khitan Khanate, after which it was ruled by the Mongols. When Marco Polo visited Khotan in the 13th century, he noted that the people were all Muslim. He wrote that: 19th century The town suffered severely during the Dungan Revolt (1862–77) against the Qing dynasty and again a few years later when Yaqub Beg of Kashgar made himself master of Kashgaria, ruling the newly founded Turkic state known at the time as Yettishar. Post-Qing Qing imperial authority collapsed in 1912. During the Republican era in China, warlords and local ethnic self-determination movements wrestled over control of Xinjiang. Abdullah Bughra, Nur Ahmad Jan Bughra, and Muhammad Amin Bughra declared themselves Emirs of Khotan during the Kumul Rebellion. Tunganistan was an independent administered region in the southern part of Xinjiang from 1934 to 1937. The territory included the oases of the southern Tarim Basin; the centre of the region was Khotan. Beginning with the Islamic rebellion in 1937, Hotan and the rest of the province came under the control of warlord Sheng Shicai. Sheng was later ousted by the Kuomintang. People's Republic of China Shortly after the Communists won the civil war in 1949, Hotan was incorporated into the People's Republic of China. In 1983/4, the urban area of Hotan was administratively split from the larger Hotan County, and from then on governed as a county-level city. On July 11, 2006, the townships of Jiya and Yurungqash (Yulongkashi) in Lop County and