Wang Gui (571–639), courtesy name Shujie, posthumously known as Duke Yi of Yongning, was a Chinese official who served as a chancellor during the reign of Emperor Taizong (Li Shimin) in the Tang dynasty. He had previously served Li Shimin's elder brother, Li Jiancheng, with whom Li Shimin was locked in an intense rivalry during the reign of their father, Emperor Gaozu, but after Li Shimin killed Li Jiancheng and then took the throne, he knew that Wang was faithful to Li Jiancheng and was capable, and therefore retained him, eventually making him chancellor. Wang was known for his honest and blunt criticism of the emperor, and for that was honored by Taizong, who appreciated such criticism. Background Wang Gui was born in 571, during the reign of Northern Qi's emperor Gao Wei. His grandfather Wang Sengbian had been a major general and later regent of Liang Dynasty, who, at one point, in order to make peace with Northern Qi, sent Wang Gui's father Wang Yi (王顗) and grandmother to Northern Qi as hostages. After Wang Sengbian was killed in a coup by the general Chen Baxian (who later founded Chen Dynasty) in 555, Wang Yi remained in Northern Qi and served as a commandery governor. In 573, after the former Liang general Wang Lin, with whom Wang Yi shared the desire of destroying Chen and reestablishing Liang, was killed by the Chen general Wu Mingche, Wang Yi, in great distress in mourning Wang Lin, died. Wang Gui, having lost his father early in his life, was said to be elegant in his behavior, having few desires and comfortable in his poverty, and not making friends easily with just anyone. His uncle Wang Po (王頗) was a highly regarded scholar at that time and was said to be a good judge of character, and Wang Po once commented, "Our clan's hopes all rest on this child." During Sui Dynasty Near the end of the reign of Emperor Wen of Sui, Wang Gui served as a low-level imperial official in charge of ceremonies. After Emperor Wen died in 604, his crown prince Yang Guang took the throne as Emperor Yang. Another son of Emperor Wen, Yang Liang the Prince of Han, on whose staff another uncle of Wang Gui's, Wang Kui (王頍), served, rose in rebellion against Emperor Yang, and after he was defeated, Wang Kui committed suicide, and Wang Po