Hapi, sometimes transliterated as Hapy, is one of the Four sons of Horus in ancient Egyptian religion, depicted in funerary literature as protecting the throne of Osiris in the Underworld. He is not to be confused with another god of the same name. He is commonly depicted with the head of a hamadryas baboon, and is tasked with protecting the lungs of the deceased, hence the common depiction of a hamadryas baboon head sculpted as the lid of the canopic jar that held the lungs. Hapi is in turn protected by the goddess Nephthys. When his image appears on the side of a coffin, he is usually aligned with the side intended to face north. When embalming practices changed during the Third Intermediate Period and the mummified organs were placed back inside the body, an amulet of Hapi would be included in the body cavity.
The spelling of his name includes a hieroglyph which is thought to be connected with steering a boat, although its exact nature is not known. For this reason he was sometimes connected with navigation, although early references call him the great runner, as below from Spell 521 of the Coffin Texts.
You are the great runner; come, that you may join up my father N and not be far in this your name of Hapi, for you are the greatest of my children – so says Horus"