# Ziwu Campaign

The Ziwu Campaign was a military counter offensive launched in 230 by the state of Cao Wei against his rival state Shu Han during the Three Kingdoms period of China. The campaign was initiated by Wei's Grand Marshal, Cao Zhen following the numerous Northern Expeditions and more recently the battle of Jianwei.

## Background

Following Zhuge Liang's return after the battle of Jianwei, Liu Shan issued an imperial decree to congratulate him on his recent success. He also restored Zhuge Liang to the position of Imperial Chancellor (丞相).
While in Wei, Cao Rui summoned Cao Zhen to the imperial capital Luoyang, where he promoted him to Grand Marshal (大司馬) for his successful defense of Wei territory against Shu Han's expeditions. During this meeting, Cao Zhen proposed that in response to Shu Han's attacks, Cao Wei should launch their own invasion. He also said that if the various generals proceeded along several routes simultaneously then there could be great chance of success. Chen Qun prevailed against such a plan on the basis, that when Cao Cao defeated Zhang Lu, the army already had difficulty transporting provisions. He further said that the terrain of Hanzhong makes it hard to advance and retreat, posing a great danger for the troops. Cao Rui discussed the matter with Cao Zhen. Cao Zhen planned to use a different route to Ziwu, but Chen Qun again spoke against this plan. Cao Rui brought Chen Qun's arguments to Cao Zhen, but he was adamant in his decision and the campaign began.

## The Campaign

In August 230, Cao Zhen led an army from Chang'an to attack Shu via the Ziwu Valley (子午谷). At the same time, another Wei army led by Sima Yi, acting on Cao Rui's order, advanced towards Shu from Jing Province by sailing along the Han River. The rendezvous point for Cao Zhen and Sima Yi's armies was at Nanzheng County (南鄭縣; in present-day Hanzhong, Shaanxi). Other Wei armies also prepared to attack Shu from the Xie Valley (斜谷) or Wuwei Commandery.
When he heard of Wei's movements, Zhuge Liang urged Li Yan to lead 20,000 troops to Hanzhong Commandery to defend against the Wei invasion. However, Li Yan did not want to leave his home base and serve under Zhuge Liang, so he refused at first until Zhuge Liang appeased him by allowing his son, Li Feng, to replace him if he did come. Li Yan finally went to Hanzhong Commandery under persuasion and pressure from Zhuge Liang.
Lieutenant-General (偏将军) Xiahou Ba asked to be named as the vanguard of this expedition. He then led a force towards Hanzhong Commandery taking a route through the 330 km Ziwu Trail (子午道), and camped in a crooked gorge, near the Xingshi camp set up earlier by Shu general, Wei Yan. There, Xiahou Ba was spotted by the local residents, who reported his presence to the Shu forces led by Li Yan. Xiahou came was under heavy attack. As the main army of Cao Zhen had not caught up with the vanguard, Xiahou Ba was put into a dire situation, and were only to withdraw when reinforcements arrived.
Away from the main operation, Wei Yan led some troops towards Yangxi (陽谿; southwest of present-day Wushan County, Gansu) to encourage the Qiang people to join Shu Han against Wei, Wei did the same and sent Guo Huai along with Fei Yao to counter the uprising. When both armies met on the field, Wei Yan managed to inflict a heavy defeat to the Wei forces which allowed him to raise more troops and prevented Zhang He from joining the expedition.
Following those events, the conflict became a prolonged stalemate with few skirmishes. After more than a month of slow progress, more and more officials sent memorials to end the campaign, fearing significant losses and waste of resources. Among them were Hua Xin, Yang Fu and Wang Su, son of Wang Lang. The situation wasn't helped by the difficult topography and constant heavy rainy weather lasting more than 30 days. After this, Cao Rui decided to abort the campaign and recalled the officers by October 230.

## Aftermath

Although the campaign failed, Cao Zhen's timely retreat allowed Wei to limit their losses. The leading commander of the Wei forces, Cao Zhen, himself fell sick on the journey back to Luoyang and became bedridden in the subsequent months. He eventually died of illness in April or May 231. Cao Rui honoured him with the posthumous title "Marquis Yuan" (元侯).
For his success against Guo Huai and Fei Yao. the Shu government promoted Wei Yan to Vanguard Military Adviser (前軍師) and Senior General Who Attacks the West (征西大將軍), and elevated him from a village marquis to a county marquis under the title "Marquis of Nanzheng" (南鄭侯). Li Yan was not permitted to go back to the east. Instead, he became a subordinate of Zhuge Liang to help him during his future expeditions.
Cao Zhen's son, Cao Shuang, would be the leading commander of a similar expedition in 244 which resulted in the battle of Xingshi.