Wang Jun's support for Emperor Sima Lun against other princes earned the enmity of Sima Ying, who in 304, arranged to appoint He Yan as the governor of You Prefecture and instructed He Yan to eliminate Wang Jun. He Yan then conspired with a Wuhuan chieftain, Shen Deng, to assassinate Wang Jun during a field trip to the Qingquan River just south of Ji. However, during their trip, the travelers encountered a rainstorm and their weapons rusted. Shen Deng believed the rain storm was divine intervention in favor of Wang Jun and disclosed the plot. Wang Jun then killed He Yan and regained control of You. He and his allies Sima Teng, Duan Wuwuchen of the Duan Xianbei clan, and the Wuhuan then attacked Sima Ying in southern Hebei. Sima Ying permitted Liu Yuan, an ethnic Xiongnu commander to leave Ye in southern Hebei and return to Shanxi to mobilize the Xiongnu folk for this war.