that they might act against Yicheng, suggested that they be kept outside the city walls of Yicheng's headquarters Hua Prefecture (). Jia, reasoning that it was improper to let soldiers from a neighboring circuit rest in the open air, welcomed them inside, and the Pinglu soldiers did not dare to create any disturbance. Jia also often hunted on the borders with Pinglu, often venturing into Pinglu territory. When Li Na received these reports, he was pleased that Jia did not consider him hostile and admired Jia for his openness, and therefore did not carry out any hostile actions against Yicheng. In 793, Jia was recalled to Chang'an to serve as You Pushe (), one of the heads of the executive bureau of government (尚書省, Shangshu Sheng). He was also given the designation Tong Zhongshu Menxia Pingzhangshi (), making him a chancellor, serving with Lu Zhi (Tang dynasty), Zhao Jing, and Lu Mai. In 800, when Lu Qun () the military governor of Yicheng died, Jia Dan advocated that Emperor Dezong commission a military governor without first consulting the officers of the circuit, believing that such consultation showed weakness. Emperor Dezong agreed and directly made the official Li Yuansu () the military governor of Yicheng. In 801, Jia completed a 40-volume work that included a large map of the Chinese and the non-Chinese populations, and descriptions of the various circuits of Tang as well as foreign nations (see further below). Emperor Dezong awarded him with a number of silk and silver items, as well as a horse, and created him the Duke of Wei. During Emperor Shunzong's and Xianzong's reigns In 805, Emperor Dezong died, and his severely ill son Li Song became emperor (as Emperor Shunzong). Emperor Shunzong's close associate Wang Shuwen became the most powerful figure at court, despite his not being a chancellor, and Wang's associates became in charge of many important matters. Jia Dan disliked Wang and his associates and thus offered to retire, but Emperor Shunzong did not approve of the retirement. Jia died later that year, after Emperor Shunzong had passed the throne to his son Li Chun (as Emperor Xianzong) and was given posthumous honors. It was said that during Jia's service as chancellor, while he had no major contributions on policy matters, he was virtuous and led by example. Works Jia Dan was an important contributor to the study of geography in China,