Wei (220–265), or
Cao Wei, was one of the three major states that competed for supremacy over China in the
Three Kingdoms period (220–280). With its capital at
Luoyang, the state was established by
Cao Pi in 220, based upon the foundations laid by his father,
Cao Cao, towards the
end of the Eastern Han dynasty. Its name originated as such: In 213, Cao Cao's feudal holdings were given the name "Wei" by the Eastern Han government. Historians often add the prefix "Cao" to distinguish it from other Chinese states known as "Wei", such as
Wei of the
Warring States period and
Northern Wei of the
Southern and Northern Dynasties. The authority of the ruling Cao family gradually weakened after the death of the second Wei emperor,
Cao Rui, and eventually fell into the hands of
Sima Yi, a Wei regent, and his family, in 249. Cao Rui's successors remained as puppet rulers under the control of the Simas until Sima Yi's grandson,
Sima Yan, forced the last Wei ruler,
Cao Huan, to abdicate the throne and established the
Jin dynasty.