Like many ancient Egyptian deities, Anubis assumed different roles in various contexts. Depicted as a protector of graves as early as the First Dynasty (c. 3100 – c. 2890 BC), Anubis was also an embalmer. By the Middle Kingdom (c. 2055 – 1650 BC) he was replaced by Osiris in his role as lord of the underworld. One of his prominent roles was as a god who ushered souls into the afterlife. He attended the weighing scale during the "Weighing of the Heart," in which it was determined whether a soul would be allowed to enter the realm of the dead. Despite being one of the most ancient and "one of the most frequently depicted and mentioned gods" in the Egyptian pantheon, Anubis played almost no role in Egyptian myths.