Square kilometers. There were many ethnic minorities guarding the border during the Tang Dynasty. In order to effectively manage Turkic, Uighur, Mohong, Tiele, Shiwei and Qidan, six capitals, Anxi, Anbei, Anton, Annan, Chanyu and Beiting, were established. ? However, in the decades after the Anshi Rebellion, a large number of border guards from Helong (mainly our troops from Longyou and Shuofang) participated in the rebellion, which led to the emptiness of border defense. Tubo took advantage of the situation and Uighur entered the Hetao grassland, greatly reducing the territory controlled by the Tang government, making it impossible for the Yellow River to be sweet and cool to the west. Finally, the control of the Tang Dynasty to the west of Dunhuang was completely lost. In the northeast, Anton Khufu moved to the west of Liaohe River. At the same time, the Khitan, Xi and other tribes became disasters. Tubo and Nanzhao in the southwest also caused great losses to the Tang government after the middle Tang Dynasty.