Set was one of the earliest deities, with a strong following in Upper Egypt. Originally highly regarded throughout Egypt as the god of the desert, a political faction inspired an initial disparaging of Set's name and reputation. Egypt was originally split into two kingdoms: Lower ruled by Horus (and later Ra), Upper by Set. Set's followers resisted a unification of the Upper and Lower kingdoms of Egypt by the followers of Horus/Ra (with the followers of Osiris and Isis). This political split was echoed in the Osiris & Isis myth, and subsequent battle with Horus. The followers of Horus thus denigrated Set as chaotic and evil. By the 22nd Dynasty, Set was equated with his old enemy, Apep, and his images on temples were replaced with those of Sobek or Thoth. Most modern popular misconceptions of Set come from Plutarch's secondary source interpretations of Set (via the writings of Herodotus et al.), long after Set's demonization (circa 100 A.D., Roman Period in Egypt).
Set was further demonized immediately after the Hyksos Period. The evidence from the Nineteenth Dynasty proves that this is a more complex picture.
Most scholars[who?] date the demonization of Set to after Egypt's conquest by the Persian ruler Cambyses II. Set, who had traditionally been the god of foreigners, thus also became associated with foreign oppressors, including the Achaemenid Persians, Ptolemaic dynasty, and Romans. Indeed, it was during the time that Set was particularly vilified, and his defeat by Horus widely celebrated.
Set's negative aspects were emphasized during this period. Set was the killer of Osiris in the Myth of Osiris and Isis, having hacked Osiris' body into pieces and dispersed it so that he could not be resurrected. If Set's ears are fins, as some have interpreted, the head of the Set-animal resembles the Oxyrhynchus fish, and so it was said that as a final precaution, an Oxyrhynchus fish ate Osiris' penis. The Greeks later linked Set with Typhon because both were evil forces, storm deities, and sons of the Earth that attacked the main gods.
Nevertheless, throughout this period, in some outlying regions of Egypt Set was still regarded as the heroic chief deity.
http://en.wikipedia.org/wiki/Set_(mythology)
Set was further demonized immediately after the Hyksos Period. The evidence from the Nineteenth Dynasty proves that this is a more complex picture.
Most scholars[who?] date the demonization of Set to after Egypt's conquest by the Persian ruler Cambyses II. Set, who had traditionally been the god of foreigners, thus also became associated with foreign oppressors, including the Achaemenid Persians, Ptolemaic dynasty, and Romans. Indeed, it was during the time that Set was particularly vilified, and his defeat by Horus widely celebrated.
Set's negative aspects were emphasized during this period. Set was the killer of Osiris in the Myth of Osiris and Isis, having hacked Osiris' body into pieces and dispersed it so that he could not be resurrected. If Set's ears are fins, as some have interpreted, the head of the Set-animal resembles the Oxyrhynchus fish, and so it was said that as a final precaution, an Oxyrhynchus fish ate Osiris' penis. The Greeks later linked Set with Typhon because both were evil forces, storm deities, and sons of the Earth that attacked the main gods.
Nevertheless, throughout this period, in some outlying regions of Egypt Set was still regarded as the heroic chief deity.
http://en.wikipedia.org/wiki/Set_(mythology)