In 227, Zhuge Liang transferred his main Shu armies to Hanzhong, and opened up the battle for the northwest with Wei. The next year, he ordered Zhao Yun to attack from Ji Gorge as a diversion while Zhuge himself led the main force to Mount Qi. The vanguard Ma Su suffered a tactical defeat at Jieting and the Shu army was forced to withdraw. In the next six years Zhuge Liang attempted several more offensives, but supply problems limited the capacity for success. In 234, he led his last great northern offensive, reaching the Battle of Wuzhang Plains south of the Wei River. Due to the death of Zhuge Liang in 234, the Shu army was forced once again to withdraw, but were pursued by Wei. The Shu forces began to withdraw; Sima Yi deduced Zhuge Liang's demise and ordered an attack. Shu struck back almost immediately, causing Sima Yi to second guess and allow Shu to withdraw successfully.