In Egyptian mythology, Ammit, also spelled Ammut, Ammet, Amam, Amemet and Ahemait, was the personification of divine retribution for all the wrongs one had committed in life. She dwelt in the Hall of Ma'at, who was the personification of the concept of truth, balance, and order.
In the Ancient Egyptian underworld, known as Duat, hearts of the dead were weighed by Anubis against a feather from Ma'at's headdress. The hearts of those who were heavy with wrongdoing failed the test were given to Ammit for her to devour. Those whose souls were devoured were not permitted to enter Aaru, having to be restless forever & effectively dying a second time. If the heart was lighter than a feather then the soul was judged by the god of the underworld, Osiris.