The beliefs and rituals surrounding these gods formed the core of ancient Egyptian religion, which emerged sometime in prehistory. Deities represented natural forces and phenomena, and the Egyptians supported and appeased them through offerings and rituals so that these forces would continue to function according to maat, or divine order. After the founding of the Egyptian state around 3100 BC, the authority to perform these tasks was controlled by the pharaoh, who claimed to be the gods' representative and managed the temples where the rituals were carried out.