Yang of Sui. Emperor Yang was an ambitious ruler who immediately undertook many projects, including the building of the Grand Canal and the reconstruction of the Great Wall. Thousands of forced labourers died while building the projects, and eventually women were required to labour in the absence of men. He also launched a series of unsuccessful campaigns against Goguryeo. These campaigns negatively impacted the image of the dynasty, while his policies drove the people to revolt. Agrarian uprisings and raids by the Gokturks became common. In 618, the Emperor was assassinated and the Sui dynasty ended. Tang dynasty (618–907) The Tang dynasty was another golden age, beginning in the ruins of the Sui. By 630, the Tang had conquered the powerful Gokturk Khagnate, preventing threats to China's borders for more than a century. A series of strong and efficient rulers, beginning with the founder and including a woman, expanded the Tang Empire to the point that it rivalled the later Yuan, Ming and Qing. The Tang was a period of rapid economic growth and prosperity, seeing the beginnings of woodblock printing. Tang rulers issued large amounts of currency to facilitate trade and distributed land under the equal-field system. The population recovered to and then surpassed Han levels, reaching an estimated 90 million. Although the state weakened after the disastrous An Shi Rebellion, and withdrew from managing the economy in the 9th century, this withdrawal encouraged economic growth and helped China's economy to develop into the mercantile economy of the Song and Ming Dynasties. Before the An Shi Rebellion Emperor Taizong of Tang, the second ruler of the dynasty, is regarded as one of the greatest rulers in Chinese history. Under his rule, China progressed rapidly from the ruins of a civil war to a prosperous and powerful nation. His reign is called the Reign of Zhenguan. Taizong reduced conscript labour requirements and lowered taxes; in addition, he was careful to avoid undertaking projects that might deplete the treasury and exhaust the strength of the population. Under his reign, a legal code called the Code of Tang was introduced, moderating the laws of the Sui. During Taizong's reign and until the An Shi Rebellion, the Chinese Empire went through a relatively peaceful period of economic development. Taizong and his son's conquest of the Gokturk, Xueyantue, Goguryeo and other enemy empires ensured relative peace for China. Control over the western provinces of