Wei was one of three rival kingdoms founded in the wake of the collapse of China's Han Dynasty. Comprised of China's northen provinces, it was founded by the warlord Cao Cao in the year A.D. 220. Wei engaged in military conflicts and political maneuvering with the other two kingdoms, Wu and Shu, in a period of history commonly referred to as the Three Kingdoms era.
Wei eventually conquered Shu in 263. However, the Cao family lost control of Wei the following year when Sima Yan forced Cao Huan out of power. Wei was thus rechristened Jin. Years later, in 280, Jin conquered Wu, reuniting all of China under the banner of the Jin Dynasty.