Linxia Hui Autonomous Prefecture
Later that year, Li Yan (), a warlord who had occupied Longxi Commandery (隴西, roughly modern Dingxi, Gansu) and become a Former Qin vassal but who had also maintained contact with Former Liang, formally declared independence and cut off relations with Former Qin and Former Liang, occupying the commanderies around him. In early 367, Zhang Tianxi personally attacked Li and took a number of cities from him. Li became fearful and apologized to Former Qin, seeking assistance. The Former Qin prime minister Wang Meng led a force to try to relieve Li's capital Fuhan (枹罕, in modern Linxia Hui Autonomous Prefecture, Gansu), and Wang and Zhang's forces came to a stalemate at Fuhan. Wang proposed a compromise—that Zhang would be allowed to capture Li's people and bring them back to his domain, while Wang would be allowed to carry Li east. Zhang Tianxi accepted, and a major confrontation with Former Qin was averted.