In 626, Li Shimin, in an intense rivalry with his older brother Li Jiancheng the Crown Prince and fearing that Li Jiancheng was about to kill him, ambushed Li Jiancheng and another brother, Li Yuanji the Prince of Qi, who supported Li Jiancheng, at Xuanwu Gate and killed them.
In 643, with Li Chengqian, then crown prince, and Li Tai, locked in an intense rivalry, Li Chengqian plotted to overthrow Emperor Taizong and was deposed.