Tang dynasty
Zhu Wen, originally a salt smuggler who had served under the rebel Huang Chao, surrendered to Tang forces. By helping to defeat Huang, he was granted a series of rapid military promotions. In 907 the Tang dynasty was ended when Zhu Wen, now a military governor, deposed the last emperor of Tang, Emperor Ai of Tang, and took the throne for himself (known posthumously as Emperor Taizu of Later Liang). He established the Later Liang, which inaugurated the Five Dynasties and Ten Kingdoms period. A year later Zhu Wen had the deposed Emperor Ai poisoned to death.
Emperor Xuanzong of Tang (9th century)
Emperor Xuānzong of Tang (July 27, 810 – September 7, 859) (reigned April 25, 846 – September 7, 859) was an emperor in the latter part of the Tang dynasty of China. Personally named Li Yi, later renamed Li Chen (), and known before his reign as the Prince of Guang, he was considered the last capable emperor of Tang China. Succeeding emperors after Xuānzong would either be too young or be dominated by eunuchs or warlords. Emperor Xuānzong was the 13th son of Emperor Xianzong (r. 806–820) and an uncle of the previous three emperors, Emperor Jingzong, Emperor Wenzong, and Emperor Wuzong.