Kingdom of Qocho
The second Uyghur kingdom, the Kingdom of Qocho ruled a larger section of Xinjiang, also known as "Uyghuristan" in its later period, was founded in the Turpan area with its capital in Qocho (modern Gaochang) and Beshbalik. The Kingdom of Qocho lasted from the ninth to the fourteenth century and proved to be longer-lasting than any power in the region, before or since. The Uyghurs were originally Manichaean, but converted to Buddhism during this period. Qocho accepted the Qara Khitai as its overlord in the 1130s, and in 1209 submitted voluntarily to the rising Mongol Empire. The Uyghurs of Kingdom of Qocho were allowed significant autonomy and played an important role as civil servants to the Mongol Empire, but was finally destroyed by the Chagatai Khanate by the end of the 14th century.