Set (also written Seth or Sutekh) is the ancient Egyptian god of the desert, of storms, of violence and disorder, and of foreign lands, everything outside the fertile, ordered black soil of the Nile valley. He is depicted as the Set animal, a creature with a curved snout, tall squared ears and a stiff forked tail that matches no known species and may be deliberately strange. His central role is in the myth of Osiris: Set murders his brother Osiris out of envy, dismembers the body and scatters the pieces, and then contends for eighty years with Osiris's son Horus for the rulership of Egypt, a struggle finally judged in Horus's favour. In this cycle Set is the principle of chaos and usurpation against which ordered kingship defines itself.
Set's reputation was not always so dark. During the Second Intermediate Period, when foreign Hyksos rulers governed northern Egypt and favoured Set as their own patron, and again under the Ramesside pharaohs of the New Kingdom, several of whom took throne names built on his, Seti I and Sethnakht among them, Set was honoured as a legitimate, even heroic god, the one who stands each night at the prow of Ra's solar barque to fight off the chaos-serpent Apophis and protect the sun's passage through the underworld. Only from the Third Intermediate Period onward, and especially after Egypt suffered repeated foreign conquest, did his image darken sharply into an almost wholly negative figure, his statues in some places deliberately defaced or his name erased from monuments, a reputational collapse that took many centuries to complete.