Originally, Empress Dowager Wei's clan members, along with Zong, Li Guo'er's husband Wu Yanxiu, and other officials Zhao Lüwen () and Ye Jingneng () were advising her to take the throne, like Wu Zetian did, and they also advised her to eliminate Li Dan and Princess Taiping. The official Cui Riyong leaked their plan to Li Longji. Li Longji responded by conspiring with Princess Taiping, Princess Taiping's son Xue Chongjian (), as well as several low-level officials close to him—Zhong Shaojing, Wang Chongye (), Liu Youqiu, and Ma Sizong ()—to act first. Meanwhile, Empress Wei's nephews Wei Bo () and Gao Song (), who had recently been put in command of imperial guards and who had tried to establish their authority by dealing with the guards harshly, had alienated the guards, and the guard officers Ge Fushun (), Chen Xuanli (), and Li Xianfu () thereafter also joined the plot. Without first informing Li Dan, the conspirators rose on 21 July, first killing Wei Bo, Gao, and Empress Wei's cousin Wei Gui (). They then attacked the palace. When Empress Dowager Wei panicked and fled to an imperial guard camp, a guard beheaded her. Li Guo'er, Wu Yanxiu, and Lady Helou were killed as well. Li Longji soon slaughtered a number of officials in Empress Dowager's faction as well as her clan, while displaying Empress Dowager Wei's body on the street. At the urging of Princess Taiping, Li Longji, and Li Longji's brother Li Chengqi, Li Dan soon took the throne from Li Chongmao and again became emperor (as Emperor Ruizong). Emperor Ruizong was immediately faced with the issue of whom to make crown prince—as Li Chengqi, as the oldest son overall and the oldest son of his wife, was the appropriate heir under Confucian principles of succession, but Li Longji had been the one whose accomplishments had allowed him to retake the throne. He hesitated. Li Chengqi declined consideration to be crown prince—stating to his father:  Li Chengqi wept and begged to yield for several days, and after further persuasion by the chancellor Liu Youqiu—who had been part of Li Longji's coup plans—Emperor Ruizong agreed and created Li Longji crown prince. Li Longji submitted a petition offering to yield to Li Chengqi, but Emperor Ruizong rejected it.