fortified villages. A clan would carve out a de facto fief through a highly cohesive family-based self-defense community. Lesser peasant families would work for the dominant clan as tenants or serfs. This was a response to the chaotic political environment, and these Han gentry families largely avoided government service before the Northern Wei court launched the sinicization movement. The northern gentry was therefore highly militarized as compared to the refined southern aristocrats, and this distinction persisted well into the Sui and Tang dynasties centuries later. Rise of Northern Wei (386–535) and the Sinicization movement In the Sixteen Kingdoms period, the Tuoba family of the Xianbei were the rulers of the state of Dai (Sixteen Kingdoms). Although it was conquered by the Former Qin, the defeat of the Former Qin at the Battle of Fei River resulted in the collapse of the Former Qin. The grandson of the last prince of Dai Tuoba Shiyijian, Tuoba Gui restored the fortunes of the Tuoba clan, renaming his state Wei (now known as Northern Wei) with its capital at Shengle (near modern Hohhot). Under the rule of Emperors Daowu (Tuoba Gui), Mingyuan, and Taiwu, the Northern Wei progressively expanded. The establishment of the early Northern Wei state and the economy were also greatly indebted to the father-son pair of Cui Hong and Cui Hao. Tuoba Gui engaged in numerous conflicts with the Later Yan that ended favorably for the Northern Wei after they received help from Zhang Gun that allowed them to destroy the Later Yan army at the Battle of Canhe Slope. Following this victory, Tuoba Gui conquered the Later Yan capital of Pingcheng (modern-day Datong). That same year he declared himself Emperor Daowu. Due to Emperor Daowu's cruelty, he was killed by his son Tuoba Shao, but crown prince Tuoba Si managed to defeat Tuoba Shao and took the throne as Emperor Mingyuan. Though he managed to conquer Liu Song's province of Henan, he died soon afterward. Emperor Mingyuan's son Tuoba Tao took the throne as Emperor Taiwu. Due to Emperor Taiwu's energetic efforts, Northern Wei's strength greatly increased, allowing them to repeatedly attack Liu Song. After dealing with the Rouran threat to his northern flank, he engaged in a war to unite northern China. With the fall of the Northern Liang in 439, Emperor Taiwu united northern China, ending the Sixteen Kingdoms period and beginning the Northern and Southern dynasties period