(昭義, headquartered in modern Changzhi, Shanxi), then also under Li Keyong's control, from the southeast; Li Kuangwei and Helian Duo the military governor of Datong Circuit (大同, headquartered in modern Datong, Shanxi) attacking from the northeast; and the main imperial army, under Zhang's command and supplemented by the armies of various circuits around Chang'an, attacking from the southwest. Zhu's army was able to seize Zhaoyi quickly, due to the assassination of Zhaoyi's military governor Li Kegong (李克恭, Li Keyong's brother) by his officer An Jushou (), but the imperial official sent to take over Zhaoyi, Sun Kui (), was intercepted and captured by Li Keyong's adoptive son Li Cunxiao (and subsequently executed when he would not submit to Li Keyong), badly affecting the imperial army's morale. Li Cunxiao subsequently put Zhaoyi's capital Lu Prefecture () under siege, forcing Zhu's army to withdraw. Li Kuangwei and Helian's armies were also repelled by Li Keyong's adoptive sons Li Cunxin and Li Siyuan, leaving Zhang's imperial army to face Li Keyong himself. By late 890, the imperial army was suffering repeated defeats at the hands of Li Keyong's Hedong army, and the supplemental troops from Jingnan (靜難, headquartered in modern Xianyang, Shaanxi) and Fengxiang (鳳翔, headquartered in modern Baoji, Shaanxi) Circuits abandoned the imperial army and withdrew by themselves, eventually leading to a total collapse of the imperial army, with Zhang and his deputy, Han Jian the military governor of Zhenguo Circuit (鎮國, headquartered in modern Weinan, Shaanxi) escaping with just a small contingent; the rest of the imperial army was effectively lost. With Li Keyong subsequently threatening an invasion, Emperor Zhaozong was forced to restore Li Keyong to his titles and positions and exile Zhang and Kong, ending the campaign against Li Keyong in disaster. With the defeat against Li Keyong, and the campaign against Chen in a stalemate—the imperial army had put Xichuan's capital Chengdu under siege and caused a terrible famine within the city, but had not been able to capture it—the imperial treasury was being drained, and Emperor Zhaozong decided to end the Xichuan campaign as well. He pardoned Chen and recalled Wei, while ordering Gu and Wang (for whom he had created a Yongping Circuit () out of parts of Xichuan territory) back to their circuits. Wang was unwilling to accept this result, however, and he intimidated Wei into returning to Chang'an by himself, while Wang continued the