In 264, Zhong Hui would carry out an attempt to seize power — which Jiang Wei, who had surrendered to Zhong Hui, tried to take advantage of to revive Shu. He advised Zhong Hui to falsely accuse Deng Ai of treason and arrest him, and, with their combined troops, rebel against Sima Zhao. Zhong Hui did so, and Jiang Wei planned to next kill Zhong Hui and his followers, and then redeclare Shu's independence under emperor Liu Shan, and had in fact written to Liu Shan to inform him of those plans. However, Zhong Hui's troops rebelled against him, and both Jiang Wei and Zhong Hui were killed in battle. Liu Shan himself was not harmed in the disturbance, although his crown prince Liu Xuan was killed in the confusion.