Political division was finally overcome when the Sui Dynasty conquered its rivals to reunify China in 581. Although the dynasty lasted only thirty-seven years, it left a lasting legacy in the form of political reform, the construction of roads and canals, and the institution of written merit-based exams for the appointment of officials. The Tang Dynasty that followed would last for centuries and would build upon the Sui’s accomplishments to create an era of impressive cultural creativity and political power.