In 534, the Northern Wei split into an Eastern Wei (534–550) and a Western Wei (535–556) after an uprising in the steppes of North China inhabited by Xianbei and other nomadic peoples. The former evolved into the Northern Qi (550-577), and the latter into the Northern Zhou (557-581), while the Southern Dynasties were pushed to the south of the Yangtze River. In 581, the Prime Minister of Northern Zhou, Yang Jian, founded the Sui dynasty (581–618). His son, the future Emperor Yang of Sui, absorbed the Chen dynasty (557–589), the last kingdom of the Southern Dynasties, thereby unifying much of China. After the Sui came to an end amidst peasant rebellions and renegade troops, his cousin, Li Yuan, founded the Tang dynasty (618–907). Sui and Tang dynasties were founded by Han generals who also served the Northern Wei dynasty. Through these political establishments, the Xianbei who entered China were largely merged with the Chinese, examples such as the wife of Emperor Gaozu of Tang, Duchess Dou and Emperor Taizong of Tang's wife, Empress Zhangsun, both have Xianbei ancestries, while those who remained behind in the northern grassland emerged as later powers to rule over China as Mongol Yuan dynasty and Manchu Qing dynasty.