After Emperor Yang was killed in a coup at Jiangdu (江都, in modern Yangzhou, Jiangsu) in 618, Li Yuan had Yang You yield the throne to him, establishing Tang Dynasty as its Emperor Gaozu. He made Li Xiaogong the commandant at Xin Prefecture (信州, later name changed to Kui Prefecture (夔州), modern eastern Chongqing). As Li Xiaogong's territory was contiguous with another rebel ruler, Xiao Xian the Emperor of Liang, he offered Emperor Gaozu suggestions on destroying Liang. Emperor Gaozu created him the Prince of Zhao Commandery and, in spring 621, made the general Li Jing his assistant and strategist, preparing a major assault on Liang. He commissioned the sons of many of the non-Han chieftains of the area as officers, both as a way to placate the chieftains and to hold them as collateral for their loyalty.