The Chapters of Coming Out by Day contain direct indications that the serpent Apopis is an envoy of the Law. Here is one such passage:
(an extract from Chapter XVII
[from the Nebseni papyrus (British Museum No 9900)]
"CHAPTERS ON THE POSSIBILITY OF ENTERING AND LEAVING THE DUAT, ASCENTS TO THE LIGHT IN ANY CHOSEN QUISES, SPENDING TIME IN THE HALL AND ASCENTION IN THE FORM OF A LIVING SOUL.
"As for the "night of settlement and destruction" that is the night of the burning of the damned, the execution of sinners and the slaying of souls. Who is this? It is Apopis when he rises up and one of his heads is crowned with Ma'at [i.e. right and truth]." .
Fig. 171. Apopis, the Book of the Gate, detail of a mural from the tomb of Seti I in the Valley of the Kings