During the reign of Emperor Suzong's grandson Emperor Dezong, Zhang Yanshang was serving in progressively more important positions, and eventually served as a chancellor in 787 before dying late that year.
Soon afterwards, when Princess Deyang was set to be married,[REF] the mansion that Emperor Dezong was constructing for her would have required the destruction of Zhang's ancestral shrine.