Egyptian temples existed from the middle of the fourth millennium bce at the latest. According to tradition, the earliest were in the shape of reed huts. The last Egyptian temple built was a complex of buildings on Philae which ceased to be used in the mid-sixth century ce. After this, the existing structures were used as residences, vandalized or destroyed as pagan reminders, or exploited as quarries. However, the razing of temples for the last reason was already common in pharaonic times—to make room for a new building, to remodel a temple facility, or merely to reuse the materials on another site. Thus, out of the thousands of temples that once existed, only a fraction have been preserved for us.
Most of these in exist today outline; the rest are almost all ruins, and only a few are intact to some extent. The extant temples are predominantly from the last millennium of Egyptian history, the Greco-Roman period (fourth century bce to sixth century ce).
Egyptian temples are first and foremost objects of study for architectural and art history. They are also useful in efforts to reconstruct Egyptian religion and the history of the Egyptian state.
Egyptian temples were mostly erected by the state, at the head of which stood the pharaoh. Thus, the temples had a political function, which was expressed in both images and texts. In the foreground, because it was directly visible in the decoration, was the function of communication with the gods. Therefore, the temples are places of religious practice, though strongly influenced by political considerations. Just as the temples were state institutions, Egyptian religion was a state religion. The state is closely connected with two nonreligious aspects: first, temples had to be administered, a well-researched topic; and second, they required an economic base, which is apparent in many details, particularly lists of donors for its furnishing. The temple economy and administration as sectors belonging to the state had a life of their own, because they supported the regime in a purely practical sense (except in periods of unrest), and also because of the prominence of temples as a proportion of the overall economy. However, the primary function of the temples was worship directed to deities.