When Li Yuan (Li Shimin's father and future founding emperor of Tang Dynasty) decided to rebel against Sui in 617, Liu Hongji and Zhangsun Shunde ambushed and killed Wang Wei and Gao Junya, the two deputy officials of Taiyuan who helped Emperor Yang of Sui spy on Li Yuan, and made it possible for Li Yuan to rebel in Taiyuan.