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 Xizong of Tang
Emperor Xizong of Tang (June 8, 862 – April 20, 888), né Li Yan, later name changed to Li Xuan (, changed 873), was an emperor of the Tang dynasty of China. He reigned from 873 to 888. He was the fifth son of his predecessor Emperor Yizong and was the elder brother of his successor Emperor Zhaozong. His reign saw his realm overrun by the great agrarian rebellions led by Wang Xianzhi and Huang Chao, and while both were eventually defeated, by the end of Emperor Xizong's reign, the Tang state had virtually disintegrated into pieces ruled by individual warlords, rather than the imperial government, and would never recover, falling eventually in 907.