Guo Ziyi (697-781), of Zheng county in Huazhou, was the restoration general of the Tang. Entering service through the military examinations, he held the Shuofang command when the An Lushan Rebellion broke out: in 756 he and Li Guangbi led the Shuofang army east, recovering most of Hebei; in 757 his forces took back Chang'an and Luoyang — 'refounding the royal house'. In 765, when Tibetans and Uyghurs in alliance drove on the capital, he rode out alone, unhelmeted, and the Uyghur commanders dismounted and bowed, suing for peace; joined with the Uyghurs he then threw back the Tibetans and recovered Chang'an again. Serving four emperors — Xuanzong, Suzong, Daizong, Dezong — twice stripped of command by slander, he moved at a single summons; his power filled the realm yet the court did not fear him, his merit an age's crown yet the sovereign did not doubt him. The histories rank him 'first in refounding the Tang'. He died in 781 at eighty-five, posthumous title Zhongwu, sacrificed in Daizong's temple. The Old Tang History says 'the realm hung its safety on his person for twenty years' — of generals in Chinese history who kept both merit and a whole end, he is the first, and half the Tang's survival after the rebellion stands to his credit.