In 370, the Former Yan Kingdom was conquered by the Former Qin Kingdom, led by Fu Jiān an ethnic Di and his general, Wang Meng. They were assisted by Murong Chui, who defected from the Former Yan due to court intrigue. In 383, after the Former Qin was defeated by the Eastern Jin in the Battle of Feishui, Murong Chui founded the Kingdom of Later Yan, which occupied much of the territories of the Former Yan, including You. To the west, the Tuoba Xianbei founded the Kingdom of Northern Wei in 386 and invaded the Northern Yan in 396, capturing Yuyang, Ji and other cities in You Prefecture. By 439, the Northern Wei extinguished the last of the Sixteen Kingdoms and unified northern China.