Mongolia in ancient times was nomadic. The ethnicities, cultures and languages in modern Mongolian territory were fluid and changed frequently. The use of horses to herd and migrate started during the Iron Age. These were Tengriist horse-riding pastoral kingdoms that had close contact with the sedentary agrarian Chinese. To appease the aggressive nomads, local Chinese rulers often gave important hostages and arranged marriages. In 208 BC the Xiongnu emperor Modu Chanyu, in his first major military campaign, defeated the Donghu, who split into the new tribes Xianbei and Wuhuan. The Xiongnu were the largest nomadic enemies of the Han Dynasty fighting wars for over three centuries with the Han Dynasty before dissolving. Afterwards the Xianbei returned to rule the Steppe north of the Great Wall. The titles of Khangan and Khan come from the Xianbei.