Later in 538, with Western Wei then (temporarily) controlling the old Northern Wei capital Luoyang, but with Luoyang under attack, Emperor Wen (who had wanted to visit the imperial ancestral tombs in Luoyang) and Yuwen led troops to reinforce Luoyang's defenses, leaving the official Zhou Huida () and Crown Prince Qin in Chang'an. However, with the forces engaged in battle, Emperor Wen eventually became stuck at Hengnong (恆農, in modern Sanmenxia, Henan), when Chang'an was taken by rebelling former Eastern Wei troops who had been taken captive previously by Western Wei, forcing Zhou and Crown Prince Qin to flee as well. Yuwen was eventually able to disengage after abandoning Luoyang, and he put down the rebellion, allowing Emperor Wen to return to Chang'an.
