Meanwhile, in fall 821, after the Weibo soldiers had departed from Chengde, the Chengde officer Wang Tingcou plotted a mutiny. One night, he led his soldiers and attacked Tian Hongzheng's headquarters, killing him, his staff, and their family members, and then taking over control of most of Chengde by killing those who disagreed with him. Niu Yuanyi (), the prefect of one of Chengde's prefectures, Shen Prefecture (深州, in modern Hengshui, Hebei), tried to resist Wang Tingcou, but soon was besieged within the capital of Shen Prefecture. Meanwhile, Li Su planned a campaign against Wang and Zhu, but fell ill, and was replaced by Tian Bu as the military governor of Weibo. Emperor Muzong commissioned Pei Du, a key chancellor during Emperor Xianzong's reign, to oversee the entire operation against Lulong and Chengde, which also included such renowned imperial generals as Wu Chongyin and Li Guangyan and had some 150,000 soldiers in total, against the less than 10,000 soldiers that the rebels had.