After the fall of the Han dynasty, more than 350 years of disruption plagued China. Toward the end of the sixth century, centralized imperial rule returned to China and persisted for almost 700 years under the Sui, Tang, and Song dynasties (589–1279 C.E.). This period witnessed unprecedented economic prosperity for China. In addition, China, as the "Middle Kingdom," made its influence felt throughout the surrounding territories, creating a larger East Asian society centered on China.
In 589 CE, after almost four centuries, China was reunited for the first time since the end of the Han era. The intervening four hundred years, often referred to as the Six Dynasties Period, was marked by political struggle and military strife on a level not seen in China in over a millennium. Yet while many histories describe the Six Dynasties era as a China's version of Europe's "dark ages," it was also a period of great cultural intermingling. Various Central and Western Asian peoples settled in the north regions of China, and local populations migrated en masse from area to area in search of new lands to settle. The various cultural elements introduced during these four centuries were further unified and Sinicized when the Sui achieved a new unification of China. This synthesis would reach its culmination in the distinctive culture of the Tang dynasty, which came to power after the downfall of the second Sui emperor.
Though the Sui dynasty ruled only for approximately thirty years, much was accomplished by the first emperor Wendi (reigned 581-604), formerly a general for the Northern Zhou dynasty. Among Wendi's many accomplishments was a restructuring of the government to simplify internal administration, a revision of the penal code, and a number of public work projects, including the creation of a complex canal system joining the Yellow, Huai and Yangzi Rivers. Wendi was also a supporter of Buddhism, and encouraged the spread of the religion throughout his domain.
The Chinese believe in a surrounding-world of spirits, whose origin is exceedingly various. They touch life at every point. There are spirits which are guardians of the soil, tree spirits, mountain demons, fire gods, the spirits of animals, of mountains, of rivers, seas and stars, of the heavenly bodies and of many forms of active life. These spirits to the Chinese mind, of today are a projection, a sort of spiritual counterpart, of the many sided interests, practical or otherwise, of the groups and communities by whom they are worshipped. There are other spirits which mirror the ideals of the groups by which they are worshipped. Some of them may have been incarnated in the lives of great leaders. There are spirits which are mere animations, occasional spirits, associated with objects crossing the interests of men, but not constant enough to attain a definite, independent life as spiritual beings. Thus surrounding the average Chinese peasant there is a densely populated spirit world affecting in all kinds of ways his, daily existence. This other world is the background which must be kept in mind by one who would understand or attempt to guide Chinese religious experience. It is the basis on which all organized forms of religious activity are built. The nearest of these to his heart is the proper regard for his ancestors.