富县
Zhang Yi later joined Jiang Wei and Liao Hua at the heavily fortified mountain pass Jiange to resist the Wei army led by Zhong Hui. In the winter of 263, the Shu emperor Liu Shan surrendered when the Wei army led by Deng Ai showed up unexpectedly outside Chengdu after taking a detour across dangerous terrain. As a result of Liu Shan's surrender, the Shu state's existence came to an end and it became part of Wei. After learning of Liu Shan's surrender, Zhang Yi and the other Shu generals at Jiange formally surrendered to Zhong Hui at Fu County (涪縣; present-day Mianyang, Sichuan).