Battle of Anzhong

The Battle of Anzhong occurred in 198 AD when Cao Cao's forces fought against the combined armies of Zhang Xiu and Liu Biao at Anzhong shortly after Cao Cao's failure to capture Nanyang. Cao Cao defeated Liu Biao and Zhang Xiu's attempt to destroy his army as it retreated from Nanyang, but its rearguard was defeated after Jia Xu led an assault on the withdrawing army as it marched north to Xuchang to protect it from Yuan Shao. Anzhong was the last battle in the war between Cao Cao and Zhang Xiu, who peacefully surrendered to him a year later.

Background
In 198 AD, Zhang Xiu, with Liu Biao's backing, rebelled in Jing Province and defeated Cao Hong's armies several times. Cao Cao was given permission by Emperor Xian of Han to lead an expedition against the rebels, but he lost 50,000 men at the Siege of Nanyang and was forced to retreat. Zhang Xiu arranged for his ally Liu Biao to cut off Cao Cao's route of retreat at Anzhong; Cao Cao would have to face Liu Biao's army in the front and Zhang Xiu's army from the rear.

Battle
Cao Cao marched to Anzhong, where he ordered his men to set an ambush at a nearby pass. At dawn, Zhang Xiu and Liu Biao's armies met, and they noticed a small force of soldiers loyal to Cao Cao. Thinking that Cao Cao had retreated, they assaulted the small force, only for Cao Cao to ambush the combined armies and cut up the attackers. Zhang Xiu resolved to try again to defeat Cao Cao, but Cao Cao was forced to withdraw upon hearing of Yuan Shao's plans to attack Xuchang. Zhang Xiu ignored Jia Xu's advice against pursuing Cao Cao and instead followed Liu Biao's advice to give chase, but they met Cao Cao's rearguard, which fought so bravely and vigorously that the pursuers were defeated. Jia Xu then advised Zhang Xiu to attack again, promising victory and wagering his own life. Cao Cao's rearguard was thoroughly routed and abandoned its wagons and baggage in the hasty flight, but the arrival of reinforcements for Cao Cao led to Zhang Xiu retreating to Anzhong and rendezvousing with Liu Biao. Cao Cao returned to Xuchang in early September 198, having fought his last battle against Zhang Xiu.

Aftermath
While Zhang Xiu again bested Cao Cao in battle, he was unable to destroy his rival, and, a year later, Jia Xu advised Zhang Xiu to join Cao Cao during his war with Yuan Shao. Zhang Xiu was reluctant, but Jia Xu argued that, as Yuan Shao was more powerful and Cao Cao weaker, Cao Cao would value Zhang Xiu's assistance more than Yuan Shao, and that Cao Cao would be willing to put aside personal enmities. Sure enough, Zhang Xiu was rewarded with high ranks upon his surrender to Cao Cao.