Cao Zhen
When the Wei imperial court received news of the invasion, Cao Rui ordered Cao Zhen to lead Wei forces to resist the invaders. At Ji Valley, Cao Zhen easily defeated Zhao Yun and Deng Zhi, who had been given command of the weaker soldiers in the Shu army. (Zhuge Liang had reserved the better soldiers for his own army to attack Mount Qi.) In the meantime, the Wei general Zhang He attacked and defeated the Shu general Ma Su at the Battle of Jieting. Around the time, one Yang Tiao (楊條) from Anding Commandery had rallied some followers, taken the commandery officials hostage and captured the revenue office. When Cao Zhen and his troops besieged Anding Commandery, Yang Tiao tied himself up and surrendered. Zhuge Liang and the Shu forces retreated upon learning of Ma Su’s defeat. The Wei forces under Cao Zhen and Zhang He then used the opportunity to quell the rebellions in the three commanderies and restore peace.