Li Gui (warlord)

In 618, he briefly considered submitting to Emperor Gaozu of Tang (Li Yuan), with whom they both believed he had a distant family relationship, but ultimately rejected the idea.

In summer 617, when Xue Ju rebelled against the Sui dynasty's rule at Jincheng (金城, in modern Lanzhou, Gansu), Li discussed with his associates Cao Zhen (曹珍), Guan Jin (關謹), Liang Shuo (梁碩), Li Yun (李贇), and An Xiuren (安修仁) the possibility of also rebelling against Sui rule – under the reasoning that they were fearful that Xue would pillage Wuwei unless someone resisted, and the Sui officials were not capable of doing so.

Li claimed himself the title of "the Great Prince of Liang west of the River," and adopted a governmental structure modelled after that of Sui's founder Emperor Wen.

We rose in righteousness to save the people; if we murder for money, we are just bandits, and how can we achieve great things?"

The Western Tujue general Ashina Kandu (阿史那闞度), claiming the title of Kan Khan (闞可汗), also submitted to him.

Soon, Xue sent his general Chang Zhongxing (常仲興) to cross the Yellow River to attack Li Gui.

Meanwhile, Emperor Gaozu of Tang, who had established the Tang dynasty in spring 618 and wanted to enter an alliance with Li Gui to attack Xue Ju's successor Xue Rengao, sent messengers to Li Gui, calling him "younger cousin."

Further, at that time, Li Gui's realm was suffering from a famine, and Cao Zhen suggested that the food supplies be given to the hungry.

Li Gui agreed and withheld food rations, causing the people to lose their respect for him.

In summer 619, An Xiuren's brother An Xinggui (安興貴), then serving as an official under Tang's Emperor Gaozu, proposed that he go to Liang to try to persuade Li Gui to submit.

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.

Map showing major uprisings and rebellions in the last years of the Sui dynasty. Li Gui controls the northwestern region.