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 poetry
After the official fall of the Tang dynasty in 907, some members of its ruling house of Li managed to find refuge in the south of China, where their descendants founded the Southern Tang dynasty in the year 937. This dynasty continued many of the traditions of the former great Tang dynasty, including poetry, until its official fall in 975, when its ruler, Li Yu, was taken into captivity. Importantly for the history of poetry, Li survived another three years as a prisoner of the Song dynasty, and during this time composed some of his best known works. Thus, including this "afterglow of the T'ang dynasty", the final date for the Tang Poetry era can be considered to be at the death of Li Yu, in 978.