Eastern Central Asia was referred to as "Xiyu" () under the control of the Han dynasty, from which the Xiongnu surrendered to in 60 BCE (Han–Xiongnu War), maintaining a variable military presence until the early 3rd century CE. From the 2nd to the 5th century local rulers controlled the region. In the 6th century, the First Turkic Khaganate was established. In the 7th-8th century Tang, Turks and Tibetans warred for control, and the Tang dynasty established the Anxi Protectorate of Xinjiang and Central Asia.