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.
Zhangsun Wuji
Li Yuan captured Chang'an in winter 617 and declared Emperor Yang's grandson Yang You emperor (as Emperor Gong), taking power himself as regent. After he received news in spring 618 that Emperor Yang had been killed at Jiangdu (江都, in modern Yangzhou, Jiangsu) in a coup led by the general Yuwen Huaji, he had Yang You yield the throne to him, establishing Tang Dynasty as its Emperor Gaozu. Li Shimin was created the Prince of Qin and thereafter became the main general in charge of his father's campaigns to reunify China under Tang rule, which was largely complete by 623, when the last major rival to Tang, Liu Heita the Prince of Handong, was captured and killed by Li Shimin's older brother, Li Jiancheng the Crown Prince. For Zhangsun Wuji's contributions to Li Shimin's campaigns, he was created the Duke of Shangdang.