During Zetian’s rule (690-705 CE), Di Renjie was serving as Governor of Ningzhou. His residence repeatedly suffered inauspicious events, as more than ten people had been killed by a previous governor. When Jie first arrived, his clerk told him that the official mansion had long been ominous, nobody had dared to live there. Moreover, weeds and thornbushes had turned it into a ruin, so it was no longer habitable, so he asked that the official lodge elsewhere. Jie said: “If a governor is not to live in his residence, where else should he lodge?” He ordered that the seals be removed and the house repaired, residing there without concern. Over several nights, there were strange and grotesque events that could not be explained or controlled. Jie spoke angrily: “I am governor, and this is my residence. You may be crooked but I am straight. Why, instead of resolving this logically, do you injure the orthodox? If you are a deity, I will heed your teaching. If you are a demon, how dare you act against me? I have no fear of you in my heart, as you merely change shape. We should face one another and resolve this; why not show yourself politely?” After a short while, a man appeared wearing cap and gown, advancing to say: “Your servant was a minister at such-and-such a court, and was buried below a tree, west of the steps to your hall. A tree root has pierced through my body, and the pain I suffer is beyond endurance. Recently there have been several noble gentlemen, and I have wished to lay out my case, but all later died. Walking nether world paths, I have not yet reached my destination due to this, and if the gentleman can truly change my burial, I dare not delay this any longer.” On finishing speaking, he vanished. The next day, Jie ordered it be dug up, and indeed all was as had been described. He thus had the man reburied, and the events ceased.
[Origin omitted – the Chenchaoben states that it comes from the Guangyiji.]
Li Fang 李昉, et al., Taiping guangji 太平廣記 (Extensive Gleanings from the Era of Great Harmony), 10 vols (Beijing: Zhonghua shuju, 1961), vii, 329.2614:
 This is Di Renjie 狄仁傑 (630-700 CE), a highly regarded Tang-era minister, later finding fame through a fictional detective career.