with their southern rivals, the Liu Song. Even though it was a time of great military strength for the Northern Wei, because of Rouran harassment in the north, they could not fully focus on their southern expeditions. After uniting the north, Emperor Taiwu also conquered the powerful Shanshan kingdom and subjugated the other kingdoms of Xiyu, or the Western Regions. In 450, Emperor Taiwu once again attacked the Liu Song and reached Guabu (瓜步, in modern Nanjing, Jiangsu), threatening to cross the river to attack Jiankang, the Liu Song capital. Though up to this point, the Northern Wei military forces dominated the Liu Song forces, they took heavy casualties. The Northern Wei forces plundered numerous households before returning north. At this point, followers of the Buddhist Gai Wu (蓋吳) rebelled. After pacifying this rebellion, Emperor Taiwu, under the advice of his Daoist prime minister Cui Hao, proscribed Buddhism, in the first of the Three Disasters of Wu. At this late stage in his life, Emperor Taiwu meted out cruel punishments, which led to his death in 452 at the hands of the eunuch Zong Ai. This sparked off turmoil that only ended with the ascension of Emperor Wencheng later that same year. In the first half of the Northern Wei dynasty (386–534), the Xianbei steppe tribesmen who dominated northern China kept a policy of strict social distinction between them and their Han subjects. Ethnic Han were drafted into the bureaucracy, employed as officials to collect taxes, etc. However, the Han were kept out of many higher positions of power. They also represented the minority of the populace where centers of power were located. In 446 an ethnic Qiang rebellion was crushed by the Northern Wei. Wang Yu (王遇) was an ethnic Qiang eunuch and he may have been castrated during the rebellion since the Northern Wei would castrated the rebel tribe's young elite. Fengyi prefecture's Lirun town according to the Weishu was where Wang Yu was born , Lirun was to Xi'ans's northeast by 100 miles and modern day Chengcheng stands at its site. Wang Yu patronized Buddhism and in 488 had a temple constructed in his birth place. Widespread social and cultural transformation in northern China came with Emperor Xiaowen of Northern Wei (reigned 471–499), whose father was a Xianbei, but whose mother was Han. Although of the Tuoba Clan from the Xianbei tribe, Emperor Xiaowen asserted his dual