the governor of Jiang Province, and Liu Jilian (劉季連) the governor of Yi Province (modern Sichuan and Chongqing), who was similarly apprehensive. By winter 502, however, Chen had been defeated by Emperor Wu's general Wang Mao (王茂) and was forced to flee to Northern Wei. In spring 503, Liu surrendered to Emperor Wu's general Deng Yuanqi (鄧元起), and the realm was pacified. However, in fall 503, Emperor Xuanwu of Northern Wei, with a mind of having Xiao Baoyin reestablish Southern Qi as a puppet state, commissioned Xiao Baoyin and Chen with armies, and further sent his father Emperor Xiaowen's cousin Yuan Cheng (元澄) the Prince of Rencheng to lead a force to attack Liang, starting a war that lasted several years. Both sides had victories. However, Liang lost the important border city Yiyang (義陽, in modern Xinyang, Henan) in fall 504, and in spring 505, the general Xiahou Daoqian (夏侯道遷) rebelled and surrendered another important border city, Nanzheng (南鄭, in modern Hanzhong, Shaanxi) to Northern Wei. (It was in the aftermaths of Xiahou's rebellion that the first serious instance of Emperor Wu's refusal to punish a family member happened, as his nephew Xiao Yuanzao (蕭淵藻) the Marquess of Xichang, angry that when he rendezvoused with Deng Yuanqi that Deng took the best horses, assassinated Deng and falsely accused Deng of treason. While Emperor Wu discovered that Xiao Yuanzao's accusations were false and posthumously honored Deng, he took no punishment against Xiao Yuanzao other than demoting his rank.) In 505, Emperor Wu launched a major counterattack, commanded by Xiao Hong, with Liang's best troops. However, the apprehensive Xiao Hong stopped his army at Luokou (洛口, in modern Bengbu, Anhui) and refused to advance, despite his generals' urging. Meanwhile, in spring 506, the general Wei Rui (韋叡) was able to capture Hefei (合肥, in modern Hefei, Anhui), taken by Northern Wei when Pei Shuye surrendered Shouyang to Northern Wei. In fall 506, Xiao Hong's army, stationed at Luokou for nearly a year without advancing, had an attack of night terror, and Xiao Hong, in fear, fled, causing his army to collapse without a battle. When Northern Wei forces next attacked the fortress of Zhongli (鍾離, in modern Bengbu as well), however, they were defeated by a Liang army commanded by Wei and Cao Jingzong (曹景宗) in spring 507, allowing Liang to keep Zhongli and effectively ending the war. After the battle of