Beš Baliq (Besh Balik; Chinese transcriptions Bieshibali 別失八里, 別十八里, 別石八里, Bieshima 鱉思馬 or Bieshiba 別石把) was the Uyghurian (Türkic) name of the region of modern Turfan 吐魯番 and Jimsar 吉木薩爾, Xinjiang, during the 11th through 14th centuries. The name is Türkic and has the meaning of "five cities". It is first mentioned in Chinese and Türkic sources from the 10th century and designated cities around the Tang period 唐 (618-907) protectorate of Beiting 北庭 and the prefecture of Tingzhou 庭州.
During the Han period 漢 (206 BCE-220 CE) the region belonged to the state of Rear Cheshi 車師後國 and was occupied by Türkic tribes during the latter half of the 6th century. For a century it was the heartland of the kingdom of Gaochang 高昌 (531-640). The Tang empire administered it as part of the Protectorate of Beiting. In 760 Beiting was occupied by the Tibetans, but there were constant fights for domination among the Uyghurs (Chinese name Huigu 回鶻), the Tibetans and the Qarluqs (another Türkic people, Chinese transcription Geluolu 葛邏祿). The Uyghurs won the fight, and after the end of the Uyghur khanate in 840 numerous Uyghurs from north of the Gobi Desert migrated into the region of the former Beiting. These were called the Gaochang Uyghurs 高昌回鶻.
Beš Baliq was the seat of their khan (in the local language iduq-qut). The Mongols used to call the Uyghurs Weiwur 畏兀兒. In 1209 the Uyghur khan Barju Altey Tegin (Chinese transcription 巴而朮阿爾忒的斤) submitted to the leader of the Mongol federation, Činggis Khan 成吉思汗 (r. 1206-1227), and was confirmed in his position. The Daoist monk Qiu Chuji 丘處機 who travelled to the court of Činggis Khan, passed Beš Baliq in 1251. His book Changchun zhenren xiyou ji 長春真人西遊記 provides some information about the cities and the inhabitants. In 1251 Möngke Khan 蒙哥 (r. 1251-1259) set up a imperial branch secretariat (shangshusheng 尚書省) in Beš Baliq in order to support his campaigns in Central Asia. The highest Mongolian officials appointed were Nahuai 納懷, Talakhai 塔剌海, Masuhu 麻速忽 and Ögödei's 窩闊台 (r. 1229-1241) grandson Hodan 合丹.
During the fratricidal war between Qubilai 忽必烈 (r. 1260-1294) and Arigh Böke, the latter occupied Beš Baliq but had to surrender to his brother, the Great Khan, in 1264. The native Uyghurian ruler Hočihar Tegin 火赤哈兒的斤 was appointed grand-protector of Beš Baliq. With the rebellion of Siliji 昔里吉 in 1277 the Mongolian general Qaidu 海都 occupied Beš Baliq and forced Hočihar Tegin into exile.
After the downfall of the Southern Song empire 南宋 (1127-1279), Qubilai had finally time to care for the western regions, and sent out pacification commissioner (xuanweishi 宣慰使) Zuangong Zhi 繤公直 to occupy the region of Beš Baliq, to settle down Chinese troops on military colonies and to establish a system of granaries for the supply and postal stations for the communication. Craftsmen were settled down to produce the necessary iron tools. The important towns of Kuča (Qiuxian 曲先, the former Qiuci 龜茲) and Khotan (Wodian 斡端, the former Yutian 于闐) were likewise transformed into garrisons with large contingents of Mongolian troops. In 1287 Beš Baliq was attacked by Duwa 篤哇, a great-grandson of Čagatai 察合台.
In 1295 a new type of administration was set up in Beš Baliq and in Kuča, the chief military command (du yuanshuai fu 都元帥府), one in both cities, to control the western regions. At the beginning of the 14th century, Beš Baliq was again occupied by Duwa and for a long time was to be part of the Čagatai khanate (ulus) and was governed by khan Tuqluq Temür (Chinese name Tuhulu tiemuer 禿忽魯帖木兒) and his descendants. The rulers called their kingdom that of Menggurstan.
In 1391 the khan Qidr Hoja (Chinese name Haider huozhe 黑的兒火者) sent tributes to the court of the Ming empire 明 (1368-1644). Khan Mohammed (Chinese name Mahama 馬哈麻) enforced the religion of Islam to be adopted by all inhabitants of Menggurstan. In 1417 Vais Khan (Chinese name Waisi 歪思) killed khan Naqsh-i Jahan (Chinese name Naheshi zhihan 納黑失只罕) and usurped the throne. At that time the Ölöd or Oirats 瓦剌, a western Mongolian tribe, began to migrate into the region and so caused trouble to the ancient Mongols. Waisi therefore transferred his seat to Ili Baliq 亦力把里 (modern Yining 伊寧, Xinjiang), and Beš Baliq from then on had a mere provincial character, and the name was given up.