In 257, when the Wei general Zhuge Dan started a rebellion in Shouchun (壽春; around present-day Shou County, Anhui), the Wei government mobilised troops from the Guanzhong region to suppress the revolt. Jiang Wei wanted to take advantage of the situation to stage another invasion of Wei so he led Shu forces through Luo Valley (駱谷) and Shen Ridge (沈嶺), both located south of present-day Zhouzhi County, Shaanxi, to attack the Wei garrisons near the Great Wall. Around the time, the Wei garrisons had much supplies stored there but were weakly defended. The Wei defenders started panicking when they heard of the Shu army's approach.