Diodorus Siculus, Library of History 1.72:
“In this period of mourning following the king’s death, they made marvelous preparations for his burial and on the final day they set a coffin containing his body in front of the entrance to the tomb. Then they set up, according to their custom, a tribunal for the dead man to judge the things which he did in life. Once an opportunity had been given to everyone to lay a charge against him, the priests went through all of his wonderful deeds and praised them in turn, and all of the myriads of people who had come for the funeral added their voices to the praise, if it chanced that he had lived a good life. If not, the crowd rang out with censure instead. Indeed, many of the kings were deprived of public, customary burial because of the opposition of the crowd. For this reason, it happened that those who got hold of the throne tended to be just not only for the reasons mentioned earlier, but also because they feared that after their deaths their bodies might be insulted, and they may receive the people’s curse for all time.”
ἐν δὲ τούτῳ τῷ χρόνῳ τὰ πρὸς ταφὴν λαμπρῶς παρεσκευασμένοι, καὶ τῇ τελευταίᾳ τῶν ἡμερῶν θέντες τὴν τὸ σῶμα ἔχουσαν λάρνακα πρὸ τῆς εἰς τὸν τάφον εἰσόδου, προετίθεσαν κατὰ νόμον τῷ τετελευτηκότι κριτήριον τῶν ἐν τῷ βίῳ πραχθέντων. δοθείσης δ’ ἐξουσίας τῷ βουλομένῳ κατηγορεῖν, οἱ μὲν ἱερεῖς ἐνεκωμίαζον ἕκαστα τῶν καλῶς αὐτῷ πραχθέντων διεξιόντες, αἱ δὲ πρὸς τὴν ἐκφορὰν συνηγμέναι μυριάδες τῶν ὄχλων ἀκούουσαι συνεπευφήμουν, εἰ τύχοι καλῶς βεβιωκώς, εἰ δὲ μή, τοὐναντίον ἐθορύβουν. καὶ πολλοὶ τῶν βασιλέων διὰ τὴν τοῦ πλήθους ἐναντίωσιν ἀπεστερήθησαν τῆς ἐμφανοῦς καὶ νομίμου ταφῆς· διὸ καὶ συνέβαινε τοὺς τὴν βασιλείαν διαδεχομένους μὴ μόνον διὰ τὰς ἄρτι ῥηθείσας αἰτίας δικαιοπραγεῖν, ἀλλὰ καὶ διὰ τὸν φόβον τῆς μετὰ τὴν τελευτὴν ἐσομένης ὕβρεώς τε τοῦ σώματος καὶ βλασφημίας εἰς ἅπαντα τὸν αἰῶνα.