A rebellion in 742 against the ruling Göktürk Khaganate by the Uyghur, Karluk, and Basmyl tribes left an immense power vacuum in Mongolia and Central Asia. The Basmyls captured the Göktürk capital Ötügen and their king Özmish Khan in 744, effectively taking charge of the region. However a Uyghur-Karluk alliance against the Basmyls was formed later the same year. The coalition defeated the Basmyls and beheaded their king. The Basmyl tribes were effectively destroyed; their people sold to the Chinese or distributed amongst the victors. The Uyghurs took control of Mongolia, with the Karluk tribes given lands further West. The Uyghur chief Qutlugh Bilge Köl (Glorious, wise, mighty) had himself crowned as the supreme ruler (khagan) of all Altaic tribes and built his capital at Ordu Baliq.
In 747, Qutlugh Bilge Köl died, leaving his youngest son, Bayanchur Khan to reign as Khagan El etmish bilge ("State settled, wise"). After building a number of trading outposts with the Chinese, Bayanchur Khan used the profits to build the capital, Ordu Baliq ("City of Court"), and another city, Bai Baliq ("Rich City"), further up the Selenga River. The new khagan then embarked on a series of campaigns to bring all the steppe peoples under his banner. During this time the Empire vastly expanded, with Sekiz Oghuz, Qïrghïz, Qarluqs, Türgish, Toquz Tatars, Chiks and the remnants of the Basmïls coming under Uyghur rule.
The rebellion of An Lushan in the Tang empire in 755 forced the Chinese emperor to turn to Bayanchur Khan for assistance. Seeing this as an ideal opportunity to meddle in Chinese affairs, the khagan agreed, quelling several rebellions and defeating an invading Tibetan army from the south. As a result, the Uyghurs received tribute from the Chinese in 757 and Bayanchur Khan was given the daughter of the Chinese Emperor to marry (princess Ningo).
In 756, the Uyghurs turned their attentions to a rival steppe tribe, the Kyrgyz to the north. Bayanchur Khan destroyed several of their trading outposts before slaughtering a Kyrgyz army and executing their Khan.
Finally, in 759, after drinking heavily at a celebration, Bayanchur Khan died. His son Tengri Bögü succeeded him as Khagan Qutlugh Tarkhan sengün.
Uyghur Khanate in geopolitical context c 820 CE
In 762, in alliance with the Tang, Tengri Bögü launched a campaign against the Tibetans. He recaptured for the Tang Emperor the western capital Chang'an. Khagan Tengri Bögü met with Manichaean priests from Iran while on campaign, and was converted to Manicheism, adopting it as the official religion of the Uyghur Empire.
In 779 Tengri Bögü, incited by Sogdian traders, living in Ordu Baliq, planned an invasion of China to take advantage of the accession of a new emperor. Tengri Bögü's uncle, Tun Bagha Tarkhan opposed this plan, fearing it would result in Uyghur assimilation into Chinese culture. Bagha Tarkhan led a rebellion against his ruler, beheading him and his closest followers (about 2,000 nobles). Tun Bagha Tarkhan ascended the throne as Alp Qutlugh Bilge ("Victorious, glorious, wise") and enforced a new set of laws, which he designed to secure the unity of the khaganate, He also moved against the Kyrgyz once more, finally bringing them under the Uyghur Khaganate's control.
Periods of Pre-Mongol Mongolia
See also: Khamag Mongol
In 795 the khagan, bearing the title Qutlugh Bilge, died and the Yaghlakar (Old Turkic: , Jaγlaqar, simplified Chinese: 药罗葛; traditional Chinese: 藥羅葛; pinyin: yaoluogě; Wade–Giles: yao-lo-ko) dynasty came to an end. The Uyghur Empire started to fragment before a new ruler, a general named Qutlugh, declared himself the new khagan, under the title Ai tengride ülüg bulmïsh alp kutluk ulugh bilge ("Greatly born in moon heaven, victorious, glorious, great and wise"), founding a new dynasty, the Ediz (Chinese: A-tieh). With solid leadership once more, the Khaganate averted collapse. Qutlugh became renowned for his leadership and management of the empire. Although he consolidated the empire, he failed to restore it to its previous power. On his death in 808, the empire began to fragment once again. He was succeeded by his son, who went on to improve trade in inner Asia. The last great khagan of the Empire was a khagan with unknown name, bearing the title Kün tengride ülüg bulmïsh alp küchlüg bilge ("Greatly born in sun heaven, victorious, strong and wise"), whose achievements included improved trade, uptill the region of Sogdiana, and on the battlefield he repulsed a force of invading Tibetans in 821. This khagan died in 824 and was succeeded by a brother, Qasar, who was murdered in 832, inaugurating a period of anarchy. In 839 the legitimate khagan was forced to commit suicide, and a usurping minister named Kürebir seized the throne. In the same year there was a famine that killed much of the livestock the Uyghur economy was based on.
The following spring, in 840, one of 9 Uyghur ministers, Kulug Bagha, rival of Kurebir, fled to the Kyrgyz tribe and invited them to invade from the north with a force of around 80,000 horsemen. They sacked the Uyghur capital at Ordu Baliq, razing it to the ground. The Kyrgyz captured the Uyghur Khagan, Kürebir (Hesa) and promptly beheaded him. The Kyrgyz went on to destroy other Uyghur cities throughout their empire, burning them to the ground. The last legitimate khagan, Öge, was assassinated in 847, having spent his 6-year reign in fighting the Kyrgyz,the supporters of his rival Ormïzt, a brother of Kürebir, and Tang China boundary troops in Ordos and Shaanxi, which he invaded in 841 . The Kyrgyz invasion destroyed the Uyghur Empire, causing a diaspora of Uyghur people across Central Asia.
After the Empire
The three kingdoms of Gansu (848-1036), Turpan (856-1369) and Karakhanids (850-1212) were formed by the Uyghurs who fled (southwest, west and further west respectively) from the Yenisei Kyrgyz, several years after the fall of the empire. None of these states became as powerful as the Uyghur Empire but did hold artistic, scientific and commercial achievements to their name. The Uyghurs became important civil servants in the later Mongol Empire, which adopted the Uyghur script as its official script.
List of Uyghur Khagans
The following list is based on Dennis Sinor, "The Uighur Empire of Mongolia," Studies in Medieval Inner Asia, Variorum, 1997, V: 1-25. Because of the complex and inconsistent Uyghur and Chinese titulatures, references to the rulers now typically include their number in the sequence, something further complicated by the non-inclusion of an unnamed ephemeral son of 4 between 5 and 6 in 790, and the inclusion of a spurious reign between 7 and 9.