Wei Yan

Wei Yan (died 234), style name Wenchang, was a military general of the state of Shu Han during the Three Kingdoms period. Originally a foot soldier under the warlord Liu Bei (the founding emperor of Shu), Wei Yan rose through the ranks and became a general when Liu Bei invaded Yi Province (益州; covering present-day Sichuan and Chongqing) in 211. His talent and performance during battles helped him to become a prominent figure in the Shu military in a short period of time. He was later appointed as the Administrator of Hanzhong commandery and as an Area Commander in 219. Between 228 and 234, he participated actively in the Northern Expeditions led by the Shu chancellor Zhuge Liang against Shu's rival state, Cao Wei. After Zhuge Liang's death in 234, Wei Yan was killed by another Shu general, Ma Dai, for alleged treason.

Early and mid-career
Wei Yan was a native of Yiyang commandery (義陽; around present-day Tongbai County, Nanyang, Henan) in Jing Province. As one of Liu Bei's personal retainers, he followed Liu Bei into Yi Province (covering present-day Sichuan and Chongqing) in 212 to attack the warlord Liu Zhang. He had many military accomplishments and was assigned as a "General of the Standard" (牙門將軍). When Liu Bei became "King of Hanzhong" in 219 after his victory over his rival Cao Cao in the Hanzhong Campaign, he selected Wei Yan as the general who would guard Hanzhong and then honoured him with the title "General Who Suppresses the North" (鎮北將軍). This was despite Zhang Fei being considered by the majority and himself to be the likely candidate for the position, which assumed the imminent military responsibility to resist invasion from Cao Cao. When Wei Yan was nominated by Liu Bei, the court was shocked. Liu Bei then asked Wei Yan in front of the mass how would he serve his new post, wherein Wei confidently replied: "If Cao Cao mustered all his forces and invaded, let me assist my lord to repel the enemies; if an Assistant-General came with 100,000 troops, let me engulf them for my lord." During his tenure, Wei Yan borrowed the concept of "double gates" from the ancient text Zhou Yi (周易) and laid numerous camps along the outskirt and trail exits linking to Hanzhong. His defence mechanism was very effective in driving the enemy out, and his arrangement would be adopted by those who later succeeded his post.

In 221, Liu Bei founded the state of Shu Han and became its first emperor. He died in 223 and was succeeded by his son Liu Shan. In that year, Wei Yan was enfeoffed by Liu Shan as a "Marquis of a Chief Village" (都亭侯). About four years later, Shu's chancellor Zhuge Liang launched the first of a series of campaigns to attack Shu's rival state Cao Wei, and Wei Yan was called into battle. Wei Yan supervised the front division, and he held the appointments of Major under the Chancellor (丞相司馬) and Inspector of Liang Province (涼州刺史). Wei Yan treated his soldiers well and was known for his bravery. However, he was also boastful of his talents and his peers tended to avoid him. The minister Yang Yi, who was a close aide of Zhuge Liang, made no concession to Wei Yan, and Wei was extremely resentful of him.

Northern Expeditions


Wei Yan participated in most, if not all, of the Northern Expeditions against the state of Cao Wei. However, he was disappointed with his superior Zhuge Liang because the latter employed Ma Su as the vanguard for the first campaign, which ended up in a total disaster after the Shu defeat at the Battle of Jieting. During the second campaign, Wei Yan suggested to Zhuge Liang to take an alternative route to attack Chang'an, a strategic city in Wei, but Zhuge rejected his plan. Zhuge Liang then led the Shu army to besiege Chencang, where they could only lament upon the staunch defence of the 1,000 defenders commanded by the Wei general Hao Zhao.

In late 230, when the Cao Wei regime launched a counteroffensive with a sizeable army, Zhuge Liang sent Wei Yan and Wu Ban as military attachés to join forces with the Qiang tribes in the northwest to harass the Wei army's rear. Wei Yan swiftly led a mixed cavalry-infantry force to his destination, and he sold the famous Chengdu silk brocades to the Qiang people in return for their military support, as well as for horses and weapons. From the very beginning, the Cao Wei attack encountered problems: heavy rains continued for more than 30 days, which rendered that the narrow valleys impassable, while the Wei general Zhang He was threatened in the west by Wei Yan's pincer movement towards his rear. After one and a half months of little progress, the ill-fated campaign was terminated. However, the Wei generals Fei Yao and Guo Huai wanted to earn some merits before their retreat, so they attacked Wei Yan at Yangxi (陽谿), but Wei Yan inflicted a crushing defeat on the enemy. Thus, the Shu force behind the enemy lines was able to make a prudence dictated return to Hanzhong. Wei Yan was then promoted to "Front Military Advisor Senior General Who Attacks the West" (前軍師征西大將軍), and he also received the title of "Marquis of Nanzheng" (南鄭侯).

During the fourth Northern Expedition, Zhuge Liang sent Wei Yan, Wu Ban and Gao Xiang to counter the Wei commander Sima Yi, who was leading a frontal assault from the central main road. They resisted Sima Yi's forces outside the fortress and scored a major victory over the enemy, killing 3,000 Wei armoured soldiers and seizing 5,000 sets of armour and 3,100 crossbows.

Ziwu Valley Plan
Each time Wei Yan followed Zhuge Liang to battle, he would request to command a separate detachment of about 10,000 men and take a different route and rendezvous with Zhuge's main force at Tong Pass (present-day Tongguan County, Shaanxi), based on an earlier strategy used by Han Xin during the Chu–Han Contention in the 200s BCE. Zhuge Liang rejected the plan, and Wei Yan felt that Zhuge was a coward and complained that his talent was not put to good use.

When Chen Shou compiled the unofficial works on the history of Shu to write the Sanguozhi, he only mentioned that Wei Yan suggested to Zhuge Liang to split the Shu army into two, and the two forces would take two different routes and rendezvous at Tong Pass.

Wei Yan's reasoning for his Ziwu Valley Plan was recorded in the historical text Weilue, which was then added as annotations to his biography in the Sanguozhi. It stated: Wei Yan received intelligence that the defender of the strategic city Chang'an, Xiahou Mao, was cowardly and incompetent. Thus, he reasoned, it would be easy for him to take 5,000 troops (and another 5,000 to carry supplies) across the Qin Mountains via the Ziwu Valley (子午谷) and into Chang'an. Wei Yan estimated that he would reach Chang'an in ten days and scare Xiahou Mao into flight, leaving the grain in Chang'an's storehouses for Shu's taking. There, Wei Yan's force can wait for Zhuge Liang's main army to take the safer road out of Xie Valley (斜谷) and rendezvous in Chang'an. In this way, the region west of Xianyang could be conquered in one movement.

When the Cao Wei court received intelligence about Wei Yan's Ziwu Valley Plan, the emperor Cao Rui immediately removed Xiahou Mao from his military command in Chang'an and reassigned him to be an Imperial Secretary (尚書) in the capital.

Analysis
The reason as to why Zhuge Liang rejected Wei Yan's plan remained dubious due to the absence of details in historical records. However, it is generally believed that Zhuge Liang considered Wei Yan's plan to be dangerous and he preferred to travel along the flat roads so that Longyou (隴右) could be taken easily. He was certain that his plan would work out without any worry, so he did not accept Wei Yan's plan.

The viability of Wei Yan's Ziwu Valley Plan (before Xiahou Mao's reassignment) became a subject of debate among historians over the centuries. However, there is no doubt that Zhuge Liang had forfeited a chance to execute Wei Yan's plan, regardless of whether it would have turned out to be successful or not. When Zhuge Liang's own strategy during the second Northern Expedition failed, Wei Yan sighed that his talent was not employed to its full potential.

Death
In 234, Zhuge Liang set out on his last northern expedition against Cao Wei, with Wei Yan leading the vanguard force. During the standoff in the Battle of Wuzhang Plains, Zhuge Liang fell sick and issued secret orders to Yang Yi, Fei Yi and Jiang Wei for the Shu armies to retreat after his death. Wei Yan was to guard the rear with Jiang Wei after him. If Wei Yan refused to accept the order, they were to retreat without him. When Zhuge Liang died, news of his death were kept secret. Yang Yi sent Fei Yi to meet Wei Yan and test the latter's intentions.

Wei Yan said, "Although the Chancellor (Zhuge Liang) had died, I'm still around. The officials serving in the Chancellor's Office may bring his body back (to Chengdu) for burial, but I should remain behind to lead the armies to attack the enemy. Must we neglect the affairs of the State just because of the death of one man? Besides, who am I, Wei Yan, to follow the command of Yang Yi and become the general of the rearguard?"

Wei Yan and Fei Yi then took command of the troops left behind, and Fei wrote a letter to be signed by both of them which would be read out to all the commanders. Fei Yi offered to go on Wei Yan's behalf and explain the situation to the Chief Clerk Yang Yi, saying that Yang was a civil official and was not experienced in military affairs, making it certain that Yang would not disobey him. Wei Yan then let Fei Yi go, but he immediately regretted his decision and he went after Fei, but could not catch up with the latter in time. He then sent his subordinate to meet Yang Yi and the others, but was shocked to discover that the various encampments were preparing to retreat, in accordance with Zhuge Liang's final orders. Wei Yan wanted to continue the campaign against Cao Wei even though Zhuge Liang had died, so he was furious when he heard of the retreat. He intended to block the Shu forces from retreating, so he led his force towards the south, ahead of the main army commanded by Yang Yi, and then sealed the return route by destroying the gallery roads leading back to Shu.

Wei Yan and Yang Yi separately wrote memorials to the Shu imperial court, accusing each other of treason. Their memorials arrived in the Shu capital Chengdu on the same day, and the emperor Liu Shan asked the ministers Dong Yun and Jiang Wan for their opinions. Both of them sided with Yang Yi and felt that Wei Yan's actions were suspicious. In the meantime, Yang Yi ordered his men to cut down trees to rebuild the gallery roads, and his troops marched day and night in order to catch up with Wei Yan. Wei Yan arrived at the southern valley first, and he ordered his soldiers to attack Yang Yi, while Yang sent Wang Ping to resist Wei Yan. Wang Ping shouted at Wei Yan, "His lordship (Zhuge Liang) had just died and his body had yet to turn cold, and now you dare to do something like this?" Wei Yan's men knew that their commander was in the wrong so they deserted.

Wei Yan was left with only his sons and a few followers, and they fled towards Hanzhong. Yang Yi ordered Ma Dai to give chase. Ma Dai caught up with Wei Yan, decapitated him, brought his head back, and threw it in front of Yang Yi. Yang Yi trampled on Wei Yan's head and said, "You inferior slave! Now, can you still commit evil?" Wei Yan's family members and close relatives were executed as well. Prior to Wei Yan's death, Jiang Wan had led divisions of the imperial guards from Chengdu to deal with the conflict. They had travelled for about 10 li (about a quarter of a mile) when they received news of Wei Yan's death, so they returned to Chengdu.

Analysis
Chen Shou, who wrote Wei Yan's biography in the Sanguozhi, analysed Wei Yan's death as such:

"Wei Yan's initial intention was not to head north to surrender to Cao Wei, but rather, he wanted to retreat back to the south. He desired to kill Yang Yi and the others in disagreement with him. Although the commanders usually had differing opinions, he strongly believed that they would generally agree to him becoming Zhuge Liang's successor. That was his true intention and he was not thinking of rebelling."

A similar, but somewhat different and more detailed account exists in the historical text Weilue, which states:

"When Zhuge Liang was ill, he told Wei Yan and the others, 'After I die, all of you should take caution in defence, but do not return here.' Wei Yan was then ordered to take Zhuge Liang's command and to not reveal news about Zhuge's death, and he did as he was instructed. When the Shu forces reached Baokou (襃口), Zhuge Liang's death was announced and a funeral was held. Zhuge Liang's Chief Clerk (長史) Yang Yi was on bad terms with Wei Yan all this while, and he feared that he would be harmed when he heard that Wei Yan had taken charge of military affairs. He spread rumours that Wei Yan was planning to surrender to Cao Wei, and then led the soldiers to attack Wei Yan. Wei Yan had no intention of defecting to Cao Wei, so he did not put up resistance and retreated instead, but Yang Yi and his men caught up with him and killed him."

Pei Songzhi, who added the Weilue account to Wei Yan's biography and annotated the Sanguozhi, commented on the Weilue account as follows:

"I feel that this account was derived from hearsay in the enemy state (referring to Cao Wei), and may not be as reliable when compared to the original account (by Chen Shou)."

Wei Yan's death was explained in political terms in Injustice to Wei Yan (魏延的千古奇冤), a neoteric article by Zhu Ziyan, a history professor from Shanghai University. In the article, Zhu wrote that Zhuge Liang personally appointed Jiang Wan, Fei Yi and Jiang Wei to be his successors, but Wei Yan's appointments and contributions were greater than those of any of them at that time. Zhuge Liang ostracised Wei Yan and cracked down on him because he wanted to eliminate Wei Yan as a possible obstacle to his appointed successors.

In fiction
Wei Yan appears as a character in the historical novel Romance of the Three Kingdoms by Luo Guanzhong, which romanticises the historical events leading to, and during the Three Kingdoms period.

See the following for some fictitious stories in Romance of the Three Kingdoms involving Wei Yan:
 * Battle of Changsha (fictional)
 * Zhuge Liang's Northern Expeditions

Modern references
Wei Yan is featured as a playable character in Koei's Dynasty Warriors and Warriors Orochi video game series. He also appears in Koei's Dynasty Tactics 2.