In 200 BCE, Xin, King of Han, surrendered to the Xiongnu at Mayi, Shuofang, Dai Commandery, and joined them in raiding Han territory. Emperor Gaozu of Han led an army against them and scattered their forces, defeating them several times before they retreated. Later Xin set up Zhao Li as King of Zhao and marched south against Gaozu. They too were defeated. Seeing the influence the Xiongnu had on his vassals, Gaozu marched north with a 320,000 strong army to confront them. However his men suffered from inadequate clothing to ward off the cold and a lack of supplies, so Gaozu left them behind and advanced to Pingcheng with only 40,000 men. Modu Chanyu saw his chance to turn the tide and immediately surrounded the city 300,000 cavalry, cutting the emperor off from the rest of his army. It's not clear why, but the Chanyu eventually withdrew some of his men. Sima Qian suggests his consort persuaded him to let the emperor escape. However a prolonged siege would have been impractical anyway since Xin's infantry never made it on time. Seeing the Chanyu's thinned lines, Gaozu sortied out and broke the siege. When Han reinforcements arrived, the Xiongnu withdrew. This came to be known as the Battle of Baideng. Gaozu's narrow escape from capture by the Xiongnu convinced him to make peace with his nomadic enemy. He sent one of his daughters to the Chanyu ("heqin" marriage alliance) and offered him silk, wine, and food stuffs. The Chanyu accepted the offer and restricted himself to minor raids throughout the duration of Gaozu's reign.