 In 542, Wei was made the governor of Jin Province (晉州, roughly modern Linfen, Shanxi), and by the recommendation of the prominent general Wang Sizheng (王思政), was given by Yuwen Tai the responsibility of defending the important fort of Yubi (玉壁, in modern Yuncheng, Shanxi), which Wang himself had defended earlier.He managed to pacify the province against raids by the ethnic Xiongnu tribesmen in the area.In 546, Gao Huan launched a major attack on Western Wei, and as Yubi was an important fort on his path, he put it under siege.