that if he was unable to do that, he would rise against Li Gui and overthrow him. Emperor Gaozu agreed with the plan. Once An Xinggui arrived in Wuwei, Li Gui made him a general. He tried to persuade Li Gui to submit to Tang and offer his territory to Tang. Li Gui refused, believing that he could defend his realm against Tang. An Xinggui then plotted with An Xiuren, and they gathered the Xiongnu people to attack Li Gui. Li Gui was unable to withstand the attack, and withdrew within Wuwei. An Xinggui put Wuwei under siege, while calling for the people to surrender. The people of Wuwei exited the city in droves to surrender to An Xinggui. Li Gui, seeing that the situation was hopeless, climbed up the tower he built for the goddess, along with his empress, holding one final feast of farewell. An Xinggui soon entered the city and captured him, delivering him to Chang'an. Emperor Gaozu executed him and his sons and brothers. References Old Book of Tang, vol. 55. New Book of Tang, vol. 86. Zizhi Tongjian, vols. 184, 185, 186, 187. Chinese emperors Sui dynasty politicians Sui dynasty Taoists Tang dynasty Taoists 619 deaths Executed people from Gansu 7th-century executions by the Tang dynasty 7th-century Chinese monarchs People from Wuwei Politicians from Gansu Year of birth unknown Transition from Sui to Tang Founding monarchs