The concepts of ka, ba, and akh were formulated for the first time within the Pyramid Texts. These texts are a collection of funeral formulas suitable for the protection and rebirth of Pharaoh in the Lamb. The formulas represent a ritual that allows the passing of the deceased to the world beyond, where it will have its transformation into Osiris, but also allow the sovereign to overcome the dangers during the journey.