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.
Military history of the Sui–Tang dynasties
The Tang Empire collapsed into numerous rival warlord states, ushering in the period of Five Dynasties and Ten Kingdoms. In the south emerged the kingdoms of Wuyue, Min, and Southern Han. In the north, Li Keyong of Hedong and Zhu Quanzhong of Bianzhou vied for supremacy. Zhu held the last two Tang emperors as captives and controlled the North China Plain. He made an unsuccessful attempt to murder Li in 884 and proclaimed himself Emperor of Later Liang in 907. Zhu's Liang dynasty survived for only 11 years after his death in 912, and it was conquered in 923 by Li Keyong's successor Li Cunxu, founder of Later Tang. In 937, the Later Tang gave way to a number of short lived military regimes from which the Song dynasty eventually emerged, reuniting most of China by 979. However the Song never quite achieved the hegemonic status of the early Tang. It was, militarily speaking, at best only equal and at worst completely inferior to its northern neighbor, the Khitan Liao dynasty, followed by the Jurchen Jin dynasty.