back across the frontier by Cao Zhang. In 220 he acknowledged Cao Pi as emperor of Cao Wei. Eventually he turned on the Wei for frustrating his advances on another Xianbei khan, Sui. Kebineng conducted raids on Cao Wei before he was killed in 235, after which his confederacy disintegrated. Many of the Xianbei tribes migrated south and settled on the borders of the Wei-Jin dynasties. In 258 Tuoba Liwei's people settled in Yanmen Commandery. The Yuwen tribe settled between the Luan River and Liucheng. The Murong and Duan tribes became vassals of the Sima clan. An offshoot of the Murong tribe moved west into northern Qinghai and mixed with the native Qiang people, becoming Tuyuhun. The Xianbei went on to found five of the short lived Sixteen Kingdoms: Former Yan (337–370), Later Yan (384–409), Western Qin (385–431), Southern Liang (397–414), and Southern Yan (398–410), as well as one of the Northern and Southern dynasties: Northern Wei (386–535). Xiongnu By the time of the Three Kingdoms period the Xiongnu had already ceased to be a major power. Their last stand as a steppe empire was in 89 when Dou Xian led an army of 45,000 and decisively defeated them at the Battle of the Altai Mountains. The Xiongnu Empire was replaced by a loose confederation of disorganized Xianbei tribes, who were nonetheless highly aggressive and proved problematic to their southern neighbors. A southern branch of the Xiongnu split off from their northern neighbors in 50 AD and continued to exist as a Han puppet state in Bing Province. However, in 188 the Xiuchuge clan rebelled against their chanyu, Qiangqu, for sending troops to aid the Han against the rebels Zhang Ju and Zhang Chun. They replaced Qiangqu with his son Yufuluo, whose hold on power was tenuous, and he was ousted over a marquis of the Xubu clan. When the marquis of Xubu died the next year an elderly king became the nominal head of state without the title of Chanyu and the Southern Xiongnu ceased to exist as a coherent entity. In 216 the Xiongnu of the Ordos were settled but the region remained outside the jurisdiction of Cao Wei's administration. Yufuluo fled to the Han court but found no support after the death of Emperor Ling of Han in 189. He became a wandering mercenary and died in 194. Yufuluo's brother Huchuquan attempted to regain his position as