Han dynasty China and the nomadic Xiongnu Empire had a very bitter relationship. The Xiongnu were initially a group of steppe tribes kept in check by the Qin dynasty's military offensives under General Meng Tian. With the collapse of the Qin dynasty and the subsequent Chinese civil war, the Xiongnu gained the opportunity to become unified under Modu Shanyu and quickly expanded into a powerful tribal confederacy that ruled over a vast territory across Central and East Asia. The Xiongnu then invaded and occupied the fertile Hetao Grassland. When the Chu-Han contention concluded, Emperor Gao recognized the threat posed by its hostile northern neighbour and in 200 BC launched a massive campaign. After the Han army was lured into an ambush and encircled by 300,000 elite Xiongnu cavalry for seven days, the siege was relieved only after messengers were sent to bribe the Shanyu's wife. Following this failure, the Han emperor realized that the nation, which just recovered from a massive civil war, was not yet strong enough to confront the Xiongnu; therefore, he resorted to the so-called "marriage alliance", or "heqin", in order to ease hostility and buy time to strengthen the nation. Despite the humiliating periodic "heqin" and giving of gifts, the Han borders were still frequently raided by Xiongnu forces over the next seven decades, however the Han Empire was able to study the behavior of the Xiongnu during this time.