Battle of Jieting

Cao Zhen led his army to oppose Zhao Yun while the three Wei-controlled commanderies – Nan'an (南安; around present-day Longxi County, Gansu), Tianshui and Anding (安定; around present-day Zhenyuan County, Gansu) – responded to the Shu invasion by defecting to the Shu side.

Cao Rui, the emperor of Wei, personally moved to Chang'an and assembled a secondary force under Zhang He to attack Zhuge Liang.

Zhuge Liang chose generals Ma Su as the vanguard commander along with Wang Ping to intercept Zhang He, rather than the suggested veterans officers Wei Yan or Wu Yi.

Relying purely on books of military tactics, Ma Su chose to "take the high ground" and set up his base on the mountains instead of in a city as instructed by Zhuge Liang.

[7][8] Due to this tactical mistake, the Wei army led by Zhang He encircled the hill, cut off the water supply to the Shu troops and defeated them.

[11] When Zhuge Liang arrived, he attempted to defeat Zhang He; however, he did not find a way to win and so the Shu army had to retreat to Hanzhong.

(Wang Ping was able to rally Ma Su's remaining troops and gather the Shu army's scattered supplies.)

[15] According to the Jin Shu, Chen Shou's father[b] was implicated and sentenced to kun (髡), a punishment involving the shaving of a person's head.

Wang Ping, on the other hand, was promoted to General Who Attacks Bandits (討寇將軍) for his efforts in minimizing casualties and for trying to prevent Ma Su's actions.

[18] Before his execution, Ma Su wrote a letter to Zhuge Liang: "You wise lord regarded me like a son and myself looked upon you as a father.

A Chinese proverb, "wiping away tears and executing Ma Su" (挥泪斩马谡; 揮淚斬馬謖; Huī Lèi Zhán Mǎ Sù), refers specifically to this incident, meaning "punishing a person for his wrongdoings regardless of relations or his abilities.

Moss Roberts comments on this in his fourth volume of his English translation of Romance of the Three Kingdoms on (page 2179 under Chapter 95 Notes, fourth and last paragraph of the chapter notes): The historical Sima Yi was not at the western front for the "vacant city ruse" but at the more important southern front with the Southland [Wu].

The anecdote is translated as follows: "Zhuge Liang garrisoned at Yangping (陽平; around present-day Hanzhong, Shaanxi) and ordered Wei Yan to lead the troops east.

Also worthy of note is that Zhuge Liang wrote this passage in his sixth chapter, titled "Desperate Stratagems", (敗戰計/败战计, Bài zhàn jì), further supporting the implication that he had experience in using this tactic, and his description does match the situation described by Guo Chong.

Zhuge Liang's first and second northern expeditions against Cao Wei