Li Shimin agreed, and in 626 ambushed Li Jiancheng and Li Yuanji, killing them. During the subsequent battles between Li Shimin's forces and Li Jiancheng's and Li Yuanji's forces, Hou led Li Shimin's forces. Following these battles, Li Shimin effectively forced Emperor Gaozu to make him the crown prince, and then to yield the throne to him (as Emperor Taizong).
Li Shimin concurred, and in 626 launched a surprise attack on Li Jiancheng and Li Yuanji, killing them. Following this, Hou led Li Shimin's forces, and Li Shimin ultimately forced Emperor Gaozu to name him crown prince and eventually step down from the throne (as Emperor Taizong).