Bazhuo, after he took the throne, decided to attack Tang, believing that with Emperor Taizong then on campaign against Goguryeo, that Tang borders would be undefended. However, Emperor Taizong, anticipating the possibility of a Xueyantuo attack, had had the general Zhishi Sili () command Tujue soldiers to defend Xia Prefecture (, roughly modern Yulin, Shaanxi). Once Bazhuo attacked, Zhishi Sili and another general, Tian Renhui (), set a trap to induce Bazhuo to attack Xia Prefecture, and dealt him a defeat once he was at Xia Prefecture. Bazhuo withdrew, but soon attacked Xia Prefecture again.