Yang Liang
Near the end of the reign of Emperor Wen of Sui, Wang Gui served as a low-level imperial official in charge of ceremonies. After Emperor Wen died in 604, his crown prince Yang Guang took the throne as Emperor Yang. Another son of Emperor Wen, Yang Liang the Prince of Han, on whose staff another uncle of Wang Gui's, Wang Kui (王頍), served, rose in rebellion against Emperor Yang, and after he was defeated, Wang Kui committed suicide, and Wang Po was executed. Based on the laws of the time, Wang Gui was to be executed as well, but he fled into the Qinling Mountains and remained in hiding there for more than a decade.