Nomadic empire
The Xiongnu were a confederation of nomadic tribes from Central Asia with a ruling class of unknown origin and other subjugated tribes. They lived on the Mongolian Plateau between the 3rd century BC and the 460s AD, their territories including modern day Mongolia, southern Siberia, western Manchuria, and the modern Chinese provinces of Inner Mongolia, Gansu, and Xinjiang. The Xiongnu was the first unified empire of nomadic peoples. Relations between early Chinese dynasties and the Xiongnu were complicated and included military conflict, exchanges of tribute and trade, and marriage treaties. When Emperor Qin Shihuang drove them away from the south of the Yellow River, he built the famous Great Wall to prevent the Xiongnu from coming back.
History of the Han dynasty
The Eastern-Han court colonized and periodically reasserted the Chinese military presence in the Western Regions only as a means to combat the Northern Xiongnu. Han forces were expelled from the Western Regions first by the Xiongnu between 77–90 CE and then by the Qiang between 107–122 CE. In both of these periods, the financial burdens of reestablishing and expanding western colonies, as well as the liability of sending financial aid requested by Tarim-Basin tributary states, were viewed by the court as reasons to forestall the reopening of foreign relations in the region.