to have lived in present-day Xingtai. The mythical Battle of Zhuolu, won by the Yellow Emperor, Yan Emperor, and their Yanhuang tribes against the Chiyou-led Jiuli tribes, took place in Zhangjiakou and started the Huaxia civilization. During the Spring and Autumn period (722 BC–476 BC), Hebei was under the rule of Yan in the north and Jin in the south. Also during this period, a nomadic people known as Dí invaded the plains of northern China and established Zhongshan in central Hebei. In the Warring States period (403 BC–221 BC), Jin was partitioned and much of its territory in Hebei went to Zhao. Qin and Han dynasties The Qin dynasty unified China in 221 BC. The Han dynasty (206 BC–220 AD) ruled the area under two provinces, You Prefecture in the north and Ji Province in the south. At the end of the Han dynasty, most of Hebei was under the control of warlords Gongsun Zan in the north and Yuan Shao further south. Yuan Shao emerged as the victor of the two, but he was defeated by Cao Cao in the Battle of Guandu in 200. Hebei came under the rule of the Kingdom of Wei, established by the descendants of Cao Cao. Jin through the Three Kingdoms After the invasions of northern nomadic peoples at the end of the Western Jin dynasty, chaos ensued in the Sixteen Kingdoms and the Northern and Southern dynasties. Because of its location on the northern frontier, Hebei changed hands many times and was controlled at various times by Later Zhao, Former Yan, Former Qin, and Later Yan. The Northern Wei reunified northern China in 440 but split in 534, with Hebei coming under Eastern Wei; then the Northern Qi, with its capital at Ye near modern Linzhang, Hebei. The Sui dynasty again unified China in 589. Tang and Five dynasties During the Tang dynasty (618–907), the area was officially called Hebei for the first time. During the Five Dynasties and Ten Kingdoms period, Hebei was fragmented among several regimes. It was eventually unified by Li Cunxu, who established the Later Tang (923–936). Emperor Gaozu of the Later Jin dynasty ceded much of northern Hebei to the Khitan Liao dynasty. This territory, called the Sixteen Prefectures of Yanyun, became a weakness in the Chinese defense against the Khitans for the next century because it lay within the Great Wall. Song through Yuan dynasties