Buddhist practices of meditative discipline, image worship and ritual devotion spread rapidly through Chinese society in the period of disunity after the fall of the Han dynasty. By the early fourth century, for example, regular, multi-week Buddhist retreats of up to 5,000 people were being held, and by the sixth century over two million people—roughly one out of every twenty-five people in China—were ordained as monks and nuns. Buddhism played crucial roles in the unification of nomadic peoples under the Northern Wei (386–534) and in the eventual restoration of the Chinese empire with the founding of the Sui dynasty (581–618). A sense of the importance of Buddhism in shaping the political and cultural imaginaire of medieval China can be gleaned by considering the investment needed to build the monumental cave complexes at Yungang and Longmen—each with tens of thousands of Buddhist images carved out of live rock, some as large as sixty feet in height with faces originally clad in gold.