User:Lệ Xuân/History of the Tang dynasty

Founding of the Tang
The Sui Dynasty had successfully unified China after centuries of disintegration and reinstalled the rule of ethnic Han in the entirety of China proper. Through the reforms of its founder, Emperor Wen, the Sui entered a golden age of prosperity, with an unparalleled agricultural surplus that supported rapid population growth. However, the many ambitious wars and construction projects such as the costly and disastrous invasions against Goguryeo or the construction of Grand Canal, and the expansion of Great Wall undertook by his son, Emperor Yang, have overstretched the national resources and "created deep discontent among the general populace". As rebellions broke out across the country, the empire soon began to collapse.

Li Yuan, the governor of Taiyuan, belongs to a northwestern military aristocratic family and was one of the most powerful Sui generals at the time. Li himself was a first cousin to Emperor Yang, as their mothers are both daughters of Dugu Xin, a prominent figure of the Northern Zhou dynasty. As an experienced commander, he was given many important military assignment, including fighting against various rebel groups. In May 617, Li Yuan revolted and soon captured the capital Daxing. He then installed Yang You, who was Emperor Yang's grandson, as a puppet emperor, while relegated Emperor Yang to the position of Retired Emperor (Taishang Huang). After hearing the news that the retired emperor was murdered by Yuwen Huaji on June 18, 618, Li Yuan deposed Yang You and proclaimed himself emperor of the new founding Tang Dynasty.

Upon taking the throne, one of Li Yuan's first goals was to defeat other rebel leaders in order to reunite the empire. In 618, Tang forces defeated the army Xue Ju, Xue Rengao in the Northwest and forced Li Mi in Luoyang to surrender. In 622, Tang army under command of Li Shimin defeated Dou Jiande at Luoyang in the Battle of Hulao on May 28, 621. While Emperor Gaozu defeated his rivals and successfully restored stability in the court, an internal power struggle for the position as heir apparent between his sons began to ignite. Li Shimin, who was instrumental in defeating several of Tang's major rivals, was not satisfied with his father's choice of successor. He ambushed and killed his two brothers, Li Yuanji and Crown Prince Li Jiancheng, at Xuanwu Gate Gate and forced his father to name him his new heir. Shortly thereafter, his father abdicated in his favor and Li Shimin, who would become known as Emperor Taizong, ascended the throne.