Beiting Protectorate
The Beiting Protectorate-General, initially the Beiting Protectorate, was a Tang dynasty protectorate created in 702 to control the Beiting region north of Gaochang in contemporary Xinjiang. Wu Zetian set up the Beiting Protectorate in Ting Prefecture (Jimsar County) and granted it governorship over Yi Prefecture (Hami) and Xi Prefecture (Gaochang). The Beiting Protectorate ended in 790 when Tingzhou was conquered by the Tibetan Empire. The ruins, along with other sites along the Silk Road, were inscribed in 2014 on the UNESCO World Heritage List as the World Heritage Site. History. In 702 Wu Zetian set up the  Beiting Protectorate in Ting Prefecture (Jimsar County) and granted it governorship over Yi Prefecture (Hami) and Xi Prefecture (Gaochang). In 715 the Tibetan Empire attacked the Beiting Protectorate. In 735 the Türgesh attacked Ting Prefecture. In 755 the An Lushan Rebellion occurred and the Tang dynasty withdrew 200,000 soldiers from the Western Regions to protect the capital. In 764 the Tibetan Empire invaded the Hexi Corridor and conquered Liang Prefecture, cutting off the Anxi and Beiting from the Tang dynasty. However the Anxi and Beiting protectorates were left relatively unmolested under the leadership of Guo Xin and Li Yuanzhong. In  780 Li Yuanzhong was officially made protectorate general of Beiting after sending secret messages to Emperor Dezong of Tang. In 781 the Tibetan Empire conquered Yi Prefecture. In 789 the monk Wukong passed through Ting Prefecture and found that the Chinese commander there was Yang Xigu. In 790 the Tibetan Empire conquered Ting Prefecture. In 792 the Tibetan Empire conquered Xi Prefecture. Post-Tibetan domination. In the immediate aftermath of the Tibetan conquest of Xi Prefecture, it was taken by the Uyghur Khaganate, after which the area became the border between the two empires. Zhang Yichao rebelled against Tibetan rule  in Sha Prefecture (Dunhuang) in 848. In 850 he recaptured Yi Prefecture, in 851 Xi Prefecture, and in 866 Ting Prefecture. However he immediately lost Ting and Xi prefectures as well as Luntai (Ürümqi) to the Kingdom of Qocho. In 876 Yi Prefecture was also captured by the Kingdom of Qocho.