A central priority of ancient Egyptian religion was the protection of the body after death. A preserved body was one of the elements necessary for transforming the deceased into an effective spirit, an akh, who would live on in the afterlife. As part of this need for protection, the Egyptians who could afford to do so would ensure that their mummified remains were placed in a coffin. Although they were expensive, coffins were considered a key component of the burial assemblage and are found in tombs from the Predynastic period to the Greco-Roman era and beyond.
In addition to protection, the coffin had several religious and symbolic functions that changed over time. In its earliest history, the coffin was considered the eternal dwelling of the deceased. In the Old Kingdom, rectangular coffins were often constructed to mimic the recessed niches associated with elaborate, walled dwellings. This shape reflected the belief that the deceased dwelled in the tomb and received offerings from surviving family members. At the end of the Old Kingdom, non-royal individuals gained access to the funerary texts previously reserved for the interiors of royal pyramids. These private variations, referred to as Coffin Texts, are found written mostly on the interior of coffins from the First Intermediate Period and the Middle Kingdom. These spells ensured that the deceased would reach the afterlife and continue to prosper there. The nature of the afterlife also changed, as the dead were considered to be a manifestation of the god of the dead, Osiris. These decorated rectangular coffins were popular until the end of the Middle Kingdom, when they began to be replaced with carved, anthropoid (human-shaped) coffins. From that time on, the human-shaped sarcophagi were not only used to protect the mummy, but were also, in a certain sense, meant to represent a substitute for the god Osiris.