After the collapse of a united China under the Han dynasty in 220 due in large part to the Yellow Turban and the Five Pecks of Rice rebellions, China eventually coalesced into the Three Kingdoms. Of these, Cao Wei was the strongest, followed by Eastern Wu and Shu Han, but they were initially in a relatively stable formation. After a 249 coup by Sima Yi, the Sima family (司马氏) essentially controlled Cao Wei and the conquest of Shu by Wei rapidly followed.