Battle of Shanggui

Background
As in his first campaign, Zhuge Liang wanted to seize Longyou, the region of land around the upper Wei river, in an attempt to outflank Wei. Zhuge Liang's approach this time would take him over Mt. Qi (Qishan) through Yinping and Wudu. Mt. Qi is to the south of Tianshui and served as a natural defence against southern invasion.

To combat supply issues, Zhuge Liang also invented his famous "wooden oxen" (something akin to a wheelbarrow) to help facilitate the transportation of supplies. Zhuge Liang also assigned Li Yan to supervise the transport of supplies. Li Yan had been a long time colleague and friend to Liu Bei, so Zhuge Liang felt confident he could count on him.

At this time, Mt. Qi and Shanggui were garrisoned to create a defensive screen against the south. The battle-tested Inspector of Yong province Guo Huai and Colonel of the Northern Armies Dai Ling were also guarding Tianshui from the northwest. And the veteran General of Chariots and Cavalry Zhang He was stationed at Chang'an with his cavalry, ready to reinforce any area under attack.

The Battle
In April 231 A.D., Zhuge Liang led 30,000 Shu troops north again against Mt. Qi. Zhuge Liang keeps his main force in reserve but sends his vanguard, led by General Who Smashes Caitiffs Wang Ping, to surround Generals Wei Ping (魏平) and Jia Si (賈嗣) at Mt. Qi.

The Commander-in-Chief Cao Zhen suspected Shu's actions to be a feint, that Zhuge Liang wished to draw attention to Mt. Qi so he could strike at Chang'an by coming through the passes. However, Cao Zhen fell ill, so Sima Yi was sent to Chang'an to take command of the forces in the west. Sima Yi immediately relocates all forces in the west to Shanggui (area around Tianshui). Zhang He wanted to split the army and reinforce the garrisons at Yong and Mei. But Sima Yi didn't think they had sufficient forces to take such an action.

Sima Yi stationed Fei Yao and Dai Ling, along with 4,000 elite troops, at Shanggui; while with the rest of the his forces advanced to Mt Qi. to fend off the Shu invaders.

Zhuge Liang heard Sima Yi was marching the forces out from Chang'an and wanted to take the initiative. He left Wang Ping to check the generals at Mt. Qi and pushed deeper towards Tianshui. Zhuge Liang is able to outmanoeuvre Sima Yi's force and moved on Shanggui. Guo Huai heard news of Zhuge Liang's movements and he coordinated with General of the Rear Fei Yao, garrisoned at Shanggui, to attack him on his march.

Zhuge Liang met the combined Wei forces at Shanggui. The two sides fought in open combat and Zhuge Liang came out victorious. Zhuge Liang took the opportunity to reap the wheat fields at Shanggui.

Sima Yi hears about the defeat at Shanggui and, ignoring the Shu forces besieging Mt. Qi, heads back to Shanggui. Some of Sima Yi's subordinates feared Zhuge Liang would try reaping all the wheat around Shanggui. Sima Yi said that Zhuge Liang preferred caution to action and would first set up a camp before collecting the wheat. However, this proved untrue. In the two days it took Sima Yi to march to Shanggui, Zhuge Liang had already reaped most of the harvest. To combat the loss of supplies, Guo Huai asked the Qiang and Hu tribes for supplies. Guo Huai had long had dealings with the tribes and was respected by them, so they agreed to deliver supplies.

Sima Yi formed a defensive position in the defiles east of Shanggui and tried to bait Zhuge Liang into attacking him. However, Zhuge Liang retreated south past Mt. Qi in an attempt to draw Sima Yi from his defensive position. Sima Yi pursued Zhuge Liang but kept his distance. Zhuge Liang finally halted at Lucheng, he took an elevated position and began to prepare defences.

Zhang He felt attacking Zhuge Liang's strong position was unnecessary. He felt that the forces at Mt. Qi should easily be able to withstand their siege and Zhuge Liang would run out of supplies soon. However, several of Sima Yi's subordinate officers began to ridicule Sima Yi. They had a larger force yet still Sima Yi had refused to engage in combat, instead just following the enemy.

On 27th June, goaded by his own officers, Sima Yi ignored Zhang He and ordered his forces to attack. Zhang He is dispatched to relieve the siege at Mt. Qi and Sima Yi led the attack on Lucheng with his forces. Zhuge Liang let Wei Yan, Gao Xiang and Wu Ban meet the enemy. Sima Yi's forces were badly defeated and routed. The Shu forces collect 3000 sets of armour, 5000 blades, and 3100 crossbows. Sima Yi's forces fled back to Shanggui to regroup.

Zhang He is unable to successfully dislodge Wang Ping from his siege of Mt. Qi. Hearing of the defeat of Sima Yi, Zhang He withdraws his forces back to Shanggui to assist him.

So far, Zhuge Liang had had a successful campaign. Meanwhile back in Hanzhong, there had been severe rainfall. It was so bad that Li Yan feared he could not fulfill his duties and maintain the supply routes to Zhuge Liang. Li Yan dispatched Hu Zhong and Cheng Fan to inform Zhuge Liang that Emperor Liu Shan had stopped his supplies and asked that he retreat, Zhuge Liang complied.

Sima Yi had been repeatedly humiliated by Zhuge Liang over the course of his campaign and still hadn't scored even a slight victory. At seeing Zhuge Liang retreat, he ordered Zhang He to pursue and deal a blow to the Shu forces. Zhang He tried to reason with Sima Yi that pursuing the Shu forces was too dangerous, but Sima Yi would not heed his advice and again ordered Zhang He take his cavalry in pursuit. Left without a choice, Zhang He obeyed.

In the defiles at Mumen, Zhuge Liang hid a contingent of crossbowmen in ambush. As Zhang He's cavalry passed through the narrow defile, the crossbowmen rained arrows down from on high. Zhang He was killed and his cavalry obliterated.

Aftermath
Upon returning to Hanzhong, Zhuge Liang was met with a "confused" Li Yan. Li Yan was "confused" as to why Zhuge Liang retreated, and informed him that his supplies had been getting delivered as scheduled. Furthermore, in order to obfuscate the issue, Li Yan informed the emperor that Zhuge Liang retreating was part of a ploy to draw in the Wei forces. However, Zhuge Liang went to the emperor and showed him the missives sent by Li Yan ordering the retreat. Met with damning evidence, Li Yan confessed. Li Yan is stripped of rank and exiled to the Zitong prefecture.