modern Yangzhou), near Yang Prefecture. Subsequently, war again erupted between Bi and his ally Qin Yan the governor (觀察使, Guanchashi) of Xuanshe Circuit (宣歙, headquartered in modern Xuancheng, Anhui) (whom Bi offered the military governorship of Huainan to) and Yang Xingmi the prefect of Lu Prefecture (廬州, in modern Hefei, Anhui), who put Yang Prefecture under siege. Qin and Bi wanted Zhang's aid, as they were running low on food supplies, and they exchanged the wealths of the city for food supplies from Zhang. However, Zhang's army, after they received the wealths of the city, refused to engage in battle on Qin's and Bi's behalf. Thereafter, Yang Xingmi captured the city, and Qin and Bi fled. They initially tried to join Zhang, but Zhang refused to receive them, and they instead joined forces with Qin Zongheng (), the brother of Qin Zongquan, who had proclaimed himself emperor at Fengguo Circuit (奉國, headquartered in modern Zhumadian, Henan). (Qin Zongheng was subsequently assassinated by his lieutenant Sun Ru, who then executed Qin Yan and Bi, defeated Yang Xingmi, and took over Yang Prefecture.) Meanwhile, with Zhou having himself lost control of Zhenhai Circuit in a mutiny, many of Zhou's soldiers fled to Zhao. Zhao thus became arrogant, and he rebuilt Tai Castle (), a major defense mechanism for Jiankang, the ancient capital of the Southern Dynasties, as his residence, and began to live luxuriously. He also stopped communicating with Zhang. When Zhang left Dongtang and advanced west on the Yangtze, Zhao further tried to stop him. In anger, Zhang attacked Shangyuan and captured it. Zhao fled but was killed by his own subordinates. Zhang killed all of Zhao's soldiers who surrendered, and settled in at Shangyuan. Control of Shangyuan Meanwhile, Yang Xingmi had returned to Lu Prefecture and was plotting to attack Zhao Huang the governor of Xuanshe (whom Qin Yan had left in charge of Xuanshe when he left to contend for control of Huainan). Yang persuaded Zhang Xiong and Sun Duan () the prefect of He Prefecture (和州, in modern Chaohu, Anhui) to first attack Zhao, forcing Zhao to engage them. While Zhao was able to defeat Zhang and Sun, Yang then himself attacked Zhao and defeated him, eventually capturing his capital Xuan Prefecture () and taking over Xuanshe as its governor. In 890, then-reigning Emperor Zhaozong established a new Sheng Prefecture () at Shangyuan and made Zhang its prefect.