In the 14th year of Emperor Xuanzong's Tianbao reign (755 AD), military governor An Lushan (a Hu) raised a rebellion under the pretext of eliminating the treacherous chancellor Yang Guozhong. The following year, he declared himself emperor and entered Chang'an, while his general, the Turk Shi Siming, occupied thirteen prefectures north of the Yellow River. This became known as the "An-Shi Rebellion."
During the Tang Dynasty, the renowned general Guo Ziyi, a military examination graduate serving as the military governor of Shuofang, was ordered by Emperor Xuanzong to suppress the rebels. He beheaded the rebel general Zhou Wanqing, repelled Gao Xiuyan, and recaptured Yunzhong and Mayi, earning promotion to Censor-in-Chief. Joining forces with Li Guangbi, the military governor of Hedong, he defeated Shi Siming and was appointed Minister of War. Soon after, he was elevated to Minister of Works and Deputy Marshal of Guannei and Hedong. After sweeping away rebels across the Yellow River region, Emperor Suzong personally welcomed and rewarded him upon his return, declaring, "You have rebuilt a Tang dynasty."
The eunuch Yu Chao'en, jealous of Guo Ziyi's achievements, constantly sought to frame him. When Guo Ziyi attacked rebel forces at Ye City, the Tang army's nine military governors lacked unified command, leading to defeat. Yu Chao'en blamed Guo Ziyi and slandered him to Emperor Suzong. Already wary of Guo Ziyi's power, Suzong seized the chance to strip him of military command, appointing him Grand Commandant—a title with no real authority. Later, when rebels captured Bianzhou, Zhengzhou, and Heluo, threatening the capital, Suzong restored Guo Ziyi's command, making him military governor of Binzhou, Fuzhou, and supreme commander of all circuits. To suppress further rebellions in Hezhong and Taiyuan, Suzong then appointed Guo Ziyi as deputy marshal of Shuofang, Hezhong, and Beiting circuits, and enfeoffed him as Prince of Fenyang. Before departing, Guo Ziyi sought an audience with Suzong, who was ill and refused to see officials. Weeping outside the gate, Guo Ziyi cried, "I have received your command and will die on the battlefield, but I cannot close my eyes without seeing Your Majesty." Suzong received him at his sickbed and said, "The fate of the Great Tang Empire rests entirely on you."
During the Tang Dynasty, as social tensions intensified and central authority weakened, regional military governors began rising in rebellion. In the reign of Emperor Daizong, the deputy commander of Hebei, a foreign general named Pugu Huai'en, seized the opportunity to rebel, rallying hundreds of thousands of troops from the Uighurs and Tibetans to march south. The veteran general Guo Ziyi, however, personally persuaded the Uighur khan to ally with the Tang forces, and together they drove back the Tibetan and Pugu Huai'en armies.
Guo Ziyi demonstrated his outstanding military talent during over 20 years of war against rebellious provinces. Due to his remarkable achievements, he was repeatedly promoted and was granted the title "Shangfu" (Respected Elder) by Emperor Dezong of Tang. He died at age 85. The emperor suspended court for five days in mourning and issued an edict saying:
"...You can be compared to Lu Shang, who assisted King Wu of Zhou in overthrowing the Shang, a hero sent by heaven. You love your soldiers as your own sons and anticipate the enemy like a god..." The idiom "Anticipate the Enemy Like a God" is used to describe accurately estimating the enemy's situation.
Source: *Old Book of Tang*, "Biography of Guo Ziyi"
Meaning of the Idiom: Later, the Chinese idiom "料敌如神" came to describe accurately estimating the enemy's situation.