further territorial gains due to the failure to wrest control of Yongqiu (modern Qi County, Kaifeng, in Henan) and (later) the nearby Suiyang from the Tang defenders led by Zhang Xun. This prevented the Yan forces from conquering southern China, before the Tang were able to recover. The Yan army did not take control of Suiyang until after the Siege of Suiyang (January–October 757), almost two years after their initial capture of Luoyang. Advance on Chang'an Originally, An Lushan's forces were blocked from the main imperial (or "Western") capital at Chang'an (modern Xi'an), by loyal troops placed in nearly impregnable defensive positions in the intervening high mountain passes of Tongguan. Unfortunately for Chang'an, the two generals in charge of the troops at Tong Pass, Gao Xianzhi and Feng Changqing, were executed due to a court intrigue involving the powerful eunuch Bian Lingcheng. Yang Guozhong, with grossly inept military judgment, then ordered the replacement General Geshu Han, who was in charge of the troops in the passes, together with reinforcement troops, to attack An's army on open ground. On 7 July, the Tang forces were defeated. The road to the capital now lay open. Flight of the emperor With rebel forces clearly an imminent threat to the imperial seat of Chang'an, and with conflicting advice from his advisers, Tang emperor Xuanzong determined to flee to the relative sanctuary of Sichuan with its natural protection of mountain ranges so the Tang forces could reorganize and regroup. He brought along the bulk of his court and household. The route of travel from Chang'an to Sichuan was notoriously difficult, requiring hard travel on the way through the intervening Qin Mountains. However, the geographical features of the terrain were not the only hardships on the journey: there was a matter that first had to be settled, involving the relationship between Xuanzong and the Yang family, especially the emperor's beloved Yang Guifei. So, before progressing more than a few kilometers along the way, an incident occurred at Mawei Inn, in today's Xingping in Xianyang, Shaanxi. Xuanzong's bodyguard troops were hungry and tired, and very angry with Yang Guozhong for exposing the whole country to danger. They demanded the death of the much-hated Yang Guozhong, and then of his cousin and imperial favorite, Yang Guifei. Soon the angry soldiers killed Yang Guozhong, Yang Xuan (his son), Lady Han and Lady Qin (Yang Guifei's sisters). With the army