Li Shimin, continued to advance. After defeating Sui forces at Huoyi (霍邑, also in modern Yuncheng), he decided to leave a small contingent to watch over Hedong while advancing across the Yellow River into Guanzhong (i.e., the Chang'an region). Once he did, he headed for Chang'an himself, while sending Li Jiancheng to capture the territory around the Tong Pass region to prevent Sui forces at Luoyang from reinforcing Chang'an and Li Shimin north of the Wei River to capture territory there. Meanwhile, his daughter had also risen in rebellion in support of him, and she was able to gather a sizable army and capture some cities. She joined forces with Li Shimin and her husband Chai Shao. Soon, Li Yuan reconsolidated his forces and put Chang'an under siege. In winter 617, he captured Chang'an and declared Yang You emperor (as Emperor Gong). He had himself made regent (with the title of grand chancellor) and created the Prince of Tang. (Meanwhile, most of Sui territory did not recognize Yang You as emperor and continued to recognize Emperor Yang as emperor and not as retired emperor.) He sent his nephew Li Xiaogong south, and Li Xiaogong was able to persuade the Sui cities in modern southern Shaanxi, Sichuan, and Chongqing to submit. Establishment of Tang and gradual unification In spring 618, Emperor Yang was killed at Jiangdu (, in modern Yangzhou, Jiangsu) in a coup led by the general Yuwen Huaji. When the news reached Chang'an, Li Yuan had Yang You yield the throne to him, becoming Emperor Gaozu of the Tang Dynasty . He restored much of the institutions of Sui's first ruler, Emperor Wen, reversing a number of changes that Emperor Yang made. He created Yang You the Duke of Xi, Li Jiancheng, his oldest son, was named crown prince, while Li Shimin was made the Prince of Qin and Li Yuanji the Prince of Qi. Meanwhile, the Sui officials at Luoyang declared another grandson of Emperor Yang, Yang You's brother Yang Tong, the Prince of Yue, as emperor, and refused to recognize the regime change in Chang'an. Emperor Gaozu's rule immediately faced a major challenge from Xue Ju, an agrarian leader who had declared himself the Emperor of Qin. During the fall of 618, Xue took advantage of Li Shimin's illness to defeat an army commanded by Li Shimin and Liu Wenjing at Qianshui Plain (in modern Xianyang, Shanxi)