Set is perhaps one of the oldest of all the Egyptian gods, and also one of the most complex. Originally the god of the Lower Kingdom he became associated with foreign peoples, possibly because they worshipped similar gods with whom he could be identified. Then, as aliens were so often mistrusted by the conservative natives of Egypt, he became the enemy of the gods.

His worship was known in the earliest predynastic times when his cult centre was at Nebet on the bank of the Nile, north of Luxor. The town was situated on one of the main routes in and out of Egypt and was on the supply road to the gold mines of the desert. Nebet actually means 'gold town' and one of Set's names is Nebty, 'He of the gold town', He was also a god of thunder. Set was represented in carvings by a strange composite beast. The body was like that of a greyhound, he had a long forked tail standing stiffly upright, his face had a curved and extended snout or nose, and his ears were pricked up but with sharply flattened tips. His flesh was deathly white and his hair was red. In dynastic times there are illustrations of Set with a dagger driven into his head, showing that by this time he was seen as harmful to humankind and a source of danger which must be ritually countered. Each month it was believed that he attacked and consumed the moon, causing its disappearance from the night-time sky.

According to legend, the earth god Geb divided the earth into two parts, giving the northern part, or Lower Egypt, to Set's brother Horus, and the south, or Upper Egypt, to Set. Each god ruled justly over his people. With the unification of Egypt, Horus of the north and Set of the south were shown together facing each other with the symbol of unity between them. However this equality between the two gods appears to have lapsed into a state of polarity. There were kings, such as Sekhemib during the Second Dynasty, who preferred the god Set, but overall Horus was the foremost of the two.

The two gods moved further and further apart as their relationship transformed. First Horus became the dominant partner then the eclipsed Set became his adversary. Originally united, the two gods became opposed as Set became the mortal enemy of Horus.

About the year 1670 BCE invaders began to infiltrate the eastern Delta from lands to the East. Known as the Hyksos people, they gained the throne of Egypt in the Fifteenth and Sixteenth Dynasties, enjoying their position for over 400 years. They identified Set with their own god of war Baal, and worshipped him under the name of Sutekh. In the Memphite pantheon Set was the brother of Osiris, Isis and Nephthys, the latter goddess being also his wife. The Hyksos, however, gave him two wives of their own pantheon, Anath and Astarte. (Astarte was a goddess of war comparable to Sekhmet and is sometimes shown in carvings as being lion-headed, while at others she appears riding naked in her battle chariot.) These two goddesses were accepted and worshipped by the Egyptians as wives of Set even after the eventual departure of the Hyksos, when Set's statues were destroyed and his name forbidden to be recorded or voiced.

Besides being a god of foreigners Set also became a god of the desert. He assumed the name the red god representing the deeply inhospitable desert to the east. His name was linked to evil and malevolence, and all manner of dangerous animals were associated with him and his cult. Red coated animals were his accomplices and even men with red hair were held in suspicion. The Greeks identified him with their Typhon. In legend he was reported to have entered the world by bursting violently through the side of Nut, his mother.

Ramesses, the founder of the Twenty-first Dynasty came from a family of the eastern Delta that appears to have held a special relationship with Set, and indeed he named his son Seti I in the god's honour.