Ancient Egyptian religion was a complex and elaborate set of polytheistic rituals and beliefs developed and adopted by the ancient Egyptians that centred on the interaction between the mortals and various theriocephalic deities who controlled several aspects and phenomena of nature. These practices were efforts to provide for the gods and gain their favour. Formal religious practice centred on the Pharaoh, the king of Egypt. Although a human, the Pharaoh was believed to be descended from the gods. He acted as the intermediary between his people and the gods, and was obligated to sustain the gods through rituals and offerings so that they could maintain order in the universe. The state dedicated enormous resources to Egyptian rituals and to the construction of the temples.
Individuals could interact with the gods for their own purposes, appealing for their help through prayer or compelling them to act through magic. These practices were distinct from, but closely linked with, the formal rituals and institutions. The popular religious tradition grew more prominent in the course of Egyptian history as the status of the Pharaoh declined. Another important aspect was the belief in the afterlife and funerary practices. The Egyptians made great efforts to ensure the survival of their souls after death, providing tombs, grave goods, and offerings to preserve the bodies and spirits of the deceased.
The religion had its roots in Egypt's prehistory and lasted for more than 3,000 years. The details of religious belief changed over time as the importance of particular gods rose and declined, and their intricate relationships shifted. At various times, certain gods became more important over the others, including the sun god Ra, the creator god Amun, and the mother goddess Isis. For a brief period, in the aberrant theology promulgated by the Pharaoh Akhenaten, a single god, the Aten, replaced the traditional pantheon. Ancient Egyptian religion and mythology left behind many writings and monuments, along with significant influences on ancient and modern cultures.