Emperor Ming, however, made the crucial mistake of appearing not to accepting the pledge of allegiance of Xue Andu (薛安都), the governor of Xu Province (徐州, modern northern Jiangsu and northern Anhui), instead sending Shen and Zhang Yong (張永) north with troops, which frightened Xue and led him to surrender to Northern Wei. When Shen and Zhang subsequently arrived at Xue's headquarters at Pengcheng (彭城, in modern Xuzhou, Jiangsu), their siege of the city failed, forcing them to withdraw in early 467. They were pursued and then defeated by Xue and the Northern Wei general Yuchi Yuan (尉遲元), suffering extreme losses. In fall 467, against Shen's advice, Emperor Ming ordered Shen to again attack Pengcheng, and he was again defeated by Yuchi's forces. He suffered major injuries in the battle, but was able to escape.