Around 155, the northern Xiongnu were "crushed and subjugated" by the Xianbei. Their chief, known by the Chinese as Tanshihuai, then advanced upon and defeated the Wusun of the Ili region by 166. Under Tanshihuai, the Xianbei extended their territory from the Ussuri to the Caspian Sea. He divided the Xianbei empire into three sections, each ruled by twenty clans. Tanshihuai then formed an alliance with the southern Xiongnu to attack Shaanxi and Gansu. Han dynasty successfully repulsed their attacks in 158, 177. The Xianbei might have also attacked Wa (Japan) with some success.