In spring 705, while Yao was still away from Luoyang, Wu Zetian was ill, and the affairs of state were largely decided by Zhang Yizhi and his brother Zhang Changzong, also Wu Zetian's lover, and there were rumors that Zhang Yizhi and Zhang Changzong were planning on formally seizing power. Zhang Jianzhi, distressed over the situation, entered into a plot with other officials Cui Xuanwei, Jing Hui, Huan Yanfan, and Yuan Shuji, as well as the generals Li Duozuo and Li Dan (李湛, note different character than the Prince of Xiang), to carry out a coup. Once Yao returned from Lingwu, Zhang Jianzhi and Huan discussed the plot with him, and he joined the plot. Soon, the coup was carried out, and Zhang Yizhi and Zhang Changzong were killed. Wu Zetian, while still carrying the title of emperor, was forced to yield the throne to her son Li Xian the Crown Prince (formerly emperor), and Li Xian was restored to the throne as Emperor Zhongzong. For his participation in the coup, Yao was created the Marquess of Liang.