and approach Chang'an. In response, Gaozu tried to enter an alliance with Li Gui, the Prince of Liang, between whose domain and the Tang Xue's Qin state was located, writing Li Gui and referring to him as cousin. Li Gui briefly submitted to Gaozu. Meanwhile, before he could attack Chang'an, Xue Ju died of illness and was succeeded by his son Xue Rengao, who was a capable commander but who had alienated his generals because of his cruelty. Li Shimin was soon able to attack Xue Rengao at Gaozhi (, in modern Xianyang as well), and force Xue Rengao to surrender. Meanwhile, Li Mi, having been defeated earlier in the year in a surprise attack (at the Battle of Yanshi) by the Sui general Wang Shichong, fled to Tang territory and submitted to Gaozu. Li Mi's general Xu Shiji, who controlled a major part of Li Mi's former territory, also submitted, and Emperor Gaozu, impressed with Xu's faithfulness to Li Mi, bestowed the imperial surname of Li on Xu. Gaozu created Li Mi the Duke of Xing, but only made him the Minister of Feasts, a post that Li Mi viewed as below his stature. Around New Year 619, Li Mi requested Emperor Gaozu's permission to head east to persuade some of his former subordinates to submit to Tang, but once he left Chang'an, planned to restore his independence. He was ambushed and killed by the Tang general Sheng Yanshi (). In spring 619, Wang Shichong at Luoyang had Yang Tong yield the throne to him, ending the Sui dynasty and establishing a new state of Zheng. Around the same time, Li Gui, while stating that he wished to be a Tang subject, refused the Tang creation of Prince of Liang, instead declaring himself the Emperor of Tang. In summer 619, Li Gui's official An Xinggui (), formerly a Tang official, rebelled against Li Gui and captured him, submitting to Tang. Gaozu executed Li Gui and incorporated his domain into Tang. Also around the same time, the rebel leader Du Fuwei, who controlled the modern southern Anhui, submitted to Tang, and Gaozu also bestowed the imperial surname of Li on him, creating him the Prince of Wu. Similarly, Luo Yi, who controlled the modern Beijing region, submitted, was bestowed the imperial surname of Li, and was created the Prince of Yan. Meanwhile, Tang was facing another serious threat—Liu Wuzhou, now