War with Luo Shang
At the advice of Yan Shi, Li Te readied himself for war. Xin Ran and Li Bi (李苾) also decided to take matters into their own hands. Without Luo Shang knowing, they sent Ceng Yuan (曾元) and others to carry out a surprise attack on Li Te's camp. When Luo Shang found out, he immediately supported Xin Ran and sent Tian Zuo (田佐) to reinforce Ceng Yuan. Li Te kept his composure during the attack. He allowed half of the enemies to enter his camp before ambushing them with no escape. Li Te killed Ceng Yuan and the other generals, sending their heads to Luo Shang and Xin Ran as a warning.
The refugees acclaimed Li Te as General Who Guards The North after the war broke out. Li Te appointed his brothers with offices before assaulting Xin Ran at Guanghan County. Luo Shang had sent reinforcements to help Xin Ran, but they were too afraid to engage Li Te in battle. Xin Ran was defeated multiple times before retreating to Deyang County, allowing Li Te to occupy Guanghan. Li Te proceeded to give out more appointments to his family members and members of the powerful refugee families. Meanwhile, Luo Shang was at a disadvantage as the people of Yizhou all favored Li Te over him at the time, so to compensate, he strengthen his defenses and fought Li Te to a stalemate while calling for reinforcements.
In 302, the Prince of Hejian, Sima Yong sent Ya Bo (衙博) to Zitong to assist Luo Shang in putting down Li Te. Luo Shang ordered his Protector, Zhang Gui (張龜) to march to Fancheng, so Li Te went to face Zhang while his son Li Dang fought with Ya Bo. Li Te routed Zhang Gui and received the surrender of Zitong and Baxi. Li Dang drove out Ya Bo and received his soldiers' surrender. With his latest victory, Li Te proclaimed himself Grand General, Governor of Yizhou, and Chief Controller of Liangzhou and Yizhou.
In autumn, Li Te attacked Zhang Wei (張微) but was repelled and had his own camp besieged instead. Li Dang came to his father's rescue and turned away Zhang Wei. Li Te wanted to retreat but through his son's advice, decided to attack again. This time, he managed to kill Zhang Wei. He also fought with the Inspector of Liangzhou, Xu Xiong (許雄) numerous times, winning in every bout between the two. Li Te's territories and influence only grew, which distressed both Luo Shang and the Jin court.
Li Te finally reached Chengdu through the rivers in January 303, catching Luo Shang's troops by surprise. He occupied the lesser city of Chengdu and captured the horses but did not carry out any further plunder. Instead, he granted an amnesty and declared a new reign era. With the situation dying down, Luo Shang, who was in the Greater City of Chengdu, decided to negotiate peace with Li Te, which Te agreed. Li Liu and Shangguan Dun (上官惇) were doubtful of the peace talks, telling Li Te in a letter, "Accepting a surrender is like receiving an enemy." At the start of the war, many in the Shu region moved into fortifications to defend themselves. Although Li Te treated them kindly, Li Liu pointed out to his brother that people living in these fortifications may not be loyal as they seem, and urged him to force them into sending hostages. Li Te simply ignored these warnings and scolded them.