The economic history of China covers thousands of years and the region has undergone alternating cycles of prosperity and decline. China, for the last two millennia, was one of the world's largest and most advanced economies. Economic historians usually divide China's history into three periods: the pre-imperial era before the rise of the Qin; the early imperial era from the Qin to the rise of the Song (221 BCE to 960 CE); and the late imperial era, from the Song to the fall of the Qing. Neolithic agriculture had developed in China by roughly 8,000 BCE. Stratified Bronze Age cultures, such as Erlitou, emerged by the third millennium BCE. Under the Shang (16th–11th centuries BCE) and Western Zhou (11th–8th centuries BCE), a dependent labor force worked in large-scale foundries and workshops to produce bronzes and silk for the elite. The agricultural surpluses produced by the manorial economy supported these early handicraft industries as well as urban centers and considerable armies. This system began to disintegrate after the collapse of the Western Zhou in 771 BCE, leaving China fragmented during the Spring and Autumn (8th–5th centuries BCE) and Warring States eras (5th–3rd centuries BCE). As the feudal system collapsed, most legislative power transferred from the nobility to local kings. Increased trade during the Warring States period produced a stronger merchant class. The new kings established an elaborate bureaucracy, using it to wage wars, build large temples, and enact public-works projects. This meritocratic system rewarded talent over birthright. Greater use of iron tools from 500 BC revolutionized agriculture and led to a large population increase during this period. In 221 BCE, the king of the Qin declared himself the First Emperor, uniting China into a single empire, its various state walls into the Great Wall, and its various peoples and traditions into a single system of government. Although their initial implementation led to its overthrow in 206 BCE, the Qin's institutions survived. During the Han dynasty (206 BC-220 AD), China became a strong, unified, and centralized empire of self-sufficient farmers and artisans, with limited local autonomy. The Song period (960-1279 AD/CE) brought additional economic reforms. Paper money, the compass, and other technological advances facilitated communication on a large scale and the widespread circulation of books. The state's control of the economy diminished, allowing private merchants to prosper and a large increase in investment and profit. Despite disruptions during the Mongol conquest of