Emperor Xiaowu, however, strained to free himself from Gao Huan, and their relationship soon deteriorated, as Emperor Xiaowu entered into alliances with the independent generals Yuwen Tai, who controlled the western provinces, and Heba Sheng (賀拔勝), who controlled the southern provinces, against Gao Huan. In 534, when Emperor Xiaowu secretly prepared to attack Gao Huan, Gao Huan saw through his façade, and marched on Luoyang. Emperor Xiaowu fled to Yuwen Tai's territory, without taking Empress Gao with him. Gao Huan declared Yuan Shanjian, the son of Emperor Xiaowu's cousin Yuan Dan (元亶) the Prince of Qinghe emperor (as Emperor Xiaojing), and Northern Wei was divided in two, Eastern Wei under Emperor Xiaojing and Western Wei under Emperor Xiaowu.