The Battle of Baideng was the affair of 200 BC (the seventh year of Emperor Gaozu) in which Modu Chanyu's Xiongnu horsemen besieged Liu Bang on Mount Baideng. That year the King of Han, Xin, defected to the Xiongnu and marched against Han; Liu Bang led the army out in person, and Modu, feigning defeat to bait him, encircled the Han infantry vanguard on Mount Baideng (northeast of present Datong, Shanxi) for seven days and nights. Cut off within and without, short of grain, with frost claiming soldiers' fingers by the score, the court escaped only by Chen Ping's stratagem — envoys sent with lavish gifts to the chanyu's consort. The lesson settled the young dynasty's policy: Liu Bang, judging Han's strength unequal to a decisive war, took Lou Jing's counsel, sealed a heqin accord with the Xiongnu — a princess of the imperial clan given in marriage, yearly silks, wines and food sent north, and border markets opened. Through the reigns of Huidi, Empress Lü, Wen and Jing, the Western Han held basically to the heqin line: the frontier gentler, the humiliation alive, the breathing space of decades won — until Emperor Wu, with the treasury full, turned to the great counter-offensive.