The two groups that dominated the court during the second half of Later or Eastern Han 東漢 (25-220 AD), were the consort clans (waiqi 外戚) and the eunuchs (huanguan 宦官). After Emperor Huandi 漢桓帝 had ended the power of the consort clans, he and his successor Lingdi 漢靈帝 were only supported by the eunuchs. The second attempt to extinguish the powerful eunuch faction in 189 AD was successful, and the power vacuum was filled by warlords that took over the regency for the weak emperors. The ruthless general Dong Zhuo 董卓 who had sacked the capital Luoyang 洛陽, was eventually defeated by Cao Cao 曹操 who was regent for the minor emperor Xiandi 漢獻帝, who abdicated in 220 in favour of Cao Cao's son Cao Pi 曹丕. Acting as emperor of a new dynasty called Wei 魏, he had ended the four hundred year old Han Dynasty (206 BC - 220 AD). Of the many warlords, only Sun Quan 孫權 was left, and Liu Bei 劉備, who claimed to be the real successor of the house of Han and proclaimed himself emperor of Shu 蜀 in 221. Sun Quan followed only one year later, establishing the third of the Three Kingdoms, Wu 吳 (Sanguo 三國; should better be called "Three Empires"). These three "kingdoms" or rather empires were never able to consolidate the power of the imperial throne against the mighty magnates and military leaders. Sima Yan 司馬炎 of the state of Wei should terminate the dynasty of Cao Cao and reunite China in his Jin Dynasty 晉 .