Soon after 130 BCE the Wusun became independent of the Xiongnu, becoming trusted vassals of the Han dynasty and powerful force in the region for centuries. With the emerging steppe federations of the Rouran, the Wusun migrated into the Pamir Mountains in the 5th century CE. They are last mentioned in 938 when a Wusun chieftain paid tribute to the Liao dynasty.