The Pyramid Texts are the oldest collection of religious writings in the world. The oldest copies we have are about four thousand four hundred years old, but most scholars believe that the prayers themselves are much older. They may have existed in spoken and sung forms since early Dynastic times, about five thousand years ago.
Beginning with the pyramid of Wenis at the end of the Fifth Dynasty, spells and prayers were carved into the walls of the inner chambers of pyramids. Near the end of the Sixth Dynasty, during the reign of Pepy II, they began to appear in the pyramids of queens as well as kings. These prayers were still being carved onto sarcophagi two thousand years later.
There are over seven hundred utterances. These aim of these spells and prayers was to help the king overcome death and join the gods. They speak of ways of reaching heaven and joining the stars. Gods and goddesses could help the king by means of ladders, ropes, wings and boats.
Aspects of the geography of the Afterlife are described, such as theField of Reeds and the Winding Waterway. On earth, the king had needed a boat to travel throughout Egypt along the Nile; in the next world, he would need a boat as well. Some of the prayers calls for food and provisions; some assert that the king will not lose the power of his limbs, that he will still move, breathe, eat, copulate in the next world. As the king had been the Son of Re, the sun god, during his life, he would spend eternity in the Boat of Re, crossing the sky. The King also identified with the god Osiris, a deified king, who ruled in the Land of the Dead.
There may seem to be a contradiction in the ideas that the king will join the stars, dwell in the underworld with Osiris, and that he will sail the sky in the boat of Re. There appear to have been several major religious ideas in Ancient Egypt; one focused on the sky, where the deceased king would join the gods, one on an afterlife with the god Osiris, and a third in which the king would join the Polar Stars - the ones which do not set at night - after his death.
Egyptian priests and theologians found ways to reconcile these of beliefs. All of these religious ideas were formulated to help the king to overcome death. The contradictions may be easier to understand if you think of a person with an illness. In order to overcome the disease or condition, the sick person may go to the doctor, take Western or Oriental medicines, visit a chiropractor, investigate herbal remedies, or begin to practise yoga. We take many different approaches to getting well, just as the ancient Egyptians would take many different approaches to gaining an afterlife.
Some or all of the Pyramid Texts may have been recited at the funeral of the king. Some or all may be for the king himself to read aloud when he wished to leave his tomb and climb to the sky. Scholars are still studying the pyramid texts, trying to understand how they were used, and what they meant. Some of them are very beautiful. This passage from Wenis was translated by John L. Foster.
Gone am I, caught by the Underworld,
Yet cleansed and alive in the Beyond.