The law stood above all humans and was personified by the goddess Maat, with the concept of maat representing truth, justice, righteousness, the correct orderand balance of the universe. Egyptian law was essentially based on the concept of maat, which was about morality, ethics and the entire order of society. The goal of maat was to keep the chaotic forces at bay with the idea of order as the Grundlage of the world, upon which the legal system was based in turn. The Ancient Egyptians saw no difference between human and divine justice. Maat represented a sense of moral responsibility.
NJ van Blerk, The emergence of Law in Ancient Egypt: The role of Maat, in: Fundamina Vol. 24 no 1 (2018), p. 70