The most important person in ancient Egypt was the king, or Pharaoh. Although occasionally Pharaoh was a woman, he was usually the eldest son of the previous king. His main role was to uphold order and to please the gods. He is therefore depicted repeatedly on the walls of temples offering to the gods, in return for their blessings. Pharaoh might also lead military campaigns against Egypt’s enemies, to secure trade and prosperity. Government was run by officials close to the Pharaoh, to collect taxes and organise big state-run projects like pyramid-building.