Around the same time, rival Liang Dynasty's Emperor Wu created Emperor Xiaozhuang's cousin Yuan Hao the Prince of Beihai, who had fled to Liang following the Heyin Massacre, the Prince of Wei and sent an army commanded by the general Chen Qingzhi to escort him, with an intent to install Yuan Hao as Northern Wei's emperor as a vassal state to Liang. Emperor Xiaozhuang's administration did not consider Yuan Hao a serious threat at the moment, and instead sent a large army, commanded by Yuan Tianmu and Erzhu Rong's nephew Erzhu Zhao, to attack Xing first. Xing was captured and executed in summer 529, but Chen and Yuan Hao, who declared himself the emperor of Northern Wei upon entering Northern Wei territory, took the opportunity to capture Yingyang (滎陽, in modern Zhengzhou, Henan), defeating Yuan Tianmu as he returned from the campaign against Xing, and approached Luoyang. Emperor Xiaozhuang decided to flee Luoyang, and he crossed the Yellow River to rendezvous with Erzhu Rong and Yuan Tianmu at Zhangzi (長子, in modern Changzhi, Shanxi). Meanwhile, Yuan Hao entered Luoyang unopposed, and the provinces south of the Yellow River largely declared allegiance to Yuan Hao.