Zhai Liao, a royal family member of the West Ding Ling, followed the horde migrate from Kazakhstan into China, his cousin
Zhai Bin (翟斌), khan of the horde, who wage war against
Former Qin's emperor
Fu Jiān in 383, supported
Later Yan's founding emperor
Murong Chui when Murong Chui rebelled against Former Qin as well and established Later Yan. However, in 384, as Murong Chui sieged the important city
Yecheng, which was defended by Fu Jiān's son
Fu Pi, Zhai Bin, seeing that Murong Chui was unable to capture the city quickly, began to consider other options. When, in particular, he requested a prime ministerial title from Murong Chui and was refused, Zhai Bin prepared to ally with Fu Pi instead, but his plan was discovered, and he was ambushed, along with his brothers Zhai Tan (翟檀) and Zhai Min (翟敏). It was apparently at this time that Zhai Liao and his cousin Zhai Zhen (翟真) fled with some of their Dingling troops and resisted Later Yan's subsequent campaigns to take the territory north of and around the
Yellow River. In late 384, Zhai Liao was defeated by Murong Chui's sons
Murong Lin and
Murong Nong and forced to flee to his cousin Zhai Zhen. In 385, Zhai Zhen's subordinate Xianyu Qi (鮮于乞) assassinated him and attempted to take over, but the Zhai family struck back and killed him; another cousin of Zhai Liao's, Zhai Cheng (翟成), succeeded Zhai Zhen, but many of their subordinates surrendered to Later Yan. In fall 385, Murong Chui attacked Zhai Cheng, instead, Murong Chui had huge casualties and lose the advantage of the battle, but Zhai Cheng's subordinate Xianyu De (鮮于得) assassinated Zhai Cheng and surrendered his army. His surrendered Dingling troops were largely slaughtered. However, Zhai Liao escaped the massacre and sought refuge with Teng Tianzhi (滕恬之),
Jin's governor of Liyang Commandery (黎陽, roughly modern
Hebi,
Henan). Teng trusted Zhai Liao greatly, and Zhai Liao, because Teng's overdedication to hunting and ignorance of his soldiers' needs, began to develop relationships with soldiers with his popular among them. In 386, when Teng was on a campaign, he commissioned Zhai Liao to keep guard of Liyang; instead, Zhai Liao succeeded Liyang after Teng was ambushed during campaign. During the next two years, Zhai Liao begin to gather his lost DingLing subjects, his horde slowly reformed, same time, he repeatedly tried to attack Jin, but was repelled in his efforts, and he apparently entered into an alliance with
Western Yan's emperor
Murong Yong. In 387, Murong Chui betrayed alliance, attacked Zhai Liao, and many of Zhai Liao's subordinates suicided after month without food and water during the siege. Zhai Liao led reinforcements to crush the siege and defeated the Yan army. For peace treaty, Murong Chui created him the
Duke of Henan. ==Establishment of Wei==