Liu Heita
By winter 622, Liu Heita posed the only remaining major threat against Tang rule. At the suggestion of his staff members Wang Gui and Wei Zheng, who argued that Li Jiancheng needed some victories himself to establish his reputation, Li Jiancheng volunteered to command the army against Liu Heita. Emperor Gaozu thus sent Li Jiancheng, assisted by Li Yuanji. Around the new year 623, with Liu's forced bogged down while attacking Tang's Wei Prefecture (, in modern Handan, Hebei), Li Jiancheng and Li Yuanji engaged him at Guantao (, in modern Handan as well), crushing him. Liu fled north toward the Eastern Turks, but was ambushed and captured by his own official Zhuge Dewei (), who delivered him to Li Jiancheng. Li Jiancheng executed Liu. Around the same time, Xu was killed in flight. Meanwhile, Lin Shihong the Emperor of Chu, who had one point controlled modern Jiangxi and Guangdong, had died, and his followers scattered. China was by this point completely unified by Tang except for the domain of Liang Shidu the Emperor of Liang, who controlled modern northern Shaanxi and western Inner Mongolia, although, with Li Fuwei at Chang'an, Fu Gongshi rebelled in 623 and declared himself the Emperor of Song. Fu's rebellion, however, was quelled by Li Xiaogong in 624.