Meanwhile, at Luoyang, Wang began to incite his troops by telling them that they would soon fall into Li Mi's trap, and that if Li Mi received the command over them (as Li Mi was nominally bestowed the office of supreme commander of the armed forces), he would surely slaughter them for having resisted him. When Yuan received news that Wang was doing this, he planned to ambush Wang. However, Duan revealed the plot to Wang, and Wang started a coup himself first, killing Lu and surrounding the palace. Huangfu fled to Chang'an (to Tang). At Wang's insistence, Yang Tong surrendered Yuan, who remarked to Yang Tong, "If I die in the morning, Your Imperial Majesty will die in the evening." Yang Tong wept, but still sent Yuan to Wang, who executed Yuan. Wang then met Yang Tong and pledged his loyalty, swearing that all he intended was to save himself and save the empire. Yang Tong took Wang inside the palace to meet Empress Dowager Wang, and Wang swore before her as well. Nevertheless, from this point, all power was in Wang's hands, and Yang Tong himself was powerless.