Meanwhile, an intense rivalry had developed between Li Jiancheng and Li Shimin, who now carried the title Prince of Qin. Although Li Jiancheng had made contributions towards Tang's reunification of China, Li Shimin had defeated a number of the most important contenders including
Xue Rengao, the Emperor of Qin,
Wang Shichong, the Emperor of Zheng, and
Dou Jiande, the Prince of Xia. Li Shimin therefore had a stronger reputation in the army. Li Yuanji was also often relied on by Li Yuan as a general and had been created the Prince of Qi. He supported Li Jiancheng in his rivalry with Li Shimin, and often pushed Li Jiancheng toward a more hard-line position, wanting to be crown prince when Li Jiancheng became emperor. Li Jiancheng and Li Yuanji had better relations with Li Yuan's favored young
concubines than Li Shimin did (their mother
Duchess Dou had died before Tang's establishment), and those concubines helped rehabilitate Li Jiancheng's standing before Li Yuan. Li Yuan had considered making Li Shimin crown prince instead of Li Jiancheng, but his concubines persuaded him not to. By winter 622, the only remaining major threat against Tang rule was
Liu Heita, the Prince of Handong. He had been a Xia general, and rose against Tang after Li Yuan had executed Dou Jiande. He had been defeated by Li Shimin earlier in the year. Li Jiancheng's staff members
Wang Gui and
Wei Zheng argued to him that he needed some victories to establish his reputation, and Li Jiancheng volunteered to command the army against Liu Heita. Li Yuan sent Li Jiancheng to attack Liu, assisted by Li Yuanji. Around the turn of the year, Liu's forces were bogged down while attacking Tang's Wei Prefecture (, in modern
Handan,
Hebei). Li Jiancheng and Li Yuanji engaged him at
Guantao, crushing him. Liu fled north toward the Eastern Tujue, but was ambushed and captured by his own official Zhuge Dewei (), who delivered him to Li Jiancheng. Li Jiancheng executed Liu. China was by this point almost completely unified by Tang. In 623, when the
Eastern Tujue made another incursion into Tang territory, Li Yuan again sent Li Jiancheng and Li Shimin to guard against the attack. Meanwhile, Li Yuanji suggested to Li Jiancheng that he could have Li Shimin assassinated when Li Shimin was visiting Li Yuanji's mansion, but Li Jiancheng refused, not having the heart to kill a brother. In 624, Li Jiancheng requisitioned a number of soldiers from the general
Li Yi, the Prince of Yan, to supplement his guard corps. This was against Li Yuan's regulations. Li Yuan rebuked Li Jiancheng when he found out, and exiled his guard commander Keda Zhi (). Nevertheless, Li Jiancheng later requested the commandant at Qing Prefecture (, in modern
Qingyang,
Gansu), Yang Wen'gan () to conscript troops, presumably to guard against Li Shimin. The officers Erzhu Huan () and Qiao Gongshan () informed Li Yuan that Li Jiancheng was encouraging Yang to start a rebellion so that they could seize power together. Li Yuan, then at Renzhi Palace (, in modern
Tongchuan,
Shaanxi), was incensed, and summoned Li Jiancheng, then at Chang'an, to Renzhi Palace. Li Jiancheng briefly flirted with the idea of occupying Chang'an instead of accepting the order, but eventually reported to Renzhi Palace to request forgiveness. Li Yuan put him under arrest. When Yang heard this, Yang rebelled, and Li Yuan sent Li Shimin to attack Yang. Li Yuan promised Li Shimin that he would replace Li Jiancheng as crown prince, and that Li Jiancheng would be sent to the modern
Sichuan region as the Prince of Shu. After Li Shimin left, however, Li Yuanji, Li Yuan's concubines, and the
chancellor Feng Deyi, all spoke on Li Jiancheng's behalf, and Li Yuan changed his mind, released Li Jiancheng, and allowed him to return to Chang'an as crown prince. Li Yuan then blamed the discord between his sons on Li Jiancheng's staff members Wang Gui and Wei Ting (), and Li Shimin's staff member
Du Yan, exiling them. Yang was subsequently assassinated by his own subordinates. Later that year, Li Yuan, troubled by repeated Eastern Tujue incursions, seriously considered burning Chang'an to the ground and moving the capital to
Fancheng, a suggestion that Li Jiancheng, Li Yuanji, and the chancellor
Pei Ji agreed with. Li Shimin opposed the plan, however, and it was not carried out. Meanwhile, Li Shimin sent his confidants to Luoyang to build up personal control of the army there.
The Poisoned Wine at Eastern Palace According to
Zizhi Tongjian, on the first day of the 6th lunar month of 626, three days before the Xuanwu Gate incident, Li Jiancheng hosted a banquet for Li Shimin and Li Yuanji at his residence, the Eastern Palace. Li Shimin was carried back home after a night of drinking. Li Shimin reported through officials at his residence that he started vomiting a lot of blood after returning home. Li Yuan sent a royal decree to Li Jiancheng: "The prince of Qin (Li Shimin) has a low alcohol tolerance, therefore, he is forbidden to go out drinking at night." Li Shimin apparently interpreted the wine as an assassination attempt, but Li Yuan did not mention poison in his decree to Li Jiancheng. Li Yuan considered sending Li Shimin to guard Luoyang to prevent further conflict, but Li Jiancheng and Li Yuanji opposed the plan because they believed that this would give Li Shimin an opportunity to build up his personal power. They expressed their concerns to Li Yuan's ministers, who explained to him that this plan could escalate a brotherly rivalry into a civil conflict. Li Yuan therefore did not carry out the plan. The date and the veracity of this event are both disputed. According to
Zizhi Tongjian, it happened 3 days before the Xuanwu Gate incident. In Li Jiancheng's biography from the
Old Book of Tang and the
New Book of Tang, it took place after the Yang Wen'gan incident but several months before the Xuanwu Gate incident. However, in
Fang Xuanling's biography from the Old Book of Tang, it happened before the founding of Tang, and wine was not mentioned. It remains a mystery whether or not someone attempted to poison Li Shimin at the Eastern Palace. == Death ==