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.
Kuizhou
Kuizhou was part of Former Shu, founded by Wang Jian as part of the aftermath of the dissolution of the Tang dynasty: Wang was in control of Kuizhou in 907, when the Tang dynasty formally is considered to have ended. Kuizhou was part of Later Tang (one of the Five Dynasties which succeeded each other in control to the north of China), after its conquest of Former Shu, in a southern extension of power.