In 220 AD the last Han emperor was dethroned by a group of powerful warlords. During the period of disunion (220-589), the warlords established their own private armies and proclaimed their own ruler. Many dynasties were established during this time of turmoil. The time between 220 AD and 265 AD was known as the Three Kingdoms Period.
Of the three kingdoms, the northern state of Wei was the strongest. After years of fighting, it finally succeeded in annexing the other two states, and founded the Jin Dynasty around 270 AD The unification was only temporary because the Jin emperor's princes began fighting among themselves. Nomadic groups in the north took advantage of the chaos and attacked. In 317 AD the Jin Dynasty lost its territory in northern China. For the next 250 years, northern China was divided and ruled by numerous nomadic tribes, while the south was controlled by a sequence of four short-lived Chinese dynasties, all with the capitals at present-day Nanjing. This was the time of the Northern and Southern Dynasties.
The Southern Dynasty had a powerful, hereditary aristocracy that had become entrenched in government posts. The Wei had adopted a civil service system based on the nine ranks, which was originally a way for determining by evaluation a person's character and talent. Unfortunately, this system did not work. The social status of the candidate's family determined his post in the government.
Nobles would marry only within families of equivalent social status, and compiled lists and genealogies of the most eminent families. The aristocrats were assured government salaries and exemptions from taxes and labor service. Intellectual, literary, and artistic achievements among these families flourished. Many of the families were prominent in landscape painting, poetry writing and witty conversation.
The economy of the Southern Dynasty was much more prosperous than the Northern Dynasty and many Chinese escaped to the south. Because of its temperate climate and abundant water supply, the south was a good agricultural area, and many immigrants prospered in the region when they took on land for farming.
In the north, none of the states established by the nomadic people lasted very long, with the exception of the Xianbei people. The Xianbei tribe founded the Northern Wei Dynasty (386-534 AD). One of the Xianbei emperors used the more advanced culture of the Chinese as a pattern and implemented a series of policies designed to reform and strengthen the state. The Xianbei emperor employed Chinese officials, adopted Chinese-style clothing and customs at court, and made Chinese the official language. A new system of distributing land to the farmers promoted agricultural production. The capital was moved from the frontier to inland Luoyang the old capital of the Jin Dynasty. However, the reform met with resistance among the Xianbei nobles, whose rebellion in 524 AD, brought about a decade of constant warfare. For the next 50 years, north China was torn apart by struggles among different factions.
During this chaotic period, Buddhism became firmly established in China. In the 1st century AD, it was introduced to China along the Silk Road by travelers and monks. Buddhism was different from other native Chinese religions. As a universal religion, it embraced all people, regardless of their ethnicity or social status. The number of Buddhist temples grew rapidly in China. Many Chinese converted to Buddhism.