Liang Shidu

In 628, with the Eastern Turks in internal turmoil and unable to come to his aid, Emperor Taizong launched another attack on Liang.

Liang Shidu was from a prominent clan of Xia Province (夏州, roughly modern Yulin, Shaanxi), and during the reign of Emperor Yang of Sui, he served as a military officer.

At that time, there were many agrarian rebellions in the region, and Liang gathered a group of men and ambushed the secretary general of Shuofang Commandery, Tang Shizong (唐世宗).

He initially claimed the title of grand chancellor (大丞相, Da Chengxiang) and entered into an alliance with Eastern Tujue.

Liang Shidu entered into an alliance with another rebel leader of the region, Guo Zihe (郭子和).

In spring 619, Ashina Duojishi was planning on a major incursion into Chinese territory, and both Liang and another rebel ruler, Liu Wuzhou the Dingyang Khan, joined him.

In spring 623, Liang Shidu's generals He Sui (賀遂) and Suo Tong (索同) defected to Tang, along with the territory they controlled.

In summer 623, Duan Decao launched another attack on Liang, reaching Shuofang, but withdrew after pillaging.

In response, the Liang general Xin Liao'er (辛獠兒) guided Eastern Tujue troops to attack Tang's Lin Prefecture (林州, roughly modern Qingyang), and then Liang himself guided Eastern Tujue forces to attack Tang's Kuang Prefecture (匡州, also in modern Yulin).

Map of the situation in northern China during the transition from the Sui to the Tang, with the main contenders for the throne and the main military operations