Battle of Mayi

The Battle of Mayi (馬邑之戰) was an abortive ambush operation by the Han Dynasty against the invading Xiongnu forces; casualties were minimal. It marked the end of de jure peace between the Han Dynasty and Xiongnu, and stimulated the use of effective cavalry forces and offensive military policies by the Han court.

Background
Before the Battle of Mayi, there had been two main encounters between the Chinese and the Xiongnu. During the Warring States period, General Li Mu of the State of Zhao defeated the Xiongnu by luring them deep inside Zhao territory and ambushing them. With similar tactics, General Meng Tian of the Qin Dynasty drove the Xiongnu north for 750 km and built the Great Wall to guard against future raids.

After the humiliating defeat of Emperor Gao by Modu Shanyu at Baideng in 200 BC, the Han Dynasty was forced to resort to political appeasement in order to decrease the scale of Xiongnu hostility. However, despite the periodic gifts and heqin ("marriage alliance"), border townships and villages were still ravaged by nomads, as the prosperous Chinese lands never failed to attract Xiongnu raids.

After seven decades, Han Dynasty had built up its strength. Emperor Wu maintained a policy of peace early in his reign, but the court began to formulate ideas of striking a major blow against the Xiongnu. The traditional Chinese strategy was to lure the Xiongnu cavalry into Chinese territory, onto terrain where the Chinese army, composed almost entirely of infantry and chariots, would be at an advantage.

The ambush
In 133 BC, at the suggestion of Wang Hui, the minister of vassal affairs, Emperor Wu had his army set a trap for the Xiongnu Shanyu at the city of Mayi. A powerful local trader/smuggler, Nie Wengyi (聶翁壹; also known as Nie Yi (聶壹)), deceptively claimed to Junchen Shanyu that he had killed the local magistrate and was willing to offer the city to the Xiongnu. The plan was to entice the Shanyu's forces into advancing on Mayi so that a Han force 300,000 strong, hidden around the area, could ambush them.

The plan failed, ironically, because the Han ambush was made to look too attractive. When the Shanyu took the bait and moved in for a raid on Mayi, he saw fields full of cattle but with no herdsmen. Feeling increasingly suspicious, the Shanyu ordered his men to halt their advance. Xiongnu scouts then captured a Han soldier from a local outpost, who disclosed the entire plan to the Shanyu. Shaken, the Shanyu then withdrew quickly before the Han forces could act. The Han forces were scattered at this point, unable to concentrate in time to catch the Xiongnu. Wang Hui himself, the commander of the entire Han operation, had only 30,000 troops under his direct command, too few to stop the Xiongnu from retreating to the steppe, or to defeat them. Wang hesitated and ordered the Han forces not to pursue. As a result, neither side suffered any casualties.

Aftermath
Back at the imperial court, Wang Hui's political enemies blamed him for the plan's failure and his reluctance to pursue the retreating Xiongnu army. He was imprisoned. While awaiting trial, he bribed the powerful prime minister Tian Fen (Emperor Wu's uncle) in the hope of obtaining a parole. Emperor Wu still refused to spare Wang, who then committed suicide in prison.

Though border military clashes had already continued for decades between the two sides, this "battle" ended the de jure "peace" between the Han and Xiongnu. The ambush operation revealed the Han Dynasty's hawkish stance, and the "marriage/gift for peace" policy was officially abandoned. For the next few years, Xiongnu would increase their border attacks, further solidifying the cause of pro-war factions and their control in the Han court.

The result of the battle made Emperor Wu realize the difficulty for Han infantry to achieve superiority against the more mobile Xiongnu cavalry. This led to a change in Han strategy and hastened the development of an effective Han cavalry. In later campaigns, the Han dynasty went from a defensive stance to an offensive strategy of launching expeditions deep into Xiongnu territory.

The failure of the Mayi operation also prompted Emperor Wu to reconsider his choice of commanders. Disappointed at the ineffectiveness of existing generals, Emperor Wu began to look for younger generations of military hopefuls capable of offensive anti-cavalry warfare. This led to the rise of famous new-generation tacticians like Wei Qing and Huo Qubing, and decline in favour for traditional commanders like Li Guang.