On June 18, 618 CE, Li Yuan (later known as Emperor Gaozu) formally established the Tang Dynasty after learning of the assassination of Emperor Yang of the Sui. Li Yuan had been a Sui military commander who rebelled in 617, captured the capital Chang'an, and initially installed a puppet emperor. Upon consolidating his power, he proclaimed himself emperor, founding a dynasty that would rule China for nearly three centuries. The Tang Dynasty became one of China's most prosperous and cosmopolitan periods, characterized by territorial expansion, economic prosperity, cultural achievements, and international influence.