Egyptian temples were built for the official worship of the gods and in commemoration of the pharaohs in ancient Egypt and regions under Egyptian control. Temples were seen as houses for the gods or kings to whom they were dedicated. Within them, the Egyptians performed the central rituals of Egyptian religion: giving offerings to the gods, reenacting their mythology through festivals, and warding off the forces of chaos. These rituals were seen as necessary for the gods to continue to uphold maat, the divine order of the universe. Caring for the gods was the obligations of pharaohs, who dedicated prodigious resources to temple construction and maintenance. Pharaohs delegated most of their ritual duties to priests, but most of the populace was excluded from direct participation in ceremonies and forbidden to enter a temple's most sacred areas. Nevertheless, a temple was an important religious site for all classes of Egyptians, who went there to pray, give offerings, and seek oracular guidance.
The most important part of the temple was the sanctuary, which typically contained a cult image of its god. The rooms outside the sanctuary grew larger and more elaborate over time, so that temples evolved from small shrines in late Prehistoric Egypt (late fourth millennium BC) to large stone edifices in the New Kingdom (c. 1550–1070 BC) and later. These edifices are among the largest and most enduring examples of ancient Egyptian architecture, with their elements arranged and decorated according to complex religious symbolism. Their typical layout comprised a series of enclosed halls, open courts, and entrance pylons aligned along the path used for festival processions. Beyond the temple proper was an outer wall enclosing secondary buildings.