Han dynasty
To the north of China proper, the nomadic Xiongnu chieftain Modu Chanyu (r. 209–174 BC) conquered various tribes inhabiting the eastern portion of the Eurasian Steppe. By the end of his reign, he controlled Manchuria, Mongolia, and the Tarim Basin, subjugating over twenty states east of Samarkand. Emperor Gaozu was troubled about the abundant Han-manufactured iron weapons traded to the Xiongnu along the northern borders, and he established a trade embargo against the group. In retaliation, the Xiongnu invaded what is now Shanxi province, where they defeated the Han forces at Baideng in 200 BC. After negotiations, the "heqin" agreement in 198 BC nominally held the leaders of the Xiongnu and the Han as equal partners in a royal marriage alliance, but the Han were forced to send large amounts of tribute items such as silk clothes, food, and wine to the Xiongnu.
Wusun
The Wusun originally lived between the Qilian Mountains and Dunhuang (Gansu) near the Yuezhi. Around 176 BCE the Yuezhi were raided by the Xiongnu, who subsequently attacked the Wusun, killing their king and seizing their land. The Xiongnu adopted the surviving Wusun prince and made him one of their generals and leader of the Wusun. Around 162 BCE the Yuezhi were driven into the Ili River valley in Zhetysu, Dzungaria, and Tian Shan, which had formerly been inhabited by the Saka (Scythians). The Wusun then resettled in Gansu as vassals of the Xiongnu. In 133–132 BCE, the Wusun drove the Yuezhi out of the Ili Valley and settled the area.