Babi was a fierce, bloodthirsty baboon god who was ancient even in the realm of Egyptian gods. We find him mentioned as early as the Old Kingdom, when Babi "bull (i.e. dominant male) of the baboons" with his supernatural aggression is an attribute to which the monarch aspires. He controls the darkness and will open up the sky for the king since his phallus is the bolt on the doors of heaven. This virility symbol is carried over into a later spell where in order to ensure successful sexual intercourse in the Afterlife a man identifies his sexuality with Babi. Perhaps it is not entirely fortuitous that the Underworld ferryboat uses Babi's phallus as its mast.
This dangerous god lives on human entrails and murders on sight. Hence spells are needed to protect oneself against him, particularly during the weighing of the heart ceremony in the Hall of the Two Truths. where a person's fitness for paradise is determined. Naturally this hostile aspect of Babi leads to an identification with Seth. Conversely Babi can use his immense power to ward off dangers like snakes and control turbulent waters. Understandably in the Book of the Dead the deceased makes the magical progression to become Babi who in turn transforms into the "eldest son of Osiris".