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.
Tang Daoxi
In 907, Tang Dynasty's last emperor Emperor Ai was forced to yield the throne to the major warlord Zhu Quanzhong the military governor of Xuanwu Circuit (宣武, headquartered in modern Kaifeng, Henan), ending Tang and starting a new Later Liang with Zhu as its Emperor Taizu. Wang Jian, along with several other regional warlords (Li Maozhen the military governor of Fengxiang Circuit (鳳翔, headquartered in modern Baoji, Shaanxi), Li Keyong the military governor of Hedong Circuit (河東, headquartered in modern Taiyuan, Shanxi), and Yang Wo the military governor of Huainan Circuit (淮南, headquartered in modern Yangzhou, Jiangsu)) refused to recognize the new Later Liang emperor, and Wang Jian and Yang issued a declaration urging the people to rise against Later Liang. However, when they did not receive a positive response from other regional governors, Wang Jian decided to declare himself emperor of a new state of Former Shu. As part of a series of personnel commissions after he declared himself emperor, Wang recalled Tang Daoxi from Lang Prefecture to serve as the director of palace communications ("Shumishi").