Circuit (山南西道, headquartered at Liang Prefecture). During Emperor Dezong's reign In 781, during the reign of Emperor Daizong's son Emperor Dezong, when Liang Chongyi, the military governor of nearby Shannan East Circuit (山南東道, headquartered in modern Xiangfan, Hubei), rebelled against Emperor Dezong's rule, Jia Dan participated in the campaign against Liang and captured Jun Prefecture (均州, in modern Shiyan, Hubei). In 782, after Liang's defeat and suicide, Jia was made the military governor of Shannan East Circuit, and in 783 participated in the campaign against another rebel general, Li Xilie the military governor of Huaixi Circuit (淮西, headquartered in modern Zhumadian, Henan. In 784, while Emperor Dezong was at Liang Prefecture after he fled there due to rebellions by the general Zhu Ci and Li Huaiguang, there was an occasion when Jia sent his officer Fan Ze () to make reports to Emperor Dezong. After Fan's return, there was suddenly an imperial edict issued making Fan the military governor of Shannan East Circuit and recalling Jia to Emperor Dezong's location to serve as the minister of public works (工部尚書, Gongbu Shangshu). When the edict arrived, Jia was hosting a feast, and he received the edict as if nothing had happened. After the feast was over, he informed Fan of his promotion and immediately began the transition, including having the other officers greet Fan as their new superior. The officer Zhang Xianfu () was angered, believing that Fan had treacherously seized Jia's position, and he wanted to kill Fan. Jia stopped him, pointing out that because Fan had imperial sanction, he was the proper military governor. That same day, he left his post and headed for the emperor's location, taking Zhang with him to avoid any further disturbance. Jia was soon made the defender of the eastern capital Luoyang. In 786, after the death of Li Cheng () the military governor of Yicheng Circuit (義成, headquartered in modern Anyang, Henan), Jia was made the military governor of Yicheng. At that time, Li Na the military governor of neighboring Pinglu Circuit (平盧, headquartered in modern Tai'an, Shandong), who had previously rebelled against Emperor Dezong but later resubmitted (albeit nominally), was still viewed as a threat to the circuits loyal to the imperial regime. On an occasion, when Pinglu soldiers, returning from a posting to the western border with Tufan, were going through Yicheng on the way back to Pinglu, Jia's subordinates, worried