Battle of Xingshi

The Battle of Xingshi was a failed invasion on the state of Shu Han by its rival Cao Wei in 244 during the Three Kingdoms period of Chinese history. The battle took place at Mount Xingshi, which is situated north of present-day Yang County, Shaanxi, and is now part of the Changqing National Nature Reserve.

Background
Despite facing strong opposition in the Wei court, Cao Shuang believed that the campaign was viable, especially when the Shu commander, Jiang Wan, withdrew his main force from Hanzhong to Fu County (涪縣) in October 243. Cao Shuang and his protégés concluded that with numerical superiority, their army could easily conquer Hanzhong before Shu reinforcements arrive. Even if they failed to completely eliminate Shu, the fall of Hanzhong was sufficient to increase Cao Shuang's fame and influence in the Wei court.

Geography
The three traditional passages from Hanzhong to Guanzhong were all valleys in the Qinling Mountains. Meridian Trail in the east is the longest, totalling more than 330 km, with its northern end located to the south of Chang'an. The southern half of the valley was called Zi Valley (子谷) and the northern half was called Wu Valley (午谷). The rugged local terrain provided numerous spots that were perfect for ambushes, and whoever sets up ambushes could easily completely annihilate the opposing side travelling in the valley, and thus this longest route was also the most dangerous. However, if Shu was on the offensive, it could easily threaten Chang'an by taking this route, and that was the exact suggestion Wei Yan proposed to Zhuge Liang before the first Northern Expedition. The 235 km long Baoxie Trail (褒斜道) located in the west had the best road condition among all three traditional passages, with the northern half called Xie Valley (斜谷) and the south half Bao Valley (褒谷). The southern end of the Baoxie Trail was located around 25 km north of Hanzhong, while its northern end was located 15 km to the south of present-day Mei County, Shaanxi. In the center of Baoxie Trail, another valley called Ji Valley (箕谷) branched out westward, and then turned northward, eventually ending near Chencang (陳倉), a strategic stronghold that would be threatened if Shu was on the offensive. If Wei was on the offensive and took the initiative by going out actively engaging the enemy, the good road condition would mean that Shu could deploy their defensive force quicker and stop the attack before Wei force could get out of the valley.

The 210 km long Tangluo Trail (儻駱道) in the center was the shortest among all three, and it got its name from the geographical locations at its ends. The southern end was located next to the Tangshui River (儻水河) in present-day Yang County, Shaanxi, and the northern end was located in the Luo Ravine (駱峪) to the west of present-day Zhouzhi County, Shaanxi. Hence, the southern half was called Tang Valley (儻谷) and the northern half was called Luo Valley (駱谷). Cao Shuang had committed a grave strategic blunder when he selected this central route to attack Shu because despite being the shortest, the road condition was the poorest among all three routes. More importantly, among the three traditional passages, Tangluo Trail had the longest section without any water source. As a result, the logistic problem crippled the invasion force, with many if not most of the packing animals of the Wei force died of thirst before even get out of the valley. Cao Shuang was forced to mobilize tens of thousands of draftees as coolies to carry supplies, and many of them met the same fate of the packing animals. Consequently, morale plummeted and resentment of Cao Shuang's rule not only drastically increased among the troops he commanded, but also back home in Wei.

The battle
In March 244, Cao Shuang promoted Xiahou Xuan to General Who Subdues the West, and the Inspector of Yong Province, Guo Huai, was appointed as the vanguard force commander. Together, they began the march toward Hanzhong via Tangluo Trail. Cao Shuang's protégés Deng Yang and Li Sheng participated in the invasion as his staff. The primary target of the Wei invasion force was Yangping Pass (陽平關; located west of present-day Wuhou Town (武侯鎮), Mian County, Shaanxi).

Shu's Senior General Who Guards the North, Wang Ping, was in charge of defending Hanzhong, but his force totaled less than 30,000. Facing absolute numerical inferiority, some Shu commanders suggested to concentrate on defending Hancheng (漢城; east of present-day Mian County, Shaanxi) and Yuecheng (樂城; east of present-day Chenggu County, Shaanxi). Wang Ping rejected the idea because the reinforcements was too far away and it would take time to arrive, and it would cause disaster for Shu if the enemy was allowed to passed through Yangping Pass unopposed. Therefore, the enemy could only be stopped by taking geographical advantage of local rugged terrain. General Who Protects the Army, Liu Min (劉敏), was ordered to take up position in Mount Xingshi (興勢山) and plant an array of flags over a hundred miles to create an illusion that the Shu defense force was larger than it actually was. Wang Ping would personally lead an army behind to prevent possible separate assaults by Wei forces from Huangjin Valley (黃金谷; located east of Mount Xingshi). As Wang Ping had correctly predicted, by April 244, the enemy advance was successfully checked at Mount Xingshi and the enemy's supplies were depleting as their supply lines were over extended and nearly all their transport animals were dead. Shu's General-in-Chief, Fei Yi, was on his way to Hanzhong with reinforcements from Chengdu. The counteroffensive of Shu Han was about to be launched against the overstretched Wei invasion army.

Cao Shuang's staff officer Yang Wei (楊偉) realized the danger and begged Cao to abandon the campaign and retreat immediately, but Deng Yang objected and argued with Yang despite his lack of any military knowledge. Yang Wei could not convince either and furiously claimed that Deng Yang and Li Sheng were disregarding the lives of hundreds of thousands, as well as the fate of their state, and they should be executed. Cao Shuang was unhappy with such suggestions and rejected both of them. Grand Tutor Sima Yi, who opposed the campaign from the very beginning, could no longer ignore the dangerous situation and wrote to Xiahou Xuan to inform him about the impending disaster, and warned him that he was personally aware that years ago, Cao Cao almost suffered a total defeat in the struggle against Liu Bei for Hanzhong. The Shu army was in firm control of Mount Xingshi, which prevented Wei forces from continuing pushing forward, and if another Shu force cut off the Wei retreat route, Cao Shuang and Xiahou Xuan would not even be able to live to regret their decisions. Xiahou Xuan finally realized the dangerous situation they were in after reading Sima Yi's letter, and finally managed to convince Cao Shuang to give the order to retreat, albeit the latter did so reluctantly. Guo Huai, also had realized their situation, withdrew his troops to avoid the presumable rout.

Fei Yi, however, would not let Cao Shuang retreat easily, and led his army to flank the Wei troops and block their retreat. Shu forces set up defensive positions in the places where they enjoyed absolute geographical advantage over the Wei army: the three ridges in the Luo Valley: Shen Ridge (沈嶺), Ya Ridge (衙嶺), and Fenshui Ridge (分水嶺). Cao Shuang and his officers were barely able to escape back to Guanzhong after their forces suffered a devastating casualties resulting from thirst, hunger and illness in the process.

Aftermath
For his victory, Fei Yi was awarded the title of "Marquis of Chengxiang" (成鄉侯), and stayed in Hanzhong until his return to the capital Chengdu in September 244. In contrast, the prestige and popularity of Cao Shuang dropped sharply, which helped to lead his eventual downfall in the power struggle against Sima Yi.

Analysis
The Battle of Xingshi was one of the most important yet most understated battles of the Three Kingdoms period. The lack of participation of the principal figures of the time such as Zhuge Liang and Jiang Wei caused many writers to put much less emphasis or even ignore the battle in their works in comparison to other battles occurred in that era. In reality, the battle had profound impact in the history in that it postponed the unification of China for decades due to the heavy loss Wei had suffered: because soldiers drafted from the peasantry, the heavy loss meant that no labors were available to tend the farmland. In order to tend farmlands and help the widows and orphans resulted from the defeated campaign, at least 100,000 soldiers from the tuntian army was reassigned back to their agricultural roles. These troops never returned to the active service again as they were needed to remain as farmers and as a consequence, the size of Wei's army decreased by a quarter, dropping from 800,000 at its peak to 600,000, a number that was not exceeded until the time of the War of the Eight Princes during the Jin Dynasty, over half a century later.

The drastic loss of troops also caused to another important severe consequence: Wei was no longer able to suppress the rebellions of minorities in the north like it used to (though the impact was not devastating in that era yet, it would be felt in the Jin Dynasty). From that point on, the smaller rebellions of minorities in the north cumulated into a formidable force that would eventually overthrow Chinese rule in northern China seven decades later during the Jin Dynasty. Despite being relatively unnoticed in literature, later militarists gave high credit to the battle: For example, Ming Dynasty military strategist Liu Ji, in his work titled The Unexpected Strategies of a Hundred Battles (百戰奇略), classified this battle as the classical example of a "retreating war" (退戰). This meant that if the enemy held an absolute geographical advantage and you were already having trouble to carry on the fight, a rapid retreat was the only viable option.

Order of battle
Wei forces
 * General-in-Chief (大將軍) Cao Shuang, commander-in-chief
 * General Who Subdues the West (征西將軍) Xiahou Xuan, deputy commander-in-chief
 * Inspector of Yong Province (雍州刺史) Guo Huai, commander of the vanguard

Shu forces
 * General-in-Chief (大將軍) Fei Yi, commander-in-chief
 * Senior General Who Guards the North (鎮北大將軍) Wang Ping
 * General Who Protects the Army (護軍將軍) Liu Min (劉敏)