Battle of Xiaopei (197)

The Battle of Xiaopei occurred in 197 AD when Yuan Shu's army, commanded by Ji Ling, invaded Liu Bei's home of Xu Province in retaliation for Liu Bei's unprovoked attack on Yuan Shu at the Battle of Xuyi.

Background
In 196 AD, Prime Minister Cao Cao sent a forged imperial edict to his rival, Xu Province governor Liu Bei, asking him to pacify Yuan Shu's lands south of the Huai River, planning on having Liu Bei and Yuan Shu destroy each other's forces. Cao Cao was compelled to do so after Liu Bei refused his request to have the unstable Lu Bu executed. Liu Bei fought Yuan Shu's army at the Battle of Xuyi before stalemate set in, and Liu Bei was forced to return to Xu Province after Lu Bu - angered by Zhang Fei's abuse of his father-in-law Cao Bao - revolted and took Xuzhou for himself. When Liu Bei returned, he made Lu Bu Governor of Xu Province, as he had intended for him to take over the province from him for years. However, Yuan Shu still thirsted for revenge against Liu Bei, and his strategist Yang Dajiang advised him to enlist Lu Bu's help in launching another revolt against Liu Bei. Yuan Shu had Han Yin bring Lu Bu 200,000 carts of millet as a gift, and he then sent Ji Ling with 100,000 troops to take Xiaopei in Xu Province. The strategist Sun Qian advised Liu Bei to ask Lu Bu for assistance, and Lu Bu decided that Liu Bei would be a better ally than Yuan Shu.

Shooting the Halberd
Ji Ling's army razed much of Xu Province as it marched on Xiaopei, and Liu Bei's small army of 5,000 troops left Xiaopei to confront Yuan Shu's forces. Lu Bu decided to win the favor of both Liu Bei and Yuan Shu by inviting both Liu Bei and Ji Ling to a banquet, and the sides agreed to a wager: if Lu Bu could shoot his halberd with an arrow from 150 paces away, both armies would withdraw, and, if he failed, the armies could do battle. Both sides reluctantly agreed, and Lu Bu successfully shot his halberd. Ji Ling agreed to withdraw, taking a letter from Lu Bu with him confirming the arrangement.

Marriage scheme
Yuan Shu was livid upon hearing of Lu Bu's betrayal, but Ji Ling advised him to marry off his son Yuan Yin to Lu Bu's daughter Lu Lingqi in order to create an alliance between them. Han Yin approached Lu with gifts and the proposition, and Lu Bu agreed to the marriage and an alliance. Lu Bu sent out his daughter with Han Yin and his own generals Song Xian and Wei Xu, and they played loud celebration music. Chen Gui heard this and realized that Yuan Shu wished to form a marriage alliance with Lu Bu, and, as he was loyal to Liu Bei, Chen Gui visited Lu Bu and told him that Yuan Shu intended to make himself Emperor, which would make Lu Bu a rebel and affiliated with a traitor. Lu Bu decided to send Zhang Liao to intercept the marriage convoy and bring it back to Xiaopei, and he had Han Yin imprisoned; however, he declined Chen Gui's advice to send Han Yin to Xuchang.

Horse theft
Just as Lu Bu gave up his plans to ally with Yuan Shu, he heard from Song Xian and Wei Xu that Zhang Fei had stolen horses which Lu Bu's generals had recently purchased. Lu Bu, in a fit of rage, brought his army to besiege Xiaopei, where Zhang Fei admitted that he had stolen the horses in revenge for Lu Bu stealing Xuzhou; he had done so without Liu Bei's knowledge or approval. Zhang Fei and Lu Bu then fought before Liu Bei ordered Zhang Fei to retreat into Xiaopei, which was then besieged. Liu Bei offered to return the horses in exchange for peace, but Chen Gong advised Liu Bei against doing so, urging him to kill Liu Bei as soon as possible. Sun Qian advised Liu Bei to abandon Xiaopei and flee to Cao Cao, from whom Liu Bei could borrow troops to destroy Lu Bu. Zhang Fei led the vanguard as Liu Bei led the non-fighting portion in the center and Guan Yu led the rearguard, and they broke through Song Xian and Wei Xu's besieging forces and repelled Zhang Liao's rearguard attack. Lu Bu then entered Xiaopei and appointed Gao Shun as governor.

Flight to Xuchang
Liu Bei then encamped outside of Xuchang and sent Sun Qian to relate his situation to Cao Cao. Cao Cao invited Liu Bei into the city and agreed to join Liu Bei in attacking Lu Bu; Guo Jia advised Cao Cao against taking Xun Yu and Cheng Yu's advice to kill Liu Bei, as Cao Cao needed popular support. He made Liu Bei the Governor of Yu Province, and Cao Cao sent him 3,000 troops and 10,000 carts of grain. Cao Cao arranged for Liu Bei to prepare an attack on Xiaopei, but Zhang Xiu's uprising at Wancheng interrupted his plans.

Aftermath
Cao Cao was prevented from acting against Lu Bu by the Battle of Wan Castle, but events in Xu Province worked out in his favor. The Imperial Legate Wang Ze awarded Lu Bu the rank of General Who Pacifies the East, winning his loyalty to the Han. When a messenger from Yuan Shu arrived and informed Lu Bu that Yuan Shu's plans for becoming Emperor were progressing well and that Lu Bu's daughter would become his heir's future Empress, Lu Bu's misgivings about Yuan Shu's imperial designs were confirmed, and he went into a rage and had the messenger executed and Han Yin sent to Xuchang, where he was put to death by Cao Cao in the marketplace. Chen Deng and his father Chen Gui, who had been vital in helping Cao Cao and Liu Bei spy on Lu Bu, were then rewarded; Chen Deng was made Governor of Guangling, while Chen Gui was given an annual grant of 2,000 carts of grain. Lu Bu was enraged, as he had expected to be confirmed as Governor of Xu Province, only for Chen Deng to receive a governorship. However, Chen Deng reasoned his way out of the situation, and Lu Bu proceeded to fight off Yuan Shu's invasion of Xuzhou.