Emperor Wen of Western Wei

Emperor Wen's relationship with Yuwen Tai appeared cordial, but he was unable to exercise much real power.

Consequently, Empress Yu once summoned Yang Aofei to the palace, beat her severely, and then forced her to become a Buddhist nun.

He was caned 50 times and demoted to the governorship of Ji Province (冀州, modern central Hebei).

Yuan Yu's rebellion was soon defeated by the general Li Ping (李平), and during his being delivered to the capital Luoyang, Gao had him killed.

However, with Yuwen and other generals capably defending the territory, Western Wei was able to withstand Gao's assaults.

He created his wife Princess Yifu empress, and her son Yuan Qin crown prince.

His marriage with Empress Yifu was said to be a happy one, as she was virtuous and beautiful, and Emperor Wen respected her greatly.

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.

However, because he still hoped to welcome her back to the palace one day, he secretly told her to keep her hair uncut, rather than shaved like a Buddhist nun.

In 548, Yuwen and Yuan Qin were on a grand tour of the provinces when Emperor Wen grew ill, and when they heard the news, Yuwen returned to Chang'an quickly, although by the time they returned, Emperor Wen had recovered.

Yuwen, declaring Northern Qi a rebel state, launched a major attack, but Gao Yang himself commanded a large army to defend against the attack, and Western Wei not only did not make gains, but lost a number of provinces to Northern Qi.

Some scholars speculated that Emperor Wen was poisoned to death by Hu Zhi, an associate of Yuwen Tai who was put in charge of imperial diet.