The Pyramid Texts are the oldest ancient Egyptian funerary texts, dating to the late Old Kingdom. They are the earliest known corpus of ancient Egyptian religious texts. Written in Old Egyptian, the pyramid texts were carved onto the subterranean walls and sarcophagi of pyramids at Saqqara from the end of the Fifth Dynasty, and throughout the Sixth Dynasty of the Old Kingdom, and into the Eighth Dynasty of the First Intermediate Period.
The use and occurrence of Pyramid Texts changed between the Old, Middle, and New Kingdoms of Ancient Egypt. During the Old Kingdom (2686 BCE – 2181 BCE), Pyramid Texts could be found in the pyramids of kings as well as three queens, named Wedjebten, Neith, and Iput. During the Middle Kingdom (2055 BCE – 1650 BCE), Pyramid Texts were not written in the pyramids of the pharaohs, but the traditions of the pyramid spells continued to be practiced. In the New Kingdom (1550 BCE – 1070 BCE), Pyramid Texts were found on tombs of officials.