神策军
Meanwhile, without Wang's knowledge, Li Zhongyan (whose name had been changed to Li Xun by this point), Zheng, and Emperor Wenzong had been plotting to massacre the eunuchs in the palace, as Emperor Wenzong had feared the lead eunuchs' power. On December 14, 835 — in an incident later known as the Ganlu Incident — Li Xun had planned to have soldiers under his associates Guo Xingyu (), Wang Fan (), Luo Liyan (), Han Yue (), and Li Xiaoben () trap the eunuchs and massacre them. However, the powerful eunuch Qiu Shiliang discovered the plot and took control of Emperor Wenzong, and the eunuchs then had the Shence Army () kill or arrest Li Xun's and Zheng's associates. Meanwhile, Wang Ya and the other chancellors were set to have lunch together at the office of the chancellors, when they received report that the Shence Army soldiers were killing everyone in their paths. The chancellors and the other officials fled on foot. Wang Ya was soon captured and taken to the Left Shence Army headquarters. He was tortured, and, unable to bear the pain, falsely stated that he and Li Xun had planned a coup to overthrow Emperor Wenzong and make Zheng emperor.