Thereafter Yan's force won several major battles over the rebels, including successfully cutting the rebel supply lines and regaining control over seventeen commands in Heshuo area. In 756, Emperor Suzong ascended the throne and promoted Yan Zhenqing to Minister of Works (). Due to poor military deployment by the Tang government, An Lushan managed to attack Hebei by surprise, and Yan Zhenqing reluctantly abandoned his command, returning to the court in 757. He was then appointed Minister of Law (), but his outspokenness against corrupt higher-ranking officials resulted in himself being constantly demoted and re-promoted.