Uyghurs
The history of the Uyghur people, as with the ethnic origin of the people, is a matter of contention between Uyghur nationalists and the Chinese authority. Uyghur historians viewed the Uyghurs as the original inhabitants of Xinjiang with a long history. Uyghur politician and historian Muhemmed Imin Bughra wrote in his book "A History of East Turkestan", stressing the Turkic aspects of his people, that the Turks have a 9000-year history, while historian Turghun Almas incorporated discoveries of Tarim mummies to conclude that Uyghurs have over 6400 years of history, and the World Uyghur Congress claimed a 4,000-year history in East Turkestan. However, the official Chinese view asserts that the Uyghurs in Xinjiang originated from the Tiele tribes and only became the main social and political force in Xinjiang during the ninth century when they migrated to Xinjiang from Mongolia after the collapse of the Uyghur Khaganate, replacing the Han Chinese they claimed were there since the Han Dynasty. Many contemporary Western scholars, however, do not consider the modern Uyghurs to be of direct linear descent from the old Uyghur Khaganate of Mongolia. Rather, they consider them to be descendants of a number of peoples, one of them the ancient Uyghurs.
History of Mongolia
The Uyghurs, who were subjects to the Göktürks, revolted in 745 and founded the Uyghur Khaganate which replaced the Eastern Turkic Khaganate. The Uyghur kagan Bayanchur established Ordu-Baliq City on the Orkhon river in 751. The Tang Empire invited the Uyghurs to subdue the An Lushan rebellion in 755. Successful campaigns of the Uyghur Khaganate led to a peace with the Tang dynasty of China which paid compensation for the suppression of An in silk and grain for 12 years after 766.
Though a faction of the Uyghurs were Buddhists, the Manichaeism became the official religion of the Khaganate in the 8th century. Nevertheless, the majority of the Uyghurs remained shamanists. The culture and economy of the Uyghur Kaganate were more advanced than those of its predecessors. The Uyghurs used a 12-month calendar and calculated the dates of solar and lunar eclipses. The Uyghurs developed their own writing system based on the Sogdian script. The Tang dynasty surreptitiously encouraged the Yenisei Kirghiz and the Karluks to attack the Uyghurs and the Uyghur Khaganate fell under an invasion of the Yenisei Kirghiz in 840.